History

EntityScriptServer should wait for script engine to finish when stopping

Script engine will still running and using EntityEditPacketSender, which is owned by EntityScriptServer, which was destroyed. https://highfidelity.manuscript.com/f/cases/11071/

Simon Walton committed 8 years ago

Commit d67044f1 parent db2b79f1 file · +1 −0Browse files

Showing the changes to assignment-client/src/scripts/EntityScriptServer.cpp (1 of 1 file). Show all

Unified · Split

assignment-client/src/scripts/EntityScriptServer.cpp+1−0
@@ -476,6 +476,7 @@ void EntityScriptServer::clear() { · 475 unmodified lines
476 // do this here (instead of in deleter) to avoid marshalling unload signals back to this thread476 // do this here (instead of in deleter) to avoid marshalling unload signals back to this thread
477 _entitiesScriptEngine->unloadAllEntityScripts();477 _entitiesScriptEngine->unloadAllEntityScripts();
478 _entitiesScriptEngine->stop();478 _entitiesScriptEngine->stop();
479 _entitiesScriptEngine->waitTillDoneRunning();
479 }480 }
480 481
481 _entityViewer.clear();482 _entityViewer.clear();