overte/libraries/script-engine/src
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
..
AbstractScriptingServicesInterface.h
ArrayBufferClass.cpp Workaround crash in reportAdditionalMemoryCost other platforms 2019-06-04 08:56:07 -07:00
ArrayBufferClass.h
ArrayBufferPrototype.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
ArrayBufferPrototype.h
ArrayBufferViewClass.cpp
ArrayBufferViewClass.h
AssetScriptingInterface.cpp Case 19754 - Remove logging URLs and related file locations. 2018-11-06 16:24:32 -08:00
AssetScriptingInterface.h Add "Avatar Script" JSDoc API classification 2019-02-12 11:49:49 +13:00
AudioScriptingInterface.cpp fix script engine shutdown 2019-03-13 12:23:31 -07:00
AudioScriptingInterface.h Doc review 2019-06-28 17:05:36 +12:00
BatchLoader.cpp Case 19754 - Remove logging URLs and related file locations. 2018-11-06 16:24:32 -08:00
BatchLoader.h
ConsoleScriptingInterface.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
ConsoleScriptingInterface.h
DataViewClass.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
DataViewClass.h
DataViewPrototype.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
DataViewPrototype.h
EventTypes.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
EventTypes.h
FileScriptingInterface.cpp Case 19754 - Remove logging URLs and related file locations. 2018-11-06 16:24:32 -08:00
FileScriptingInterface.h Add "Avatar Script" JSDoc API classification 2019-02-12 11:49:49 +13:00
KeyEvent.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
KeyEvent.h
Mat4.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
Mat4.h Distinguish between Mat4 type and Mat4 API in JSDoc 2019-02-27 09:54:11 +13:00
MenuItemProperties.cpp Doc review 2019-04-27 10:20:35 +12:00
MenuItemProperties.h
MIDIEvent.cpp
MIDIEvent.h
ModelScriptingInterface.cpp trying to separate colors and vectors 2018-09-04 17:20:05 -07:00
ModelScriptingInterface.h
MouseEvent.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
MouseEvent.h Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
Quat.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
Quat.h Quat JSDoc update 2019-04-30 12:13:08 +12:00
RecordingScriptingInterface.cpp Consider a NetworkClipLoader resource with null URL to be failed 2019-06-19 15:02:16 -07:00
RecordingScriptingInterface.h Add "Avatar Script" JSDoc API classification 2019-02-12 11:49:49 +13:00
SceneScriptingInterface.cpp
SceneScriptingInterface.h Scene JSDoc 2019-05-08 09:17:11 +12:00
ScriptAudioInjector.cpp fix script engine shutdown 2019-03-13 12:23:31 -07:00
ScriptAudioInjector.h Review updates 2019-04-23 14:35:25 +12:00
ScriptCache.cpp more log purge 2019-01-11 12:34:44 -08:00
ScriptCache.h
ScriptEngine.cpp Fix for DependencyManager crash on shutdown on Mac 2019-07-01 17:37:57 -07:00
ScriptEngine.h Document Entities entity methods 2019-06-22 11:59:07 +12:00
ScriptEngineLogging.cpp more suppression of logging 2018-05-09 13:01:49 -07:00
ScriptEngineLogging.h more suppression of logging 2018-05-09 13:01:49 -07:00
ScriptEngines.cpp This also works 2019-06-21 13:44:31 -07:00
ScriptEngines.h Add "Avatar Script" JSDoc API classification 2019-02-12 11:49:49 +13:00
ScriptsModel.cpp
ScriptsModel.h Add "Avatar Script" JSDoc API classification 2019-02-12 11:49:49 +13:00
ScriptsModelFilter.cpp
ScriptsModelFilter.h Add "Avatar Script" JSDoc API classification 2019-02-12 11:49:49 +13:00
ScriptUUID.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
ScriptUUID.h Polish Uuid API JSDoc 2019-06-05 14:39:27 +12:00
SpatialEvent.cpp trying to separate colors and vectors 2018-09-04 17:20:05 -07:00
SpatialEvent.h
StackTestScriptingInterface.cpp Add automated test tool scripting interface 2018-07-30 17:18:32 -07:00
StackTestScriptingInterface.h Make sure the stack test interface gets cleaned up 2018-08-01 13:29:07 -07:00
TouchEvent.cpp trying to separate colors and vectors 2018-09-04 17:20:05 -07:00
TouchEvent.h s i m p l i f y 2018-08-23 11:47:56 -07:00
TypedArrayPrototype.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
TypedArrayPrototype.h
TypedArrays.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
TypedArrays.h
UsersScriptingInterface.cpp better implementation 2019-03-17 14:00:41 -07:00
UsersScriptingInterface.h Change "privacy bubble" to "privacy shield" 2019-06-06 08:21:22 +12:00
Vec3.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
Vec3.h Polish Vec3 API JSDoc 2019-06-06 10:26:43 +12:00
WebSocketClass.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
WebSocketClass.h
WebSocketServerClass.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
WebSocketServerClass.h
WheelEvent.cpp Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
WheelEvent.h Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
XMLHttpRequestClass.cpp Remove extraneous code changes; remove QUrlAncestry code; remove extra logging 2018-10-22 13:59:52 -07:00
XMLHttpRequestClass.h