summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-03-27 00:45:06 +0200
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-03-27 00:45:06 +0200
commit71ed19839eb95d918329b2c776c8af3b8724f1da (patch)
tree4639de2c088a688bb5c4a77a2763261397d904fd /indra/newview/llappviewer.cpp
parent5ac0b9debc100a5a4d14e9eaad1a6542c927a275 (diff)
parent9567393f803dfb0c786b8e917e41c8f4b8b22af7 (diff)
Merge branch 'main' into DRTVWR-600-maint-A
# Conflicts: # indra/newview/llappviewer.cpp # indra/newview/llfloaterchangeitemthumbnail.cpp # indra/newview/llpanelprofile.cpp # indra/newview/llselectmgr.cpp # indra/newview/lltexturectrl.cpp # indra/newview/lltexturectrl.h # indra/newview/lltooldraganddrop.cpp # indra/newview/llviewerdisplay.cpp # indra/newview/llvovolume.cpp
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp29
1 files changed, 25 insertions, 4 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 8865d53f88..cf0e2ca027 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2252,9 +2252,6 @@ void errorCallback(LLError::ELevel level, const std::string &error_string)
OSMessageBox(error_string, LLTrans::getString("MBFatalError"), OSMB_OK);
#endif
- //Set the ErrorActivated global so we know to create a marker file
- gLLErrorActivated = true;
-
gDebugInfo["FatalMessage"] = error_string;
// We're not already crashing -- we simply *intend* to crash. Since we
// haven't actually trashed anything yet, we can afford to write the whole
@@ -2263,6 +2260,14 @@ void errorCallback(LLError::ELevel level, const std::string &error_string)
}
}
+void errorMSG(const std::string& title_string, const std::string& message_string)
+{
+ if (!message_string.empty())
+ {
+ OSMessageBox(message_string, title_string.empty() ? LLTrans::getString("MBFatalError") : title_string, OSMB_OK);
+ }
+}
+
void LLAppViewer::initLoggingAndGetLastDuration()
{
//
@@ -2274,6 +2279,8 @@ void LLAppViewer::initLoggingAndGetLastDuration()
LLError::addGenericRecorder(&errorCallback);
//LLError::setTimeFunction(getRuntime);
+ LLError::LLUserWarningMsg::setHandler(errorMSG);
+
if (mSecondInstance)
{
@@ -2412,6 +2419,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
{ // failed to load
if(file.required)
{
+ LLError::LLUserWarningMsg::showMissingFiles();
LL_ERRS() << "Error: Cannot load required settings file from: " << full_settings_path << LL_ENDL;
return false;
}
@@ -2510,6 +2518,7 @@ bool LLAppViewer::initConfiguration()
if (!success)
{
LL_WARNS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL;
+ LLError::LLUserWarningMsg::showMissingFiles();
if (gDirUtilp->fileExists(settings_file_list))
{
LL_ERRS() << "Cannot load default configuration file settings_files.xml. "
@@ -2533,6 +2542,7 @@ bool LLAppViewer::initConfiguration()
if (!mSettingsLocationList->validateBlock())
{
+ LLError::LLUserWarningMsg::showMissingFiles();
LL_ERRS() << "Invalid settings file list " << settings_file_list << LL_ENDL;
}
@@ -2967,6 +2977,8 @@ bool LLAppViewer::initConfiguration()
LLEventPumps::instance().obtain("LLControlGroup").post(LLSDMap("init", key));
}
+ LLError::LLUserWarningMsg::setOutOfMemoryStrings(LLTrans::getString("MBOutOfMemoryTitle"), LLTrans::getString("MBOutOfMemoryErr"));
+
return true; // Config was successful.
}
@@ -3004,6 +3016,7 @@ void LLAppViewer::initStrings()
// initial check to make sure files are there failed
gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN);
+ LLError::LLUserWarningMsg::showMissingFiles();
LL_ERRS() << "Viewer failed to find localization and UI files."
<< " Please reinstall viewer from https://secondlife.com/support/downloads"
<< " and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
@@ -3328,7 +3341,6 @@ LLSD LLAppViewer::getViewerInfo() const
info["NET_BANDWITH"] = gSavedSettings.getF32("ThrottleBandwidthKBPS");
info["LOD_FACTOR"] = gSavedSettings.getF32("RenderVolumeLODFactor");
info["RENDER_QUALITY"] = (F32)gSavedSettings.getU32("RenderQualityPerformance");
- info["GPU_SHADERS"] = gSavedSettings.getBOOL("RenderDeferred") ? "Enabled" : "Disabled";
info["TEXTURE_MEMORY"] = gGLManager.mVRAM;
#if LL_DARWIN
@@ -4310,6 +4322,7 @@ void LLAppViewer::loadKeyBindings()
key_bindings_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "key_bindings.xml");
if (!gViewerInput.loadBindingsXML(key_bindings_file))
{
+ LLError::LLUserWarningMsg::showMissingFiles();
LL_ERRS("InitInfo") << "Unable to open default key bindings from " << key_bindings_file << LL_ENDL;
}
}
@@ -5400,6 +5413,14 @@ void LLAppViewer::forceErrorLLError()
LL_ERRS() << "This is a deliberate llerror" << LL_ENDL;
}
+void LLAppViewer::forceErrorLLErrorMsg()
+{
+ LLError::LLUserWarningMsg::show("Deliberate error");
+ // Note: under debug this will show a message as well,
+ // but release won't show anything and will quit silently
+ LL_ERRS() << "This is a deliberate llerror with a message" << LL_ENDL;
+}
+
void LLAppViewer::forceErrorBreakpoint()
{
LL_WARNS() << "Forcing a deliberate breakpoint" << LL_ENDL;