delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/06/01/15:48:05

From: "S.Turner" <sturner AT notformail DOT nul>
Subject: HELP -- how do I fix this?
Newsgroups: comp.os.msdos.djgpp
Message-ID: <3cf83647$1_4@news.meganetnews.com>
Date: 31 May 2002 21:49:43 -0500
Lines: 57
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

HELP -- how do I start to TRY  to fix this?

Environment: Pentium III at 866mhz, WinME, 512MB RAM, gcc v2.952, rhide 1.4.9, 
etc.

I've been working on this program of mine for quite some time and I recently 
tried to
add a new variable.  I say 'tried' because, as it turns out, no matter what I 
did the
program would crash.

Rhide says: "Program has received signal: SIGSEGV, Segmentation fault"

So, I reverted back to a know working back up of the source code and have come 
to find
out that if I step through the program one line at a time (using RHIDE) that-- 
well, 
according to RHIDE, the program executes lines of code out of order.

Perhaps they are being executed in order but that's not what RHIDE shows.  
Instead of
showing execution of lines (for example) 1 thru 10 it will execute lines 
3,1,2,3,7,8,6,10.

I have tried simply stepping through the program from the very beginning and it 
will
-start- at, say, line 3.

I have also noticed that as I step through code many of my variables will 
change from
step to step even though they are not being manipulated anywhere near where I'm 
at in
the code.

The actual crash appears to be coming from a mishandled character array but I 
cannot see
how this is happening with this erratic debugging.

The final oddity is that the .EXE file itself when run at the DOS prompt will 
run to 
completion without any problems.  All of my other programs behave in RHIDE just 
fine.

What I've done so far: checked RHIDE to make sure the optimizations are the 
same as my 
makefile.  Deleted all .O and .EXE files to make sure everything is in sync. 
Updated to
the latest version of RHIDE v1.4.9; I even created new project files. Rebooted, 
restarted,
recompiled, refrained from putting my head through the monitor, etc.

Has anyone seen this before?

Does anyone have any ideas?

Scott

- Raw text -


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