Skip to main content
GameDev.net gamedev.net
🔒 Locked

Release vs. Debug Builds

Started by BtySgtMajor Aug 8, 2002 at 9:40 AM 5 replies 750+ views
Original Post
BtySgtMajor
BtySgtMajor
I have two builds of a game I''m making: debug and release. The debug version runs just fine. However, when I try to run the release version (linked to the same libs, etc.) from its directory, DirectX initializes the screen, but then immediately puts it back to normal and quits! Any ideas as to why this only happens with the release build?
Laroche
Laroche
In debug mode the compiler initializes all pointers and arrays to NULL (or 0 if you prefer). In release mode, there is no such safety net, so I''d probably say that you are over-writing the boundries of an array, or using a dangling pointer.

Try sprinkling your code with asserts, or go through the code in the debugger to see what''s up.
Check out my music at: http://zed.cbc.ca/go.ZeD?user_id=41947&user=Laroche&page=content
BtySgtMajor
BtySgtMajor
Well, not as of yet, seeing as it was about 2am last night and I didn''t especially feel like debugging at that point. I just wanted to make sure it''s not something stupid between the two configurations.
BtySgtMajor
BtySgtMajor
Really? Interesting, I didn''t know that. I''ll give that a whiz. Thanks!
SuperMike
SuperMike
That is a nasty problem that I think everyone has run into with debug and release versions. We have our system set all variables to 0xcccccccc when created in debug. This helps to find uninitialized variables and can cause the same crashes in debug that you are seeing in release. ( which is a good thing )

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.