Floating point exceptions with bzflag

Stephen Montgomery-Smith stephen at math.missouri.edu
Sun Apr 17 13:29:20 PDT 2005


Dear Chuck,

I am really enjoying the games/bzflag port.  But every so often it 
crashes with a floating point exception.  My guess is that the other 
operating systems simply ignore them.

The following (band aid) patch seems to fix the problem:

--- src/bzflag/playing.cxx-orig	Tue Mar  8 15:03:12 2005
+++ src/bzflag/playing.cxx	Sun Apr 17 10:12:31 2005
@@ -5911,6 +5911,7 @@

    // catch kill signals before changing video mode so we can
    // put it back even if we die.  ignore a few signals.
+  bzSignal(SIGFPE, SIG_IGN);
    bzSignal(SIGILL, SIG_PF(dying));
    bzSignal(SIGABRT, SIG_PF(dying));
    bzSignal(SIGSEGV, SIG_PF(dying));

-------------- next part --------------
--- src/bzflag/playing.cxx-orig	Tue Mar  8 15:03:12 2005
+++ src/bzflag/playing.cxx	Sun Apr 17 10:12:31 2005
@@ -5911,6 +5911,7 @@
 
   // catch kill signals before changing video mode so we can
   // put it back even if we die.  ignore a few signals.
+  bzSignal(SIGFPE, SIG_IGN);
   bzSignal(SIGILL, SIG_PF(dying));
   bzSignal(SIGABRT, SIG_PF(dying));
   bzSignal(SIGSEGV, SIG_PF(dying));


More information about the freebsd-ports mailing list