Mail Archives: djgpp/1998/10/19/21:49:15
Executive Summary/Abstract:
A largish program I have just finished runs only when Rhide is in the
background. If it is not in the background, it GPFs as descibed below.
Here's my tale;
I've written a small program using DJGPP 2.01, Allegro 3.?, and
Binutils 2.8.1 for my Latin class (don't ask, it's a loooong story, but
it is an easy 'A'). It reads a datafile, writes some text to the screen
using textout, waits for a keypress, blits a bitmap, waits for a
keypress, blits a bitmap, waits for a keypress and exits. The program ran
fine.
To make this program eaiser to distribute, I decided to link in
the datafile using dat2s (which converts it to ASM, IIRC). dat2s also
generated a header, I included this in my program. So I set up a project
in Rhide (v1.4 30 Sept 97; needs upgrading, but not the cause of the
problem), and added fog.s to the project. Compiled and linked this with
-O3, -mpentium, and a few other optimisations. Went for a looooooooong
walk(13.7 Mb of ASM plus my own code takes a while, I figured), came
back, and found that my program had been created. Ran it, and it worked.
Yeah!! But it's ~2.4 Mb (too big for a disk), so I decide I'll strip it.
It runs again Yeah!! That's good for ~200 Kb, but it needs to be smaller.
So I run djg (ver 1.06), invoking it using "djp fog.exe". Now the program
runs fine. I exit Rhide, and run my program again. Now it GPFs with:
Shutting down Allegro
Exiting due to signal SIGSEGV
General Protection Fault at eip=00007dd2
eax=00008315 ebx=ff667160 ecx=00000020 edx=8337e17c esi=ff7a7fe0
edi=00228a48
ebp=ff7a7fd4 esp=ff7a7f94 program=D:\DJGPP\LATIN\EXP\FOG.EXE
cs: sel=00a7 base=8315e000 limit=ff7a7fff
ds: sel=00af base=8315e000 limit=ff7a7fff
es: sel=00af base=8315e000 limit=ff7a7fff
fs: sel=00bf base=00000000 limit=ffffffff
gs: sel=00bf base=00000000 limit=ffffffff
ss: sel=00af base=8315e000 limit=ff7a7fff
Call frame traceback EIPs:
0x00007dd2 0x7dd2
0x000293be 0x293be
Now I restart Rhide to look over the code. It looks fine, so I try
running it again. And now it works!!??!! Obviously, I need to distribute
this program without Rhide. Any ideas what is causing this foul-up??
Personally, I am running a P166 with 16 Megs of Ram, Win 95 [Version
4.00.950]. I have been using DJGPP without problems (like this) for 1+
years on and off, so don't think setup is the problem. Any help will be
appreciated!!!
Tia
Matt Krause
Orange, CT USA
___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
or call Juno at (800) 654-JUNO [654-5866]
- Raw text -