delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/02/16:37:46

From: Antti =?iso-8859-1?Q?Koskip=E4=E4?= <antti DOT koskipaa AT nic DOT fi>
Newsgroups: comp.os.msdos.djgpp
Subject: #PF, #PF, #PF... Aargh, HELP!!!
Date: Tue, 02 Nov 1999 23:55:02 +0200
Organization: NIC Tietoverkot Oy / NIC Data Networks Ltd.
Lines: 43
Message-ID: <381F5DB6.24AE721D@nic.fi>
NNTP-Posting-Host: cvx-1-92.dyn.nic.fi
Mime-Version: 1.0
X-Trace: Uutiset.nic.fi 941576044 1134 212.38.225.92 (2 Nov 1999 20:54:04 GMT)
X-Complaints-To: news AT Uutiset DOT nic DOT fi
NNTP-Posting-Date: 2 Nov 1999 20:54:04 GMT
X-Mailer: Mozilla 4.6 [en] (Win95; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019