Handmade Hero»Forums
Peter
21 posts
Exception thrown in handmade_asset.cpp
Edited by Peter on
Hello people of HMH,

It seems I can build HMH without errors or warnings. I use Win7, VS2017 with 10.0.16299.0 installed.
I've also built the assets with test_asset_builder.exe.
The problem appears when I want to run hmh. When I run it with:
"w:\handmade\data>w:\build\win32_handmade.exe" It shows a black windows and then ends

If I then run it in VS debugger I get:

Exception thrown at 0x000007FECD8A3A67 (handmade_temp.dll) in win32_handmade.exe: 0xC0000005: Access violation reading location 0x000000003C4A1000. occurred

At line:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
                    asset_basic_category TypeID = Asset_None;
                    for(u32 AssetTagIndex = Asset->HHA.FirstTagIndex;
                        AssetTagIndex < Asset->HHA.OnePastLastTagIndex;
                        ++AssetTagIndex)
                    {
                        Stops at this line --> if(Assets->Tags[AssetTagIndex].ID == Tag_BasicCategory)
                        {
                            TypeID = (asset_basic_category)RoundReal32ToInt32(Assets->Tags[AssetTagIndex].Value);
                        }
                    }



I guess I'm doing something wrong. Any suggestions?

Regards

guitarm87
Simon Anciaux
1337 posts
Exception thrown in handmade_asset.cpp
I think the working directory needs to be W:\handmade\ instead of W:\handmade\data. But I'm not up to date with how the last asset system version is supposed to work.
Peter
21 posts
Exception thrown in handmade_asset.cpp
Thanks for replying. I tried to start from w:\handmade instead of w:\handmade\data but It didn't help. Thanks anyway.
Simon Anciaux
1337 posts
Exception thrown in handmade_asset.cpp
I tried it:
you shouldn't use test_asset_builder.exe anymore, unless you are using an old version of handmade hero. Since you used it I think you need to remove any file it created from the data folder. The simplest is to empty the data folder and get the proper hha files from the data folder in handmade_latest_art_and_data.zip.

Then just running the game should work directly.

In short, to run the game:
- get the sources;
- compile the sources;
- extract the 2 folders from handmade_latest_art_and_data.zip in w:\handmade\
- run the game with w:\handmade\ as the working directory.
Peter
21 posts
Exception thrown in handmade_asset.cpp
Well, the good news is that it doesn't crash anymore. But I only get the window with a dark "grayish" background. Nothing more happens. Absolutely nothing.

This is weird. I can't seem to figure out what I'm doing wrong :-)

But thanks for helping me, I just wanted to get the game going.


Regards

/Peter
Simon Anciaux
1337 posts
Exception thrown in handmade_asset.cpp
To make sure, the folder structure should be:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
W:\
|- build
 |- win32_handmade.exe
 |- ...
|
|- handmade
 |- art
  |- all png files
 |
 |- code
  |- all source files
 |
 |- ctime
  |- ...
 |
 |- data
  |- base_game.hha
  |- intro_art_v2.hha
  |- intro_cutscene.hha
  |- local.hha
  |- test1_v2.hha
  |- test2_v2.hha
  |- test3_v2.hha
  |- testfonts_v2.hha
 |
 |- debug
  |- ...
 |
 |- misc
  |- ...
 |
 |- nvidia
  |- ...
 |
 |- ray
  |- ...
 |
 |- retired
 |- ...
 |
 |- tags
  |- fonts
   |- LiberationMono.hht
   |- SegoeUI.hht
  |- base_game.backup
  |- base_game.hht
  |- intro_cutscene.backup
  |- intro_cutscene.hht
 |
 |- test
  |- ...
 |
 |- timer
  |- ...
Peter
21 posts
Exception thrown in handmade_asset.cpp
Yes, I removed everything and started from scratch. Only kept
handmade_latest_art_and_data.zip
and
handmade_hero_day_533_source.zip


Both of these I unpacked in: W:\handmade

So if I compare it with your file/directory list it's exactly the same.

And it doesn't seem to matter. I still just get the "greyish" window when I run it with:
w:\build\win32_handmade.exe
from the
w:\handmade
directory and nothing more happens although the
win32_handmade.exe
builds fine without any problems. I notice it's only 32 KB though.

It seems impossible to make it work :-/

Regards

Peter
Simon Anciaux
1337 posts
Exception thrown in handmade_asset.cpp
win32_handmade.exe should be about 32K (36K on my machine).
There should also be a handmade.dll and win32_handmade_opengl.dll.

You can try to disable you anti virus to see if it's not blocking something.

If it still doesn't work, you would need to step in the code using the debugger to see what's going on.
Peter
21 posts
Exception thrown in handmade_asset.cpp
Is it possible that the video card in the comp I'm using now (internal Intel HD Graphics 2000) is too old and doesn't support the OpenGL version used in HMH?
Simon Anciaux
1337 posts
Exception thrown in handmade_asset.cpp
According to the following page, your card chip only supports OpenGL 3.1 and Handmade hero uses OpenGL 3.3
intel HD Graphics 2000 specs.

You can try to create an OpenGL 3.1 context instead. But there is no guarantee that it will work properly if it works at all.

Try changing the following line in win32_handmade_opengl.cpp
1
2
3
WGL_CONTEXT_MINOR_VERSION_ARB, 3
// to 
WGL_CONTEXT_MINOR_VERSION_ARB, 1


If that doesn't work have a look at the OpenGL wiki Creating an OpenGL context (WGL).
Peter
21 posts
Exception thrown in handmade_asset.cpp
Unfortunately it didn't work. But I've bought a new graphics card now. Radeon RX 580. I'll put that in and hope for the best.

Thank you for all the help!

Regards