|
Program crashing in release
I use VC++ 6
When I compile my program in DEBUG mode, everything is perfect, then links corretly, then runs correctly
If I compile now in Release mode, everything compile correctly
at link time, I get a :
Then, the program runs and crashes immedately without I see anything on the screen
(you can find me on IRC : #opengl on undernet)
The crash has nothing to do with the linker warning - it''s most likely a variable not initialised ( they get initialised to 0 or some equivalent in Debug mode ) or having critical code within an "ASSERT" block.
Give me one more medicated peaceful moment.
~ (V)^|) |<é!t|-| ~
ERROR: Your beta-version of Life1.0 has expired. Please upgrade to the full version. All important social functions will be disabled from now on.
Give me one more medicated peaceful moment.
~ (V)^|) |<é!t|-| ~
ERROR: Your beta-version of Life1.0 has expired. Please upgrade to the full version. All important social functions will be disabled from now on.
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
I have no asserts that changes the way code is compiled
(you can find me on IRC : #opengl on undernet)
Well if you get no error message, it''s perhaps just terminating because of an internal error condition. Do you have any logging?
Give me one more medicated peaceful moment.
~ (V)^|) |<é!t|-| ~
ERROR: Your beta-version of Life1.0 has expired. Please upgrade to the full version. All important social functions will be disabled from now on.
Give me one more medicated peaceful moment.
~ (V)^|) |<é!t|-| ~
ERROR: Your beta-version of Life1.0 has expired. Please upgrade to the full version. All important social functions will be disabled from now on.
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
I''ve had this same problem myself. MadKeithV is right about debug mode automatically initializing all variables to 0, while in release this doesn''t happen. It makes it much tougher to debug problems in debug when the compiler covers them up like that.
Anyways, using a logging system like MadKeithV suggested is your best option. If you don''t go that route, then you are forced down the route of commenting out everything but the very basic skeleton code to run your program. If it runs fine, then uncomment half your code, and run the program again. If it crashes, then you know the bug is in that half of the code. Lather, rinse, repeat until you get the line/lines thats causing the problem.
Just remember a good rule of thumb: always periodically compile and run your programs in release mode to make sure everything is still running fine. The longer you wait the harder it will be to track down that bug...
Anyways, using a logging system like MadKeithV suggested is your best option. If you don''t go that route, then you are forced down the route of commenting out everything but the very basic skeleton code to run your program. If it runs fine, then uncomment half your code, and run the program again. If it crashes, then you know the bug is in that half of the code. Lather, rinse, repeat until you get the line/lines thats causing the problem.
Just remember a good rule of thumb: always periodically compile and run your programs in release mode to make sure everything is still running fine. The longer you wait the harder it will be to track down that bug...
- Houdini
Oh, I thought all compilers would initialise vars to 0
:o)
:o)
(you can find me on IRC : #opengl on undernet)
I don''t know why it didn''t crash in debug, but I was writing stuff outside pointer "legal" space
(you can find me on IRC : #opengl on undernet)
No C specification states that variables need to be initialised to ''0''. Not that VC++ is particularly compliant with ANSI spec. anyways....
Paul Grovespauls opengl page
It really bothers me going from C++ to languages like Eiffel. In Eiffel, everything is too fixed for my liking. I like my strings to start at array index 0 and go until I reach a null, not start at 1 and go until my index is eaqual to a function return (mystring.count as it were). I love C++ for not being strict, so initialise EVERYTHING the way that you want it, don''t assume anything... Trust NOBODY (No variable initialisation that is)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-Chris Bennett of Dwarfsoft
"The Philosophers' Stone of Programming Alchemy"
IOL (The list formerly known as NPCAI) - A GDNet production
Our Doc - The future of RPGs
Thanks to all the goblins over in our little Game Design Corner niche
![](http://www.gamedev.net/community/forums/icons/icon6.gif)
![](wink.gif)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-Chris Bennett of Dwarfsoft
"The Philosophers' Stone of Programming Alchemy"
IOL (The list formerly known as NPCAI) - A GDNet production
Our Doc - The future of RPGs
Thanks to all the goblins over in our little Game Design Corner niche
![](http://www.gamedev.net/community/forums/icons/icon6.gif)
![](http://www.gamedev.net/community/forums/icons/icon6.gif)
![](http://www.gamedev.net/community/forums/icons/icon6.gif)
Strong static typing is a lovely thing. You should learn to embrace it ![](smile.gif)
![](smile.gif)
Paul Grovespauls opengl page
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement