crashcatcher: show the message box before killing crashed process

This change fixes a random X server lock-up that I get about 1 in 10 times when a crash is caught. I'm presuming it's an X server bug since faulty applications shouldn't be able to crash or freeze the X server under any circumstances.
openmw-38
scrawl 9 years ago
parent 5b8fd79b4b
commit debce0fb80

@ -382,16 +382,17 @@ static void crash_handler(const char *logfile)
fflush(stdout);
if(crash_info.pid > 0)
{
gdb_info(crash_info.pid);
kill(crash_info.pid, SIGKILL);
}
if(logfile)
{
std::string message = "OpenMW has encountered a fatal error.\nCrash log saved to '" + std::string(logfile) + "'.\n Please report this to https://bugs.openmw.org !";
SDL_ShowSimpleMessageBox(0, "Fatal Error", message.c_str(), NULL);
}
if (crash_info.pid > 0)
kill(crash_info.pid, SIGKILL);
exit(0);
}

Loading…
Cancel
Save