Mail Archives: djgpp/1997/10/22/02:32:42
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 -