Xref: news2.mv.net comp.os.msdos.djgpp:2330 From: malcolm AT manawatu DOT gen DOT nz (Malcolm Taylor) Newsgroups: comp.os.msdos.djgpp Subject: Re: Bug hides with GDB. Date: Sun, 31 Mar 1996 22:18:12 GMT Organization: Grafik Software Lines: 21 Message-ID: <4jn09q$hqk@news.manawatu.gen.nz> References: <4iqeht$c1t AT news DOT manawatu DOT gen DOT nz> <4is391$obf AT mark DOT ucdavis DOT edu> <31532ad9 DOT sandmann AT clio DOT rice DOT edu> Reply-To: malcolm AT manawatu DOT gen DOT nz NNTP-Posting-Host: malcolm.manawatu.gen.nz Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Charles Sandmann wrote: >> Usually the physical addresses change, which means the content of >> uninitialized variables change. >Exactly. Try building the app with the crt0.h flag for memory zeroing >enabled - and see if the behavior becomes consistent. The deadbeef flag >is particularly effective in flushing out bugs. I have managed to fix the problem, there was a fault in the text file being read in. I will be putting checks in to deal with this (and give an appropriate error message). However the interesting thing is I still don't know why it worked under the debugger. It seems that it should not have worked in either case. I will be looking into this further (in case it illuminates a problem with fgetpos or ftell (although I don't expect that) and if I find anything out of the ordinary I'll post something. Thanks, Malcolm