Jump to content
  • Advertisement
Sign in to follow this  
hotsaucebg3

c++ directX app crashes

This topic is 1328 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
Advertisement

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

i've intalled MSVCR100d.dll and "Chili DirectX Framework V12.04.24 (Mk III)" runs now, but the original framework still crashes, dunno why...it could be really the code..

anyways, thanks!

Share this post


Link to post
Share on other sites

Interesting... Are you compiling the framework yourself? If so which libraries the solution is linking?

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!