From 4ebba5b91845b7cccd3af697da3fd71fb0779ab5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 2 Sep 2020 09:22:46 +0300 Subject: SL-13891 Coroutine creation was requested on exit --- indra/newview/llcompilequeue.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/newview/llcompilequeue.cpp') diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp index 76e16f5a1f..3aaaaf52f5 100644 --- a/indra/newview/llcompilequeue.cpp +++ b/indra/newview/llcompilequeue.cpp @@ -347,6 +347,13 @@ void LLFloaterCompileQueue::processExperienceIdResults(LLSD result, LLUUID paren bool LLFloaterCompileQueue::processScript(LLHandle hfloater, const LLPointer &object, LLInventoryObject* inventory, LLEventPump &pump) { + if (LLApp::isQuitting()) + { + // Reply from coroutine came on shutdown + // We are quiting, don't start any more coroutines! + return true; + } + LLSD result; LLCheckedHandle floater(hfloater); // Dereferencing floater may fail. If they do they throw LLExeceptionStaleHandle. @@ -381,6 +388,8 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSDMap("timeout", LLSD::Boolean(true))); + floater.check(); + if (result.has("timeout")) { // A timeout filed in the result will always be true if present. LLStringUtil::format_map_t args; @@ -404,6 +413,12 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat } + if (!gAssetStorage) + { + // viewer likely is shutting down + return true; + } + { HandleScriptUserData userData(pump.getName()); @@ -468,6 +483,8 @@ bool LLFloaterCompileQueue::processScript(LLHandle hfloat result = llcoro::suspendUntilEventOnWithTimeout(pump, fetch_timeout, LLSDMap("timeout", LLSD::Boolean(true))); + floater.check(); + if (result.has("timeout")) { // A timeout filed in the result will always be true if present. LLStringUtil::format_map_t args; @@ -797,6 +814,7 @@ void LLFloaterScriptQueue::objectScriptProcessingQueueCoro(std::string action, L // but offers no guarantee of doing so. llcoro::suspend(); } + floater.check(); } floater->addStringMessage("Done"); -- cgit v1.2.3