cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/22/02:32:42

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Absurd error in printf sentences
Date: Tue, 21 Oct 1997 21:03:03 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 46
Message-ID: <344D1887.121F@cs.com>
References: <877455508 DOT 12195 AT dejanews DOT com>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp233.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

joseanmo AT unex DOT es wrote:
> 
> I´ve compiled a program with several printf sentences in standard
> output without any error or warnings, but in execution, before a
> simple printf sentence the program chashes with the next messages:

This isn't enough to identify the problem.  We have to see the code that
caused the crash to have any chance of diagnosing what went wrong. 
Without more information, I don't even know if it's an RHIDE problem or
a bug in your code.

I can suggest a few simple tests:

- Try running your compiled program from the DOS prompt instead of
within RHIDE.
- Look for simple errors, like NULL pointer dereferences or unitialized
pointers.
- Try running the program in Windows (or DOS if you use Windows already)
and see if anything behaves differently (cwsdpmi catches more errors
than Windows' DPMI host).  This generally indicates bad pointers, as
above.
- Make sure to use the full set of compilation switches.  Adding '-O'
and '-Wall' will make the compiler warn you about a great many potential
problems in your code, and the '-g' switch gives you more meaningful
debugging information if and when your program crashes.
- Try to comment out portions of your code until you find the smallest
functioning fragment that still crashes.  The error is likely to be in
this part.

If all else fails, please post the smallest fragment you can that
demonstrates the error, along with the command line (if in DOS) that you
use to compile it, and the _complete_ stack traceback that occurs when
the program crashes.  If you're working in RHIDE, you can use it to
prepare a "bug report" that will also greatly help us to diagnose your
problem.

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |     mailto:fighteer AT cs DOT com     |
| "Starting flamewars since 1993"  |   http://www.cs.com/fighteer   |
|  *** NOTICE ***  This .signature is generated randomly.           |
|                  If you don't like it, sue my computer.           |
---------------------------------------------------------------------

- Raw text -


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