Re: Divide by zero, app does NOT crash?
Posted in 1998
This isn't going to help very much, but assuming that you are using a UNIX environment, divide by zero is "cacheable" and is being caught appropriately. (I believe that most other environments support this, too.) See the man pages for signal() for details on what can be caught, but in short, only a 9 (SIGKILL) cannot be caught or trapped. I would presume that the error is being generated by the forms handler, given the nature of the message. There is a generic divide by zero message with the same number (-1202), so this is almost certainly being generated within the app's screen handling code. Absent the debugger, try tailing the error log file and running through the app. That should at least tell you approximately where the error is occurring. From there you can deduce what you need to look at. HTH, David afalout@ihug.co.nz (Andrej Falout) on 12/06/98 11:51:14 PM Please respond to afalout@ihug.co.nz (Andrej Falout) To: informix-list@iiug.org cc: (bcc: David Coburn/ISG/WVUS/WorldVision) Subject: Divide by zero, app does NOT crash? Dear all, I guess that not very often you see someone complaining about app not crashing, but... My client have an 4gl app, c-compiled, some external c functions. Error log is full of entries like this: FORMS statement error number -1202. An attempt was made to divide by zero. No line number, no sourcefile name. I was expecting that divide by zero will unconditionally stop the app, but, it seems that this is not the case. There are at least 50 entries like that a day, and I am unable to trace them. Is it possible that this error can be the result of the SQL statement that is trying to divide by zero, and because it happens in the engine, it does not kill the app? And most of all, how to trace this, if the app does not crash? BTW, no debugger there. TIA, Andrej #include<std.disclaimer.h> **************************************************************** * Andrej Falout, RDBMS R&D, Croatia, Europe, afalout@zg.tel.hr * * ICQ: 7628616 http://wwp.mirabilis.com/7628616 * *--------------------------------------------------------------* * "To develop with a 4GL, the developer does not have to be an * * expert programmer." - John McNally, "Informix Unleashed" * **************************************************************** Last seen: Eating Kiwis down under (AKA afalout@ihug.co.nz)