From c7a8b642ef896f8ec647695408db53cf3c9bde47 Mon Sep 17 00:00:00 2001 From: msv Date: Wed, 26 Apr 2006 14:14:07 +0000 Subject: [PATCH] work around PAL12004 "VTK window => SIGFPE Arithmetic Exception Detected" --- src/SalomeApp/SalomeApp_ExceptionHandler.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx index 16b5004ce..6059ff19b 100644 --- a/src/SalomeApp/SalomeApp_ExceptionHandler.cxx +++ b/src/SalomeApp/SalomeApp_ExceptionHandler.cxx @@ -77,5 +77,17 @@ bool SalomeApp_ExceptionHandler::handle( QObject* o, QEvent* e ) /*!Create new SUIT_ExceptionHandler*/ extern "C" SALOMEAPP_EXPORT SUIT_ExceptionHandler* getExceptionHandler() { - return new SalomeApp_ExceptionHandler( true ); + // MSV 2006-04-26: work around PAL12004 "VTK window => SIGFPE Arithmetic Exception Detected" + // We disable FPE signal as it was in earlier versions of SALOME. It is enabled + // only in debug mode if the environment variable DISABLE_FPE is not set to 1. + bool raiseFPE; +#ifdef _DEBUG_ + raiseFPE = true; + char* envDisableFPE = getenv("DISABLE_FPE"); + if (envDisableFPE && atoi(envDisableFPE)) + raiseFPE = false; +#else + raiseFPE = false; +#endif + return new SalomeApp_ExceptionHandler( raiseFPE ); } -- 2.39.2