Mail Archives: djgpp/1999/03/01/07:25:26
On Sun, 28 Feb 1999, Franz Raps wrote:
> I don't understand why it crashes..
Did you try the methods of debugging suggested by section 12.2 of the
DJGPP FAQ list? If not, please try those which are applicable to this
case.
> AFAIK I put all NULL checks and all that.
Your crash is not because of NULL pointer dereference (Windows cannot
detect those); it's a GPF. Section 12.2 of the FAQ explains what
problems can cause a GPF. Just from looking at the registers' dump,
the value of EDX (7F7F7F7Fh) seems highly suspicious, but only poking
around the code in a debugger can tell whether it is at all relevant
to the problem.
> It crashes in either DOS or WINDOWS.
The crash you posted is on Windows, I think. If the crashes on DOS
look even slightly different, especially if they point to a different
location, post them as well.
> Here is the crash I get:
>
> Shutting down Allegro
> Exiting due to signal SIGSEGV
> General Protection Fault at eip=0000504a
> eax=00120508 ebx=00120508 ecx=00000409 edx=7f7f7f7f esi=00000054
> edi=000879f8
> ebp=001079b4 esp=001079ac program=C:\DETECT~1\SOURCE\ISO\EX0.EXE
> cs: sel=00a7 base=828e3000 limit=00b4ffff
> ds: sel=00af base=828e3000 limit=00b4ffff
> es: sel=00af base=828e3000 limit=00b4ffff
> fs: sel=00bf base=00000000 limit=0010ffff
> gs: sel=00bf base=00000000 limit=0010ffff
> ss: sel=00af base=828e3000 limit=00b4ffff
> App stack: [001079f8..000879f8] Exceptn stack: [000878d0..00085990]
>
> Call frame traceback EIPs:
> 0x0000504a _add_sprite_to_end+46, line 46 of spr_list.c
> 0x00002d6a _main+5962, line 144 of ex0.c
> 0x00032426 ___crt1_startup+174
- Raw text -