Mail Archives: djgpp/1998/11/30/19:45:51
Richard Pett wrote:
>
> I have noticed the following odd behaviour in a program which I just wrote
> using DJGPP and Allegro:
>
> I declared a bitmap, (BITMAP *buffer2;) but then never got around to using
> this variable for anything. The program compiles OK but when I execute it,
> it immediately terminates, apparantly due do allegro_exit() being called.
>
> Although I have fixed this problem by simply removing the declaration, I was
> curious to know if anyone can tell me why this problem occured in the first
> place - nothing bad happens if an integer is declared and then not defined.
> Is this a BITMAP thing? An Allegro thing? A DJGPP thing?
>
> All though this is not important, I would like to know if anyone is able to
> explain this very odd behaviour. Thanks :-)
No, it shouldn't cause a problem. The fact that it did seems to imply
that something else is wrong. In particular, memory overrun crashes are
often very sensitive to memory layout, and removing or adding a single
variable can change things considerably. So most likely, you have a
bug. If you can't find it, you may want to post your source if it's
short.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -