From 8eb015666e0224574013d1338ddaf70a19355e5e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Thu, 11 Sep 2025 20:38:09 +0300 Subject: #4651 Handle window's sessions termination --- indra/newview/llappviewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ac9464d86e..b36ed46a39 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4195,7 +4195,7 @@ void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions) // case where we need the viewer to exit without any need for notifications void LLAppViewer::earlyExitNoNotify() { - LL_WARNS() << "app_early_exit with no notification: " << LL_ENDL; + LL_WARNS() << "app_early_exit with no notification." << LL_ENDL; gDoDisconnect = true; finish_early_exit( LLSD(), LLSD() ); } -- cgit v1.3 From 3b3c85d1f378fdc83c7f613d5ee269b5db0db125 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Sat, 13 Sep 2025 00:06:47 +0300 Subject: #4651 Try distinguishing freezes from crashes --- indra/newview/llappviewer.cpp | 9 ++++++++- indra/newview/llappviewerwin32.cpp | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index b36ed46a39..253c1268d3 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3945,8 +3945,15 @@ void LLAppViewer::processMarkerFiles() else if (marker_is_same_version) { // the file existed, is ours, and matched our version, so we can report on what it says - LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found; last exec crashed" << LL_ENDL; + LL_INFOS("MarkerFile") << "Exec marker '"<< mMarkerFileName << "' found; last exec crashed or froze" << LL_ENDL; +#if LL_WINDOWS && LL_BUGSPLAT + // bugsplat will set correct state in bugsplatSendLog + // Might be more accurate to rename this one into 'unknown' + gLastExecEvent = LAST_EXEC_FROZE; +#else gLastExecEvent = LAST_EXEC_OTHER_CRASH; +#endif // LL_WINDOWS + } else { diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 8477bd3044..c29c9a4919 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -172,6 +172,18 @@ namespace << '/' << loc.mV[1] << '/' << loc.mV[2]))); } + + if (!LLAppViewer::instance()->isSecondInstance()) + { + std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME); + if (!LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB)) + { + // If marker doesn't exist, create a marker with 'other' code for next launch + // otherwise don't override existing file + // Any unmarked crashes will be considered as freezes + LLAppViewer::instance()->createErrorMarker(LAST_EXEC_OTHER_CRASH); + } + } } // MDSCB_EXCEPTIONCODE return false; -- cgit v1.3 From 892fb2d6e2ffc92636f381d3e817f9c5a71657dc Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Tue, 16 Sep 2025 19:44:45 +0300 Subject: #4651 Fix marker presence check --- indra/newview/llappviewer.cpp | 6 ++++++ indra/newview/llappviewer.h | 1 + indra/newview/llappviewerwin32.cpp | 15 ++++++--------- 3 files changed, 13 insertions(+), 9 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 253c1268d3..62a1aa9fb6 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5403,6 +5403,12 @@ void LLAppViewer::createErrorMarker(eLastExecEvent error_code) const } } +bool LLAppViewer::errorMarkerExists() const +{ + std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME); + return LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB); +} + void LLAppViewer::outOfMemorySoftQuit() { if (!mQuitRequested) diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 24d55a00fe..fdaa14a77d 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -250,6 +250,7 @@ public: // Writes an error code into the error_marker file for use on next startup. void createErrorMarker(eLastExecEvent error_code) const; + bool errorMarkerExists() const; // Attempt a 'soft' quit with disconnect and saving of settings/cache. // Intended to be thread safe. diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index c29c9a4919..929cb8b4d5 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -173,16 +173,13 @@ namespace << '/' << loc.mV[2]))); } - if (!LLAppViewer::instance()->isSecondInstance()) + LLAppViewer* app = LLAppViewer::instance(); + if (!app->isSecondInstance() && !app->errorMarkerExists()) { - std::string error_marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, ERROR_MARKER_FILE_NAME); - if (!LLAPRFile::isExist(error_marker_file, NULL, LL_APR_RB)) - { - // If marker doesn't exist, create a marker with 'other' code for next launch - // otherwise don't override existing file - // Any unmarked crashes will be considered as freezes - LLAppViewer::instance()->createErrorMarker(LAST_EXEC_OTHER_CRASH); - } + // If marker doesn't exist, create a marker with 'other' code for next launch + // otherwise don't override existing file + // Any unmarked crashes will be considered as freezes + app->createErrorMarker(LAST_EXEC_OTHER_CRASH); } } // MDSCB_EXCEPTIONCODE -- cgit v1.3 From e33b5c5e6c8db1759e34db43ea9defc5455ab6c7 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 17 Sep 2025 15:56:08 +0300 Subject: #4432 Change graphics quality via a debug setting --- indra/newview/app_settings/settings.xml | 15 +++++++++++++-- indra/newview/llappviewer.cpp | 1 + indra/newview/llfloaterpreference.cpp | 1 + indra/newview/llviewercontrol.cpp | 18 ++++++++++++++++++ 4 files changed, 33 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index aa6a28f137..e1be629f15 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9111,7 +9111,7 @@ RenderQualityPerformance Comment - Which graphics settings you've chosen + Which graphics settings you've chosen. Don't use this setting to change quality directly from debug settings. Persist 1 Type @@ -9119,7 +9119,18 @@ Value 1 - + DebugQualityPerformance + + Comment + Allows to change performance quality directly from debug settings. + Persist + 1 + Type + U32 + Value + 1 + + RenderReflectionDetail Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 62a1aa9fb6..b7852d8549 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1263,6 +1263,7 @@ bool LLAppViewer::init() LLViewerCamera::createInstance(); LL::GLTFSceneManager::createInstance(); + gSavedSettings.setU32("DebugQualityPerformance", gSavedSettings.getU32("RenderQualityPerformance")); #if LL_WINDOWS if (!mSecondInstance) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 734cc73331..5a39d41478 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1367,6 +1367,7 @@ void LLFloaterPreference::onChangeQuality(const LLSD& data) } mLastQualityLevel = level; LLFeatureManager::getInstance()->setGraphicsLevel(level, true); + gSavedSettings.setU32("DebugQualityPerformance", level); refreshEnabledGraphics(); refresh(); } diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index d39805f4c7..75cc76fee6 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -68,6 +68,8 @@ #include "llrender.h" #include "llnavigationbar.h" #include "llnotificationsutil.h" +#include "llfloaterpreference.h" +#include "llfloaterreg.h" #include "llfloatertools.h" #include "llpaneloutfitsinventory.h" #include "llpanellogin.h" @@ -149,6 +151,21 @@ static bool handleDebugAvatarJointsChanged(const LLSD& newvalue) return true; } +static bool handleDebugQualityPerformanceChanged(const LLSD& newvalue) +{ + // control was set directly or after adjusting Preference setting, no need to update + if (gSavedSettings.getU32("RenderQualityPerformance") != gSavedSettings.getU32("DebugQualityPerformance")) + { + LLFloaterPreference* instance = LLFloaterReg::getTypedInstance("preferences"); + if (instance) + { + gSavedSettings.setU32("RenderQualityPerformance", newvalue.asInteger()); + instance->onChangeQuality(newvalue); + } + } + return true; +} + static bool handleAvatarHoverOffsetChanged(const LLSD& newvalue) { if (isAgentAvatarValid()) @@ -946,6 +963,7 @@ void settings_setup_listeners() setting_setup_signal_listener(gSavedSettings, "SpellCheckDictionary", handleSpellCheckChanged); setting_setup_signal_listener(gSavedSettings, "LoginLocation", handleLoginLocationChanged); setting_setup_signal_listener(gSavedSettings, "DebugAvatarJoints", handleDebugAvatarJointsChanged); + setting_setup_signal_listener(gSavedSettings, "DebugQualityPerformance", handleDebugQualityPerformanceChanged); setting_setup_signal_listener(gSavedSettings, "TargetFPS", handleTargetFPSChanged); setting_setup_signal_listener(gSavedSettings, "AutoTuneFPS", handleAutoTuneFPSChanged); -- cgit v1.3 From 97ff76c420cfaf32e7ad4602506917666129253c Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Wed, 24 Sep 2025 18:10:29 +0300 Subject: #4733 When moving the cache, the old cef_cache should be removed --- indra/llrender/llshadermgr.cpp | 1 + indra/newview/llappviewer.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index 9cdd02f403..e9bbdeead5 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -1048,6 +1048,7 @@ void LLShaderMgr::clearShaderCache() LL_INFOS("ShaderMgr") << "Removing shader cache at " << shader_cache << LL_ENDL; const std::string mask = "*"; gDirUtilp->deleteFilesInDir(shader_cache, mask); + LLFile::rmdir(shader_cache); mShaderBinaryCache.clear(); } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3d2946b8aa..4a4a2bdbb3 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4481,6 +4481,7 @@ void LLAppViewer::purgeCache() LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE); LLVOCache::getInstance()->removeCache(LL_PATH_CACHE); LLViewerShaderMgr::instance()->clearShaderCache(); + purgeCefStaleCaches(); gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE, ""), "*"); } -- cgit v1.3 From 69312e248e65a03fca67dd38b00a84164461269e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Wed, 1 Oct 2025 18:41:01 +0300 Subject: #4768 Crash at retransmitUnackedPackets For some reason there are no logs for these crashes, but lack of connection data indicates that viewer was disconnected prior to crash. --- indra/newview/llappviewer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 442a37e977..eadc5e7e63 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -5553,7 +5553,10 @@ void LLAppViewer::idleNetwork() add(LLStatViewer::NUM_NEW_OBJECTS, gObjectList.mNumNewObjects); // Retransmit unacknowledged packets. - gXferManager->retransmitUnackedPackets(); + if (gXferManager) + { + gXferManager->retransmitUnackedPackets(); + } gAssetStorage->checkForTimeouts(); gViewerThrottle.setBufferLoadRate(gMessageSystem->getBufferLoadRate()); gViewerThrottle.updateDynamicThrottle(); -- cgit v1.3 From 49a850ccc14de253f9645427594f25c74931e4c5 Mon Sep 17 00:00:00 2001 From: RolfKal Date: Wed, 15 Oct 2025 20:00:27 +0200 Subject: Remove a trailing space and a missed LLFile::remove() call right before the LLFile::rename() --- indra/llcommon/llfile.h | 2 +- indra/newview/llappviewer.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h index 0bd6be7f94..9d9c3cd08b 100644 --- a/indra/llcommon/llfile.h +++ b/indra/llcommon/llfile.h @@ -107,7 +107,7 @@ public: /// if you don't want a warning in the log when the directory does not exist /// @returns 0 on success and -1 on failure. - /// rename a file, + /// rename a file static int rename(const std::string& filename, const std::string& newname, int supress_error = 0); ///< it will silently overwrite newname if it exists without returning an error /// @returns 0 on success and -1 on failure. diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index eadc5e7e63..bfd8b1dcc7 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2398,7 +2398,6 @@ void LLAppViewer::initLoggingAndGetLastDuration() if (gDirUtilp->fileExists(user_data_path_cef_log)) { std::string user_data_path_cef_old = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "cef.old"); - LLFile::remove(user_data_path_cef_old, ENOENT); LLFile::rename(user_data_path_cef_log, user_data_path_cef_old); } } -- cgit v1.3