diff options
| author | Erik Kundiman <erik@megapahit.org> | 2025-04-01 09:11:07 +0800 | 
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2025-04-01 09:11:07 +0800 | 
| commit | 15ff3eaea87e658e3606b1e6741b555ef6737524 (patch) | |
| tree | 058ab25f500d98327367d6a7692963cced479d34 | |
| parent | d9153e3456e618def6b74729ce9a7ace093bb14a (diff) | |
| parent | e671cb54fee9cb7b7da39953eb96eabc9151f687 (diff) | |
Merge tag 'Second_Life_Release#e671cb54-2025.03' into 2025.03
| -rw-r--r-- | indra/llcommon/workqueue.cpp | 4 | ||||
| -rw-r--r-- | indra/llui/llcommandmanager.cpp | 2 | ||||
| -rw-r--r-- | indra/llui/llnotifications.cpp | 32 | ||||
| -rw-r--r-- | indra/llui/llnotifications.h | 2 | ||||
| -rw-r--r-- | indra/newview/llappviewer.cpp | 27 | ||||
| -rw-r--r-- | indra/newview/llviewerwindow.cpp | 2 | 
6 files changed, 57 insertions, 12 deletions
| diff --git a/indra/llcommon/workqueue.cpp b/indra/llcommon/workqueue.cpp index dace95aaf2..c8ece616b2 100644 --- a/indra/llcommon/workqueue.cpp +++ b/indra/llcommon/workqueue.cpp @@ -183,12 +183,12 @@ void LL::WorkQueueBase::callWork(const Work& work)      catch (...)      {          // Stash any other kind of uncaught exception to be rethrown by main thread. -        LL_WARNS("LLCoros") << "Capturing uncaught exception in WorkQueueBase " +        LL_WARNS("LLCoros") << "Capturing and rethrowing uncaught exception in WorkQueueBase "              << getKey() << LL_ENDL;          LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop");          main_queue->post( -            // Bind the current exception rethrow it in main loop. +            // Bind the current exception, rethrow it in main loop.              [exc = std::current_exception()]() { std::rethrow_exception(exc); });      }  #endif // else LL_WINDOWS diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp index 03717da80b..b10ec51f18 100644 --- a/indra/llui/llcommandmanager.cpp +++ b/indra/llui/llcommandmanager.cpp @@ -170,12 +170,14 @@ bool LLCommandManager::load()      if (!parser.readXUI(commands_file, commandsParams))      { +        LLError::LLUserWarningMsg::showMissingFiles();          LL_ERRS() << "Unable to load xml file: " << commands_file << LL_ENDL;          return false;      }      if (!commandsParams.validateBlock())      { +        LLError::LLUserWarningMsg::showMissingFiles();          LL_ERRS() << "Invalid commands file: " << commands_file << LL_ENDL;          return false;      } diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 6fc9b90fb8..a05feab1d9 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -614,6 +614,13 @@ void LLNotification::cancel()  LLSD LLNotification::getResponseTemplate(EResponseTemplateType type)  {      LLSD response = LLSD::emptyMap(); + +    if (!mForm) +    { +        LL_WARNS("Notifications") << "Null form when getting response template for notification " << getName() << LL_ENDL; +        return response; +    } +      for (S32 element_idx = 0;          element_idx < mForm->getNumElements();          ++element_idx) @@ -1249,10 +1256,26 @@ LLNotifications::LLNotifications()      LLInstanceTracker<LLNotificationChannel, std::string>::instanceCount();  } + +LLNotifications::~LLNotifications() +{ +    // Clear explicitly, something in ~LLNotifications() crashes so narrowing down suspects +    pHistoryChannel = nullptr; +    pExpirationChannel = nullptr; +    mGlobalStrings.clear(); +    mTemplates.clear(); +    mVisibilityRules.clear(); +    mUniqueNotifications.clear(); +    mListener = nullptr; +} +  void LLNotifications::clear()  {      mDefaultChannels.clear(); -    mTemplates.clear(); +    // At this point mTemplates still gets used by lingering notifications +    // to do responses (ex: group notice will call forceResponse()), but +    // since network should be down and everything save, it's questionable +    // whether it should stay that way  }  // The expiration channel gets all notifications that are cancelled @@ -1465,6 +1488,13 @@ bool LLNotifications::templateExists(std::string_view name)  void LLNotifications::forceResponse(const LLNotification::Params& params, S32 option)  {      LLNotificationPtr temp_notify(new LLNotification(params)); + +    if (!temp_notify->getForm()) +    { +        LL_WARNS("Notifications") << "Cannot force response for notification with null form: " << (std::string)params.name << LL_ENDL; +        return; +    } +      LLSD response = temp_notify->getResponseTemplate();      LLSD selected_item = temp_notify->getForm()->getElement(option); diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 46286457cf..138f1969d5 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -887,7 +887,7 @@ class LLNotifications :  {      LLSINGLETON(LLNotifications);      LOG_CLASS(LLNotifications); -    virtual ~LLNotifications() {} +    virtual ~LLNotifications();  public: diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b9632242c6..c5190fe486 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5261,15 +5261,28 @@ void LLAppViewer::sendLogoutRequest()          gLogoutInProgress = true;          if (!mSecondInstance)          { -            mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,LOGOUT_MARKER_FILE_NAME); - -            mLogoutMarkerFile.open(mLogoutMarkerFileName, LL_APR_WB); -            if (mLogoutMarkerFile.getFileHandle()) +            mLogoutMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, LOGOUT_MARKER_FILE_NAME); +            try              { -                LL_INFOS("MarkerFile") << "Created logout marker file '"<< mLogoutMarkerFileName << "' " << LL_ENDL; -                recordMarkerVersion(mLogoutMarkerFile); +                if (!mLogoutMarkerFile.getFileHandle()) +                { +                    mLogoutMarkerFile.open(mLogoutMarkerFileName, LL_APR_WB); +                    if (mLogoutMarkerFile.getFileHandle()) +                    { +                        LL_INFOS("MarkerFile") << "Created logout marker file '" << mLogoutMarkerFileName << "' " << LL_ENDL; +                        recordMarkerVersion(mLogoutMarkerFile); +                    } +                    else +                    { +                        LL_WARNS("MarkerFile") << "Cannot create logout marker file " << mLogoutMarkerFileName << LL_ENDL; +                    } +                } +                else +                { +                    LL_WARNS("MarkerFile") << "Atempted to reopen file '" << mLogoutMarkerFileName << "' " << LL_ENDL; +                }              } -            else +            catch (...)              {                  LL_WARNS("MarkerFile") << "Cannot create logout marker file " << mLogoutMarkerFileName << LL_ENDL;              } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 7268764f64..ef6409c23b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1457,7 +1457,7 @@ void LLViewerWindow::handleMouseLeave(LLWindow *window)  bool LLViewerWindow::handleCloseRequest(LLWindow *window)  { -    if (!LLApp::isExiting()) +    if (!LLApp::isExiting() && !LLApp::isStopped())      {          // User has indicated they want to close, but we may need to ask          // about modified documents. | 
