diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-07-18 13:59:39 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-07-18 13:59:39 +0800 |
commit | 50755dcf5f6d4c70c6b6815b2467dda61dc4dc5a (patch) | |
tree | 4db99c2b48408390dfffe6b39261311002c5e3ec /indra/newview/llappviewer.cpp | |
parent | 6daacd94d1f53e53417ac24f05b983a2600a964f (diff) | |
parent | f5d350fb7bd51735ab2624262e841d614c6eadd8 (diff) |
Merge tag 'Second_Life_Release#f5d350fb-2025.05-gltf-mesh-import' into 2025.05
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c71c5719af..91232c0bed 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2302,10 +2302,7 @@ void errorCallback(LLError::ELevel level, const std::string &error_string) // Callback for LLError::LLUserWarningMsg void errorHandler(const std::string& title_string, const std::string& message_string, S32 code) { - if (!message_string.empty()) - { - OSMessageBox(message_string, title_string.empty() ? LLTrans::getString("MBFatalError") : title_string, OSMB_OK); - } + // message is going to hang viewer, create marker first switch (code) { case LLError::LLUserWarningMsg::ERROR_OTHER: @@ -2313,6 +2310,10 @@ void errorHandler(const std::string& title_string, const std::string& message_st break; case LLError::LLUserWarningMsg::ERROR_BAD_ALLOC: LLAppViewer::instance()->createErrorMarker(LAST_EXEC_BAD_ALLOC); + // When system run out of memory and errorHandler gets called from a thread, + // main thread might keep going while OSMessageBox freezes the caller. + // Todo: handle it better, but for now disconnect to avoid making things worse + gDisconnected = true; break; case LLError::LLUserWarningMsg::ERROR_MISSING_FILES: LLAppViewer::instance()->createErrorMarker(LAST_EXEC_MISSING_FILES); @@ -2320,6 +2321,10 @@ void errorHandler(const std::string& title_string, const std::string& message_st default: break; } + if (!message_string.empty()) + { + OSMessageBox(message_string, title_string.empty() ? LLTrans::getString("MBFatalError") : title_string, OSMB_OK); + } } void LLAppViewer::initLoggingAndGetLastDuration() |