Subject: Problem with some code

From: "Sean Wall, x3736" <[email-masked]>
Date: Wed, 3 Mar 93 08:28:45 EST

Hi everyone,

        Well, I'm ready to pull my hair out!  I've got this weird
problem with a program I've been developing and I was wondering
if anyone out there in net-land could help.
        I've been developing an application with REND386 and I'm 
experiencing strange crashes.  The code I've developed uses extensive
floating point.  I'm compiling under Turbo C++ release 2.0 and I'm
NOT using the floating point emulation libraries (i.e. - I've set
the compiler option to use 80287 fp instructions).  Now here's what happens.  
The code runs fine for a couple of seconds (I know this because I use 
popmsg() to put a string containing the current computed values) then
the program exits without unhooking any interrupts.  In fact, the 
graphics image remains on the screen and I have to blind type 
'MODE CO80' to get back to text mode. I had mixed results running under
Turbo Debugger, but I was able to repeat the error, which TD responded
to by switching to text mode and popping up a window claiming
'exit code 3'.  I'm aware this means irregular program exit, but can
I trap these irregular exits?  (I'm not that familiar with the TC libs!)

                Thanks in advance,
                     Sean

                  ([email-masked])

P.S. - BTW, I am compiling using the large memory model and I'm trapping
       math errors with matherr() and divide by zeros with signal().  I
       coded them to use popmsg() to flag errors to the screen.  I
       suspect the problem may not be floating point related, but may
       be related to the memory model or possibly stack problems.