widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #14817
[Merge] lp:~widelands-dev/widelands/bug-1794924-logger-assert into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1794924-logger-assert into lp:widelands.
Commit message:
Use std::cout for logging when calling terminate on shutdown, because the logger might not exist any more.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #1794924 in widelands: "Assertion "logger != nullptr failed on shutdown"
https://bugs.launchpad.net/widelands/+bug/1794924
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1794924-logger-assert/+merge/355823
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1794924-logger-assert into lp:widelands.
=== modified file 'src/wlapplication.cc'
--- src/wlapplication.cc 2018-09-24 08:35:06 +0000
+++ src/wlapplication.cc 2018-09-28 09:31:40 +0000
@@ -103,8 +103,9 @@
*/
#ifndef _WIN32
void terminate(int) {
- log("Waited 5 seconds to close audio. There are some problems here, so killing Widelands."
- " Update your sound driver and/or SDL to fix this problem\n");
+ // The logger can already be shut down, so we use cout
+ std::cout << "Waited 5 seconds to close audio. There are some problems here, so killing Widelands."
+ " Update your sound driver and/or SDL to fix this problem\n";
raise(SIGKILL);
}
#endif
Follow ups