diff --git a/apps/openmw/crashcatcher.cpp b/apps/openmw/crashcatcher.cpp index 8d812efd3..0b4ff6304 100644 --- a/apps/openmw/crashcatcher.cpp +++ b/apps/openmw/crashcatcher.cpp @@ -382,7 +382,15 @@ static void crash_handler(const char *logfile) fflush(stdout); if(crash_info.pid > 0) + { gdb_info(crash_info.pid); + kill(crash_info.pid, SIGKILL); + } + + // delay between killing of the crashed process and showing the message box to + // work around occasional X server lock-up. this can only be a bug in X11 since + // even faulty applications shouldn't be able to freeze the X server. + usleep(100000); if(logfile) { @@ -390,9 +398,6 @@ static void crash_handler(const char *logfile) SDL_ShowSimpleMessageBox(0, "Fatal Error", message.c_str(), NULL); } - if (crash_info.pid > 0) - kill(crash_info.pid, SIGKILL); - exit(0); }