Showing with 153 additions and 124 deletions.
  1. +12 −1 src/app/main.cpp
  2. +85 −85 src/core/qgsapplication.cpp
  3. +20 −18 src/core/qgsapplication.h
  4. +1 −1 src/core/qgsgeometryvalidator.h
  5. +3 −3 src/core/qgslogger.cpp
  6. +32 −16 src/providers/grass/qgsgrass.cpp
13 changes: 12 additions & 1 deletion src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ typedef SInt32 SRefCon;
#include "qgsrectangle.h"
#include "qgslogger.h"

#if defined(linux)
#include <execinfo.h>
#endif

// (if Windows/Mac, use icon from resource)
#if ! defined(Q_WS_WIN) && ! defined(Q_WS_MAC)
#include "../../images/themes/default/qgis.xpm" // Linux
Expand Down Expand Up @@ -182,8 +186,15 @@ void myMessageOutput( QtMsgType type, const char *msg )

break;
case QtFatalMsg:
fprintf( stderr, "Fatal: %s\n", msg );
{
fprintf( stderr, "Fatal: %s\nStacktrace (run through c++filt):\n", msg );
#ifdef linux
void *buffer[256];
int nptrs = backtrace( buffer, sizeof( buffer ) / sizeof( *buffer ) );
backtrace_symbols_fd( buffer, nptrs, STDERR_FILENO );
#endif
abort(); // deliberately core dump
}
}
}

Expand Down
Loading