Release build confusion

Chris Raine <[email protected]> Wed, 05 Oct 2005 14:24:43 +0200
Newsgroups gmane.games.devel.windows
Message-ID <[email protected]>
Hi, 

I have a problem with our release builds which is driving me nuts for a
couple of days now. If we start our release build from within the Visual
Studio debugger, everything works fine, yet if we start our release
build outside of Visual Studio, it either crashes or displays weird
render artifacts. The debug build works in the IDE as well as outside. 

My current assumption is that we trash the stack somewhere early in our
initialization code, for changing the default values of the stackreserve
and stackcommit  linker-options can influence the reproduceability of
the crashes. The callstack in case of a crash either is complete garbage
(jumps wildly around in all code) or crashes in areas in which we
already spent excessive time to make (hopefully) bug-free. 

My question is, how does the Visual Studio debugger interfere with the
release build and either prevent (or swallow) errors that lead to
crashes outside of the IDE? If my assumption about stack corruption is
correct, I would like to know if there are any systematic methods of
tracking down such a bug I do not know of? 

I am currently replacing all error-prone code (c-style string functions
e.g strcat() with strncat()) with safer versions and inserting
bounds-checks, as well as commenting out blocks of code and rebuilding
in the hope of finding the spot where we corrupt either the stack or the
heap. But till the present day - no bug found. 

regards, 
Chris Raine
















-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=555