Mail Archives: djgpp/1999/11/03/23:47:41
From: | Antti =?iso-8859-1?Q?Koskip=E4=E4?= <antti DOT koskipaa AT nic DOT fi>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: #PF, #PF, #PF... Aargh, HELP!!!
|
Date: | Wed, 03 Nov 1999 18:46:24 +0200
|
Organization: | NIC Tietoverkot Oy / NIC Data Networks Ltd.
|
Message-ID: | <382066E0.E9014406@nic.fi>
|
References: | <381F5DB6 DOT 24AE721D AT nic DOT fi>
|
NNTP-Posting-Host: | cvx-1-59.dyn.nic.fi
|
Mime-Version: | 1.0
|
X-Trace: | Uutiset.nic.fi 941643927 5969 212.38.225.59 (3 Nov 1999 15:45:27 GMT)
|
X-Complaints-To: | news AT Uutiset DOT nic DOT fi
|
NNTP-Posting-Date: | 3 Nov 1999 15:45:27 GMT
|
X-Mailer: | Mozilla 4.6 [en] (Win95; I)
|
X-Accept-Language: | en
|
Lines: | 64
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Whoops, I knew I forgot something... Here's the traceback:
Exiting due to signal SIGSEGV
Page fault at eip=0000163e, error=0006
eax=00000000 ebx=00259040 ecx=00000000 edx=00000003 esi=00000054
edi=00214d68
ebp=00254d40 esp=00254d38 cs=00a7 ds=00af es=00af fs=008f gs=00bf
ss=00af
Call frame traceback EIPs:
0x0000163e _main+34, line 47 of main.c
0x00017dd7 ___crt1_startup+115
c:\djgpp\bin\commdoom>symify -o tracebak.dmp cdoom.exe
The instruction at 0x163e is a NOP.
Antti Koskipää wrote:
>
> I came across an interesting bug in my program.
>
> Piece of code from the main program:
>
> init ();
> playmidi (23);
> init_graphics ();
>
> This executes always in the beginning. The game loads itself
> succesfully,
> generates all tables, etc.
> All is fine until it hits the address 0x163e. Page Fault.
>
> I first run symify to check where it crashes. Ok. playmidi(23). I always
> check
> with fsdb what kind of instruction in at the address. It was a CALL.
> Then I comment out the call (in the C code) and try again. Now it
> crashes
> when it calls init_graphics. Again re-check. Again the CALL instruction,
> and at the same address 0x163e. (of course it is, since the previous
> call is out
> of the way) So this is not a problem with a corrupted function or
> function
> address. Next, I insert a few inline NOPs before init_graphics to be
> placed
> at the address 0x163e. Compile. Run. THE NOP CAUSES A PAGE FAULT!?
> What the h***???
>
> HELP! I'm frustrated!
>
> This program worked a long time ago... The only thing that is changed
> is my binutils... it's 2.9.1. It did work with 2.8.1... In the
> beginning...
> At a later time, it didn't anymore. I'm using PGCC 1.0.1 and no
> optimizations
> nor special flags. OS: MS-DOS 7.10.
> I tried under both CWSDPMI and CWSDPR0, no success. Under W95, no
> success.
>
> I have used djgpp for years now, and I've never seen such things happen.
>
> --
> - Antti
--
- Antti
- Raw text -