Release mode

Started by
18 comments, last by BloodLust666 18 years, 8 months ago
when compiling in release mode i was having the problem on the arrow keys not working, i fixed all that and initialized all my uninitialized variables but now when i run the program, right after the first frame it gives me an error box saying... "Unhandled exception at 0x00400031 in Galaga Adventure Release.exe: 0xC0000005: Access violation writing location 0x00000000." then another box after that "There is no source code available for the current location." what's that mean?
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
Advertisement
In debug mode, sprinkle assert(...) statements throughout your code. It may have the answer that debug may not catch.
using a null pointer?
what will assert do? and how would i use it?
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
Quote:Original post by EvilKnuckles666
what will assert do? and how would i use it?


Assert is a function you can use to test for errors, it'll online run in debug mode and therefore wont affect the performance of your final executable.

To use assert you need to "#include <cassert>" then you can use it like this:

#include <cassert>int main(){int a = 4;int b = 5;a+=b;assert(a==4);}


This would pop up a message box in debug mode because a aint 4. You can use this to check if your pointers is NULL.
assert(expression);

Simple as that. Expression evaluates to a bool. If it is false, it will cause your program to stop on the assertion. Useful for checking variables in debug mode. In release mode, asserts are ignored. It is part of standard c++ and is in the include file <cassert>

See msdn.

Edit: Beaten by 8 seconds.
is there any other way i could figure it out? i have lots and lots of code...
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
So what does the call stack show for that thread?
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms
and sry if it's off topic but what does:
"DMIME: Couldn't find SegState in GetParam call."
mean while i'm running the program.
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
call stack shows:

> Galaga Adventure Release.exe!00400038()
ff016aec()

i don't even know what that is...
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML

This topic is closed to new replies.

Advertisement