Sign in to follow this  

c++ directX app crashes

This topic is 1116 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I am following c++ DirectX tutorials(ChiliTomatoNoodle channel in YT), and I am having problem when i execute chili's framework. The sollution builds fine, but when I run program from the .exe(in the Release folder) or hit ctrl+ F5, it crashes with message: Framework.exe has stopped working.
Laptop is: Toshiba Satellite A105
I am using windows 7 32-bit, i've installed Visual Studio 2010, DirectX SDK, and Microsoft Visual C++ Redistributable 2010.
the debug mode gives me:
"Unhandled exception at 0x001d133a in Chili DirectX Framework.exe: 0xC0000005: Access violation reading location 0x00000000."
at this row:
theGame.Go();
 

Share this post


Link to post
Share on other sites

Do you know how to debug setting breakpoints? Check that "theGame" at that point is not garbage.

 

Also, share more code, only the line of code that crashes is useless almost every time. If that line is inside a function, share the whole function and the code that calls it.

Edited by DiegoSLTS

Share this post


Link to post
Share on other sites

The code is fine, it runs on another computer. You can download the framework here http://www.planetchili.net/forum/viewtopic.php?f=3&t=961 . Now I've just started visual studio as administrator and got another error: MSVCR100d.dll is missing...

The error you mentioned indicates that you are trying to access memory through a null pointer.  If you debug on that line of code, and find the object being accessed that is null, you should be able to work backward and figure out what the issue is.

 

Considering that you got the framework from that website, have you considered asking for help there?  It is much more likely that they could help you there better than someone here...

Share this post


Link to post
Share on other sites

The code is fine, it runs on another computer. You can download the framework here http://www.planetchili.net/forum/viewtopic.php?f=3&t=961 . Now I've just started visual studio as administrator and got another error: MSVCR100d.dll is missing...

You can download that dll here: http://es.******.com/msvcr100d.dll.html

 

It should be in at least one place where Windows looks for dll files: http://msdn.microsoft.com/en-us/library/7d83bc18.aspx

 

Maybe the code runs in another PC, but that doesn't mean the code "is fine", it means the opposite, the code has a bug. For example, you might be in an environment where pointers or variables are automatically intialized to 0 and forgot to do it manually, and one day you change to another environment where the uninitialized pointers and variables hold garbage and start getting crashes.

 

EDIT: I used that link because I never got problems with that site, but I understand why it's not a good source. To anyone reading this, ignore the first link and look at Hodgman post bellow.

Edited by DiegoSLTS

Share this post


Link to post
Share on other sites

...but that doesn't mean the code "is fine"...

 
The code is indeed questionable. Almost every D3D API function returns a HRESULT to indicate success which one should check with the SUCCEEDED/FAILED macro. I can only see error checking for the DSound wrapper, none for D3D (well, the advanced lessons do have some, seems there's more than one framework version to download blink.png ). Very confusing for beginners.

Share this post


Link to post
Share on other sites

This topic is 1116 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this