delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/25/10:21:32

From: Ian Miller <itmiller AT dra DOT hmg DOT gb>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: strange problem
Date: 25 Mar 1997 11:12:30 +0000
Organization: Defence Research Agency
Message-ID: <rkend4jkdd.fsf@taz.dra.hmg.gb>
References: <33332701 DOT 1A29 AT uit DOT net>
NNTP-Posting-Host: 146.80.115.106
Lines: 32
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Show us the *code*. As you say it is most likely your error and
nobody can tell what you've done without seeing at least your
variable declarations and the while loop in question.

My guess: you read all the values into only the first element of
your array by mistake and therefore have uninitialised nonsense
in the rest of it after the loop has finished.

Chris Larson <clarson AT uit DOT net> writes:

> 
> I'm having a strange problem with DJGPP(most likely my error).  I am
> reading integer and floating point values into a structure from a text
> file.  If I print the variables to the screen while still in the while()
> loop that reads them in (using fscanf()and fseek()) the values print out
> right, but if I print them out after exiting the while() loop they don't
> retain there value(usually = 0). It also does not always work at all but
> will bomb out with the following message. 
> 
> Exiting due to signal SIGSEGV
> General Protection Fault at eip=000087fe
> eax=...
>  
> Call frame traceback EIPs:...
>  
> This is what I get when I run symify.  It doesn't always bomb on the
> same line but generally the traceback is always the same.
> If anyone could help I would really appreciate it.

-- 
Ian Miller, Dorset, UK
DJGPP 2.01, Win95 DOS box (LFN undefined, FNCASE=y)

- Raw text -


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