Sender: nate AT cartsys DOT com Message-ID: <362E7C5D.CBB0BB2E@cartsys.com> Date: Wed, 21 Oct 1998 17:29:17 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.05 [en] (X11; I; Linux 2.0.35 i486) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: GPFs when running without Rhide (or something like it) References: <19981019 DOT 225610 DOT 3846 DOT 0 DOT matthew DOT krause AT juno DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com matthew DOT krause AT juno DOT com wrote: > > Okay, I had thought it was some kind of subtle bug in my code (Thanks > Eli!) Anyone care to find it. I modified the code, but i can't remember > how (bad form, I know). But the program now crashes under Rhide, but not > when its run without Rhide. Still, the blasted bug is still there > somewhere. Anyone care to help me find it? Please! I'm kinda new at this > still. > Thanks > > Here's my code: > #include > #include > > #include "allegro.h" > #include "fog.h" > > int main(int argc, char *argv[]) > { > DATAFILE *datafile; > > allegro_init(); > //install_timer(); > //install_mouse(); > install_keyboard(); > set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0); You should check these for success; if they fail, future Allegro functions may crash. > fixup_datafile(datafile); > datafile = load_datafile("fog.dat"); //From previous// `datafile' is an uninitialized pointer. You probably mean to use `data' from "fog.h". Also, why load the datafile if it's compiled in? You might want to read GRABBER.TXT for more info on using compiled datafiles; what you've got is rather shaky. -- Nate Eldredge nate AT cartsys DOT com