Mail Archives: djgpp/2000/01/10/11:04:39
On Sun, 9 Jan 2000, Gary Smith wrote:
> I have written a program using the latest Allegro WIP and VC5. The program
> compiles OK with no error messages or warnings. However when I run it it
> terminates. I traced the termination point to a blit command.
> By remming this command out the program worked.
>
> After this I went through the program and removed a few remark lines (ie
> // ). Now the program terminates at another blit command elsewhere in the
> program. The termination point seems to vary when code is added or removed
> from the program, but always terminates at a blit command.
By ``terminates'' do you mean it crashes with registers' dump and a
call stack traceback? If so, please post here the complete crash
message printed when the program ``terminates''. There's a wealth of
important information there that could help us give you much more
intelligent advice.
Generally, what you describe could be a symptom of overwritten stack:
some function that you call *before* the blit function overwrites the
stack and garbles local variables and return addresses. This garbage
eventually creeps into the EBP or ESP register, and once some code
(probably your blit function) uses these registers to access the
stack, you get a GPF.
For more details about these issues, including debugging hints and how
to read the crash message, can be found in section 12.2 of the DJGPP
FAQ list; please read it.
- Raw text -