Page 1 of 2

why does debug version not show bugs that release does?

PostPosted: Apr 26, 2004 @ 11:49am
by Conan

PostPosted: Apr 26, 2004 @ 11:58am
by Pejo Software - Per

PostPosted: Apr 26, 2004 @ 12:04pm
by Jinks

PostPosted: Apr 26, 2004 @ 12:49pm
by Dan East
Memory allocated in a debug build also has padding on either end of the array. It is supposed to be used to check if the array was overwritten, but Windows CE debugger doesn't check it.

So to rehash what has already been said:

Try building individual source files Release build with all optimizations turned off.

Make sure you aren't reading dynamically allocated data before the data is initialized.

Watch for writing past the end (or beginning) of dynamically allocated arrays. Just a single byte will cause problems - but only in a Release build.

Dan East

PostPosted: Apr 26, 2004 @ 4:02pm
by mlepage
Jinks is write, the optimizer can also screw things up. Happened to me a few times. Try a build without optimizations.

PostPosted: Apr 26, 2004 @ 11:51pm
by rcp

PostPosted: Apr 27, 2004 @ 12:59am
by j.edwards

PostPosted: Apr 27, 2004 @ 7:00am
by Conan

PostPosted: Apr 27, 2004 @ 9:07am
by Jim
Like I said else where recently, I recommend writing your own memory wrapper functions which have error checking..these will definately check your memory problems, you can also then check memory problems even when optimizations are on, then on release you use a version with out your memory debug.
So many bugs tend to be down to memory screw ups it an investment to write such code.

Jim.

PostPosted: Apr 27, 2004 @ 2:31pm
by mlepage

PostPosted: Apr 27, 2004 @ 2:44pm
by Conan

PostPosted: Apr 27, 2004 @ 6:17pm
by mlepage

PostPosted: Apr 27, 2004 @ 6:43pm
by Kzinti

PostPosted: Apr 27, 2004 @ 9:00pm
by StephC

PostPosted: Apr 28, 2004 @ 7:36am
by drgoldie
here another thing to try:

if you have issues with different application behaviour in release/debug (ofcourse release versions make the problems, since most of us run their programs most of the time in debug, so it usually runs fine there) then enable debug information for release builds and have a look into what happens in the release code...

bye,
Daniel