Commit 63513815 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Segmentation fault is probably worth catching.

parent 850c8b21
......@@ -53,8 +53,12 @@ CrashHandler::CrashHandler( int sig, QWidget *parent ) :
QString sigName = tr( "Unknown signal" );
if ( sig == SIGSEGV )
sigName = "SIGSEGV (Segmentation Fault)";
if ( sig == SIGFPE )
else if ( sig == SIGFPE )
sigName = "SIGFPE (Floating Exception)";
else if ( sig == SIGABRT )
sigName = "SIGABRT (Aborted)";
else if ( sig == SIGILL )
sigName = "SIGILL (Illegal Instruction)";
else
sigName = "Unknown";
ui->crashDescriptionLabel->setText( tr("A crash occured. Signal received: ") + sigName );
......
......@@ -57,8 +57,7 @@ ProjectManager::ProjectManager() : m_projectFile( NULL ), m_needSave( false )
const SettingValue* val = SettingsManager::getInstance()->getValue( "project", "ProjectName");
connect( val, SIGNAL( changed( QVariant) ), this, SLOT(nameChanged(QVariant) ) );
m_projectName = tr( "<Unsaved project>" );
// signal( SIGSEGV, ProjectManager::signalHandler );
// signal( SIGINT, SIG_IGN );
signal( SIGSEGV, ProjectManager::signalHandler );
signal( SIGFPE, ProjectManager::signalHandler );
signal( SIGABRT, ProjectManager::signalHandler );
signal( SIGILL, ProjectManager::signalHandler );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment