Skip to main content
gamedev.net
🔒 Locked

Debug vs Release versions

Started by dragon376 2 replies 300+ views
Original Post
dragon376
dragon376
A program I wrote crashes in Debug version and not in Release version. The Crash would occurs only if I made many function calls very close together. The esp (stack pointer) would loose track of where it is suppose to be OR the content of the stack would be rested to 00. I know that Debug adds a lot of extra information to the code, and since this code is added by Microsoft Complier, it is normal it crashes but I was wondering if anyone knew more about it. Why exactly? How? And Can I make the Debug version NOT crash by changing compiler options. Thanks
Void
Void
It is NOT normal that it crashes with additional debug code.

If the ESP is corrupted, check function calling convention and byte alignment.

You can make the Debug version not crash by fixing your code.
Serge K
Serge K
quote:
Original post by dragon376
A program I wrote crashes in Debug version and not in Release version.
The Crash would occurs only if I made many function calls very close together. The esp (stack pointer) would loose track of where it is suppose to be OR the content of the stack would be rested to 00.
I know that Debug adds a lot of extra information to the code, and since this code is added by Microsoft Complier, it is normal it crashes but I was wondering if anyone knew more about it. Why exactly?.



Usually it happens only if you''re trashing some memory - access outside of array limits, wrong pointer calculations, etc.

Topic Locked

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

Sign in to reply to this topic.