[fpc-pascal]GPF
A.J. Venter
ddt at headrush.co.za
Tue Sep 17 14:30:00 CEST 2002
On 2002.09.17 13:21 Jonas Maebe wrote:
>
> On dinsdag, september 17, 2002, at 01:05 , ddt at headrush.co.za wrote:
>
>
> Have you tried compiling it with -ghl already?
>
> Jonas
I have now :-)
(That option is not in the manpage nor have I ever found it in the docs -
I
wish I knew about it before)
Here is the output:
General protection fault.
No heap dump by heaptrc unit
Exitcode = 216
Runtime error 216 at 0x0804B8B4
0x0804B8B4 CHARACTERS__SETIMAGE, line 212 of levelobj.pas
0x0804B913 CHARACTERS__SETSTATUS, line 221 of levelobj.pas
0x0804BBF0 CHARACTERS__DRAW, line 283 of levelobj.pas
0x0804B68C LEVELS__DRAW, line 148 of levelobj.pas
0x0804C372 LEVELS__INIT, line 447 of levelobj.pas
0x0805BD82 MAINLOOP, line 157 of minerunner.pas
0x0805BFFE main, line 224 of minerunner.pas
0x08048C17
So how exactly does one read it ?
It would appear from this that characters.setImage crashed - could it be
that
SDL crashes if the same bitmap file is loaded too often ? Or perhaps there
is
something else that goes wrong when I do this.
What I will do next is to recode it so that setStatus merely changes a
string
with the path to the correct image, and then use SDL_BlitSurface with
SDL_LoadBMP as a parameter (e.g. only load on demand) but this could
severly slow down the program so it is not really a final solution, and
even
when the enemy bitmaps are
finished, surely I must be able to use the same file for all of them ?
The bitmaps are structured like this:
For each direction of movement, one bitmap containing six frames of
animation
next to each other.
A sepperate function determines the frame number to play, and then adjust
an
SDL_Rect to only blit the part
of the image containing the current frame.
Any ideas ?
PS. I will look into FPAsync, thanks Sebastian.
A.J. Venter
More information about the fpc-pascal
mailing list