Jump to content
  • Advertisement
Sign in to follow this  
DesignerX

Debug vs. Release in VS 2005 DirectX9

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

Why when running my application in debug mode everything is running fine but when switching to release mode the following happens : - My loop for checking if a key is pressed never exists (it seems that a key is always pressed for an unkown reasons, NOT happen with debug mode), I'm using DirectInput for that. - My application crashes upon exit. I have no idea why this is so, can anyone explain ? thx.

Share this post


Link to post
Share on other sites
Advertisement
Define "crashes". What's the exact error? If it's an access violation, is it reading or writing, and what address?

Share this post


Link to post
Share on other sites
There could be several reasons for this, caused by code getting optimized away or debug mode adding data which is not there for a release mode build etc. We need to see your code in order to tell.

You could check out for example (just a few hits I googled, there are many more I'm sure):
Debugging Release Mode Problems
Visual C++ Debugging: Why does program work in debug mode, but fail in release mode?

Share this post


Link to post
Share on other sites
Amazingly, that article linked by Omid dismisses the single biggest difference between debug and release builds.

In debug builds, variables are often initialized for you. In release, they are not. Release follows the proper behavior. All the times I've had this problem, it's been because of an uninitialized variable.

Or I could read the whole thing instead of just the summary. I still blame the author. ...

[Edited by - Deyja on April 23, 2007 6:22:13 AM]

Share this post


Link to post
Share on other sites
I thank you all for your replies. I'll sure look into these articles.

Evil Steve, I get the Don't Send/Send win32 error message without any information about the crash. (You know, the "We sorry for the innconvinience but this program must be closed....)

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!