Jump to content
  • Advertisement
Sign in to follow this  
tholland

***.exe has stopped working

This topic is 3351 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

I'm using Vista Home premium, VS 2008 Express and DX 9.0c. I have converted a program from XP Home, C++6 and DX8.0, which runs successfully in debug mode. However, when I try to run it without debugging I get the message that the executable has stopped working. Why should that happen and how do I cure it?

Share this post


Link to post
Share on other sites
Advertisement
When switching from debug to release, visual studio don't copy project parameters. A common error is that people forget to set the "working directory" to where the program data is, so when it try to load a file it can't find it and crash because of bad validation.

Another problem is variable initialization. In debug mode, every variables are initialized with a custom debug value, but in release it's often null (0) or simply garbage.

Share this post


Link to post
Share on other sites
To me it sounds like the issue is running the same executable with and without the debugger attached.

If I'm right then this is how you debug it:

1. Make the app pause on startup. For example pop up a MessageBox on the first line of WinMain.
2. Start it up without the debugger, select attach from the debug menu in Visual Studio, and hook the debugger up to your game.
3. Unpause the app (press ok on the message box).

That should let you debug the crash. That type of issue is usually down to uninitialized data.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dunge
Another problem is variable initialization. In debug mode, every variables are initialized with a custom debug value, but in release it's often null (0) or simply garbage.


Release mode will not initialize your variables to null, which is the very reason why he has to initialize them himself.


Check all your return values to detect errors, and initialize all variables. As long as the issue persists on your pc, that's the cause.
If the issue persists but on a third-party pc, it's most likely missing DLL-files.

Share this post


Link to post
Share on other sites
Thanks everyone for your helpful advice. I have I am slowly working my way through initializing variables. On my way I have come across a return value of 1.#INF000. Does anyone know what this means - it seems to be uposetting a lot of the routines!

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!