mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 10:23:52 +00:00
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.
This commit is contained in:
parent
5b8fd79b4b
commit
debce0fb80
1 changed files with 4 additions and 3 deletions
|
@ -382,16 +382,17 @@ static void crash_handler(const char *logfile)
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
if(crash_info.pid > 0)
|
if(crash_info.pid > 0)
|
||||||
{
|
|
||||||
gdb_info(crash_info.pid);
|
gdb_info(crash_info.pid);
|
||||||
kill(crash_info.pid, SIGKILL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(logfile)
|
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 !";
|
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);
|
SDL_ShowSimpleMessageBox(0, "Fatal Error", message.c_str(), NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (crash_info.pid > 0)
|
||||||
|
kill(crash_info.pid, SIGKILL);
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue