summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp30
1 files changed, 25 insertions, 5 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f094170ff5..6e176183d8 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -362,7 +362,6 @@ BOOL gRandomizeFramerate = FALSE;
BOOL gPeriodicSlowFrame = FALSE;
BOOL gCrashOnStartup = FALSE;
-BOOL gLLErrorActivated = FALSE;
BOOL gLogoutInProgress = FALSE;
BOOL gSimulateMemLeak = FALSE;
@@ -2258,9 +2257,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
@@ -2269,6 +2265,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()
{
//
@@ -2280,6 +2284,8 @@ void LLAppViewer::initLoggingAndGetLastDuration()
LLError::addGenericRecorder(&errorCallback);
//LLError::setTimeFunction(getRuntime);
+ LLError::LLUserWarningMsg::setHandler(errorMSG);
+
if (mSecondInstance)
{
@@ -2417,6 +2423,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;
}
@@ -2515,6 +2522,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. "
@@ -2538,6 +2546,7 @@ bool LLAppViewer::initConfiguration()
if (!mSettingsLocationList->validateBlock())
{
+ LLError::LLUserWarningMsg::showMissingFiles();
LL_ERRS() << "Invalid settings file list " << settings_file_list << LL_ENDL;
}
@@ -2973,6 +2982,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.
}
@@ -3010,6 +3021,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;
@@ -3334,7 +3346,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
@@ -4316,6 +4327,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;
}
}
@@ -5409,6 +5421,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;