vc++ debug vs. release?

Joined
Apr 9, 2004
Messages
3,824
Reaction score
746
What are the major differences between these two builds, so that it can cause something like this:
My program works fine when the debug .exe is launched, however in the release build it crashes when overlapped by another window.

The actual issue isn't crashing itself, cause I haven't even attempted to iron out all bugs yet. More like the surprise of debug and release builds acting in a different way which might make the debug progress more difficult if the debug version simply doesn't have the bug.

I'm not sure how to make this a clear question and don't know what kind of an answer I'm looking for. Any ideas? Did what I said ring a bell?
 
The big difference is that, the debug executable still uses the runtime in it... the release is a standalone executable... from what I have found, release builds are faster.

:shutup3:

Negata said:
What are the major differences between these two builds, so that it can cause something like this:
My program works fine when the debug .exe is launched, however in the release build it crashes when overlapped by another window.

The actual issue isn't crashing itself, cause I haven't even attempted to iron out all bugs yet. More like the surprise of debug and release builds acting in a different way which might make the debug progress more difficult if the debug version simply doesn't have the bug.

I'm not sure how to make this a clear question and don't know what kind of an answer I'm looking for. Any ideas? Did what I said ring a bell?
 
bitblaster said:
The big difference is that, the debug executable still uses the runtime in it... the release is a standalone executable... from what I have found, release builds are faster.

:shutup3:


wrong.

there are two versions of runtime, debug and release. you get one either way.

the only real difference is _DEBUG preproccessor is declared, debug symbols are built in and all optimizations are turned off.

You might want to start by disabling any optimizations and see if that helps.

Release builds are obviously faster, without the debug symbols, the optimizations and the release runtime are meant to run as fast as possible. debug builds obviously add more overhead..

so you get one star bitblaster. looks like you're actually trying to learn something, but a long way to go, you still have </yoda>
 
JokerTM said:
so you get one star bitblaster. looks like you're actually trying to learn something, but a long way to go, you still have </yoda>
And I know all that already, but that and what you said still isn't something that would help explain the differing behavior. :(
The actual issue isn't crashing itself, cause I haven't even attempted to iron out all bugs yet. More like the surprise of debug and release builds acting in a different way which might make the debug progress more difficult if the debug version simply doesn't have the bug.
In fact I'd assume debug .exe is easier to halt and exit on errors, like just to be sure. However it doesn't appear this way.
 
Negata said:
And I know all that already, but that and what you said still isn't something that would help explain the differing behavior. :(

In fact I'd assume debug .exe is easier to halt and exit on errors, like just to be sure. However it doesn't appear this way.


that wasn't directed at you, it was directed at bitblaster. we have a bit of a history.


like I said though, disable optimizations in release mode, and see if that helps any. Its not very rare to get something to crash in release but not debug. just go through all the different settings of the project to see if anything specific in release is effecting it besides the runtime
 
JokerTM said:
that wasn't directed at you, it was directed at bitblaster. we have a bit of a history.
I know, just thought I should point out where my knowledge ends so that helpers have an easier time figuring out what I need to know.


like I said though, disable optimizations in release mode, and see if that helps any. Its not very rare to get something to crash in release but not debug. just go through all the different settings of the project to see if anything specific in release is effecting it besides the runtime
We're a bit beside the point here, cause I'm certain the current bug isn't a problem at all - I've pretty much ignored all error handling so far until I have a ready skeleton to work on, besides it deffo doesn't sound like a good way to throw away optimizations just because my code sucks. What would really help in the future if I run into similar issues is to figure out how to make debug version also crash at the time release does.
 
Back