mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 22:33:04 +02:00
On Mac, it is possible to crash when shutting down, it is not clear if this is due to shutting down the app on another thread during logout or something that can happen during normal shutdown, because it is so difficult to reproduce. However, from looking at the stack traces it is possible for a [NSApplication terminate:] event to get processed while Appliction::aboutToQuit() is calling ScriptEngine::waitTillDoneRunning() This causes AppKit to invoke the static destructors too early. Which in turn, causes the DependencyManager destructor to fire while there are still many dependencies running. Unfortunatly, the order of destruction is not determinstic, causing them to get shutdown in an incorrect order. To workaround this, we delay the call to QCoreApplication::processEvents() as late as possible, in the Application destructor. Theoretically, this will be a safe time for the static destructors to be invoked, because it is after all of the DependencyManager's dependencies have been manually destroyed. However, this is only a speculative fix, because this is so difficult to reproduce. |
||
---|---|---|
.. | ||
src | ||
CMakeLists.txt |