Handmade Hero»Forums»Code
Peter
21 posts
Access Violation
Edited by Peter on
Hi,

I'm trying to run the latest handmade_hero_day_256_source through my debugger but I get a access violation in handmade_asset.cpp (GetBestMatchAssetFrom). Am I doing something wrong? I just downloaded the code as is and built it without changing anything. Loaded the .exe into Visual Studio and set the working directory to w:\handmade\data (tried to attach two screenshots but were not allowed although I compressed them)


[attachment=67]access_violation1.jpg[/attachment]


Regards

guitarm87
Mārtiņš Možeiko
2562 posts / 2 projects
Access Violation
You need to prepare also assets, if you only downloaded code and compiled it without any changes. For latest day it includes:
1) Downloading "Handmade Hero Art Pack 0" and putting intro_art.hha file in data directory
2) Downloading "Test Assets" and putting all of them in data directory
3) Uncommenting in build.bat line where "test_asset_builder.cpp" gets build
4) Running build.bat to get test_asset_builder.exe executable.
5) Running test_asset_builder.exe executable in data directory, so it creates test1/test2/test3.hha files.

You can download asset files from your SendOwl page.
Casey Muratori
801 posts / 1 project
Casey Muratori is a programmer at Molly Rocket on the game 1935 and is the host of the educational programming series Handmade Hero.
Access Violation
I should probably post a version of the assets that has everything baked in (including the fonts) so it is simpler (eg., just downloading the fonts). I'll make an issue for this.

- Casey
Peter
21 posts
Access Violation
Edited by Peter on
I had already downloaded all the assets files and done all the unpacking of them and I got it to work now. At least partially. My mistake was that I had a .bat file without a call so something went wrong there - my bad. I noticed that I can only use HANDMADE_STREAMING=0 (GL_TRUE) to see something. Otherwise I get a black screen. But I run on a ASUS Zenbook/Notebook which might be the problem.

But I noticed a spelling error in the readme.txt: It says "test_asset_packer.exe" which I guess should be "test_asset_builder.exe" since that is the name of the exe beeing built.

Anyway, thanks for your help and answers!

/guitarm87
Mārtiņš Možeiko
2562 posts / 2 projects
Access Violation
I'm not sure what you mean by GL_TRUE, but setting HANDMADE_STREAMING to 0 to get output is normal behavior. HANDMADE_STREAMING=1 is special workaround for OBS streaming. If you are not doing that then it should 0 which will enable double buffering. And you definitive want double buffering for OpenGL (or D3D) rendering.
27 posts
Access Violation
I was getting that exception too. I rebuilt the assets and build with HANDMADE_STREAMING=0. I get font rendering (sort of) but just a black screen.

Mārtiņš Možeiko
2562 posts / 2 projects
Access Violation
Is it always black or only during cutscene? Maybe you are missing intro_art.hha file in data folder?
27 posts
Access Violation
Its all there. I even re-downloaded it to make double sure.
Peter
21 posts
Access Violation
Edited by Peter on
I can now start the game both from commandline and from inside VC. I think I've built everything correct (!?). I can shift to the game by pressing the space key. But I don't see the text/fonts (debugging stuff) on the first part (scene when zooming in at the house). Here's what got built in the handmade\data directory. It seems ok since it got built just minutes ago:
[attachment=68]Capture1.jpg[/attachment]

Regards

/guitarm87
27 posts
Access Violation
Your issue (like mine was) may be you don't have your working directory set. I had forgotten I reset my solution file so my data directory was not set.

Peter
21 posts
Access Violation
Nope, didn't forget about it. I've gone through all of my settings and HMH compiles and builds fine. But I wonder why I don't get that font rendering. But, as said, I'm on a ASUS Zenbook with Intel Iris Graphics 5100 built-in. Not really fit for games I guess :-)


[attachment=70]working_directory.jpg[/attachment]
Mārtiņš Možeiko
2562 posts / 2 projects
Access Violation
Using Intel for this type of game is fine. Really, we are just display few rectangular sprites. No fancy shaders or GL extensions are used.