From: "Charles Sandmann" Newsgroups: comp.os.msdos.djgpp Subject: Re: The weirdest DJGPP problem ever! Date: Wed, 16 Feb 2000 21:49:25 Organization: Aspen Technology, Inc. Lines: 13 Message-ID: <38ab1b65.sandmann@clio.rice.edu> References: <088b971d DOT 945bf52a AT usw-ex0101-008 DOT remarq DOT com> NNTP-Posting-Host: dcloan.aco.aspentech.com X-NewsEditor: ED-1.5.8 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > lets say I am at DOS prompt (not DOSBOX in windows) > and I try to run fractal.exe, it reportst a page fault and > exits.. now, if I first execute the edit program and edit any > file (ei. edit foo.txt), even if i dont modify the file, and > then exit edit and run fractal.exe again it runs perfectly > without reporting erros.. any guesses as to what is causing this. Uninitialized variables. Set the crt0 flag to zero (or deadbeef) memory and you will see reproducible behavior. When it crashes use symify to identify where you are picking up a bad pointer - probably with an index from uninitialized memory (malloc'ed or the stack). Running the previous program leaves different garbage in the memory.