Mail Archives: djgpp/1996/06/09/09:00:37
a920101 AT zipi DOT fi DOT upm DOT es wrote:
>Hi everybody!
> I am programming a game with DJGPP 2.0, and I'm finding it is a realy
>*great* tool. I have currently written 2500+ lines in C++/Asm, and had no
>problem (except for my own bugs ;). But now I am facing a strange behaviour
>with my program: If I compile it *without* optimizations (-m486 -O3), it
>crashes with a page fault after exiting the game (I mean: you quit playing,
>and then it dumps out a GPF, no problem *while* playing). I find no problem
>when compiling with -m486 -O3, anyway.
>I've debugged the generated code, and I've found that the problem is GCC
>not passing the correct arguments to some functions. I call the function
>with the correct parameter (made sure of this), but it gets a wild one!
>I stopped using the nearptr feature, as this is dangerous, but the problem
>didn't went away...any clue???
Post the operating system that you are under, and the stack-trace that
your program prints when it gives a gpf. At a guess it may be a stack
overflow, in which case stubedit your program to have 500K or 1M of
stack instead of the standard 256K and see if that helps.
Malcolm
- Raw text -