overte-AleziaKurdis/libraries
Anthony Thibault 6c66f5a37b Fix for DependencyManager crash on shutdown on Mac
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.
2019-07-01 17:37:57 -07:00
..
animation
audio
audio-client
auto-updater
avatars
avatars-renderer
baking Fix for DependencyManager crash on shutdown on Mac 2019-07-01 17:37:57 -07:00
controllers
display-plugins fixed color banding on rift 2019-06-26 09:29:06 -07:00
embedded-webserver
entities Doc review 2019-06-28 17:05:36 +12:00
entities-renderer Fix for DependencyManager crash on shutdown on Mac 2019-07-01 17:37:57 -07:00
fbx
gl
gpu
gpu-gl
gpu-gl-common
gpu-gles
graphics move bias init from config to run 2019-06-26 15:42:11 -07:00
graphics-scripting
hfm
image
input-plugins
ktx
material-networking Fix for DependencyManager crash on shutdown on Mac 2019-07-01 17:37:57 -07:00
midi
model-baker Fix for DependencyManager crash on shutdown on Mac 2019-07-01 17:37:57 -07:00
model-networking
networking Fix for DependencyManager crash on shutdown on Mac 2019-07-01 17:37:57 -07:00
octree Merge branch 'master' into DOC-79 2019-06-22 12:11:22 +12:00
oculusMobile
oculusMobilePlugin
physics Doc review 2019-06-28 17:05:36 +12:00
platform cr feedback 2019-07-01 15:23:00 -07:00
plugins
pointers
procedural
qml Disable remote QML unless whitelisted 2019-06-27 16:37:56 -07:00
recording
render fix layered rendering of group culled sub items 2019-06-28 14:24:33 -07:00
render-utils clang braces fix 2019-06-27 11:52:43 -07:00
script-engine Fix for DependencyManager crash on shutdown on Mac 2019-07-01 17:37:57 -07:00
shaders
shared more correct bounding sphere around avatar for SafeLanding query 2019-07-01 15:53:42 -07:00
task
test-utils
trackers
ui
ui-plugins
workload