diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-09-29 19:14:50 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-09-29 19:14:50 +0000 |
commit | d725e5b24075b2171f8a5b263969991e9b475078 (patch) | |
tree | f1422064fd0ab676dfa66d39b5d0f0b9e8ff1086 /indra/newview/llappviewer.cpp | |
parent | 66739da16407a8e56accc236bd3996c1963a6bcf (diff) |
QAR-872 Viewer 1.21 RC 3
merge viewer_1-21 96116-97380 -> release
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 52 |
1 files changed, 43 insertions, 9 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 87467e6afa..770fa0ad56 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -665,12 +665,11 @@ bool LLAppViewer::init() LLUIImageList::getInstance(), ui_audio_callback, &LLUI::sGLScaleFactor); - LLWeb::initClass(); // do this after LLUI LLTextEditor::setURLCallbacks(&LLWeb::loadURL, &LLURLDispatcher::dispatchFromTextEditor, &LLURLDispatcher::dispatchFromTextEditor); - + LLUICtrlFactory::getInstance()->setupPaths(); // update paths with correct language set ///////////////////////////////////////////////// @@ -753,6 +752,8 @@ bool LLAppViewer::init() CreateLCDDebugWindows(); #endif + LLFolderViewItem::initClass(); // SJB: Needs to happen after initWindow(), not sure why but related to fonts + gGLManager.getGLInfo(gDebugInfo); gGLManager.printGLInfoString(); @@ -934,6 +935,7 @@ bool LLAppViewer::mainLoop() LLFastTimer t3(LLFastTimer::FTM_IDLE); idle(); + if (gAres != NULL && gAres->isInitialized()) { pingMainloopTimeout("Main:ServicePump"); LLFastTimer t4(LLFastTimer::FTM_PUMP); @@ -1070,14 +1072,17 @@ bool LLAppViewer::mainLoop() } catch(std::bad_alloc) - { - llwarns << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ; - + { //stop memory leaking simulation if(LLFloaterMemLeak::getInstance()) { LLFloaterMemLeak::getInstance()->stop() ; - } + llwarns << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ; + } + else + { + llerrs << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ; + } } } @@ -1272,6 +1277,7 @@ bool LLAppViewer::cleanup() //LLVolumeMgr::cleanupClass(); LLPrimitive::cleanupVolumeManager(); LLWorldMapView::cleanupClass(); + LLFolderViewItem::cleanupClass(); LLUI::cleanupClass(); // @@ -1471,7 +1477,7 @@ bool LLAppViewer::initLogging() return true; } -void LLAppViewer::loadSettingsFromDirectory(ELLPath path_index, bool set_defaults) +bool LLAppViewer::loadSettingsFromDirectory(ELLPath path_index, bool set_defaults) { for(LLSD::map_iterator itr = mSettingsFileList.beginMap(); itr != mSettingsFileList.endMap(); ++itr) { @@ -1506,13 +1512,24 @@ void LLAppViewer::loadSettingsFromDirectory(ELLPath path_index, bool set_default } if(!gSettings[settings_name]->loadFromFile(full_settings_path, set_defaults)) { - llwarns << "Cannot load " << full_settings_path << " - No settings found." << llendl; + // If attempting to load the default global settings (app_settings/settings.xml) + // fails, the app should error and quit. + if(path_index == LL_PATH_APP_SETTINGS && settings_name == sGlobalSettingsName) + { + llwarns << "Error: Cannot load default settings from: " << full_settings_path << llendl; + return false; + } + else + { + llwarns << "Cannot load " << full_settings_path << " - No settings found." << llendl; + } } else { llinfos << "Loaded settings file " << full_settings_path << llendl; } } + return true; } std::string LLAppViewer::getSettingsFileName(const std::string& file) @@ -1554,7 +1571,19 @@ bool LLAppViewer::initConfiguration() // - load defaults bool set_defaults = true; - loadSettingsFromDirectory(LL_PATH_APP_SETTINGS, set_defaults); + if(!loadSettingsFromDirectory(LL_PATH_APP_SETTINGS, set_defaults)) + { + std::ostringstream msg; + msg << "Second Life could not load its default settings file. \n" + << "The installation may be corrupted. \n"; + + OSMessageBox( + msg.str(), + LLStringUtil::null, + OSMB_OK); + + return false; + } // - set procedural settings gSavedSettings.setString("ClientSettingsFile", @@ -2322,6 +2351,11 @@ void LLAppViewer::handleViewerCrash() { gDebugInfo["CurrentSimHost"] = gAgent.getRegionHost().getHostName(); gDebugInfo["CurrentRegion"] = gAgent.getRegion()->getName(); + + const LLVector3& loc = gAgent.getPositionAgent(); + gDebugInfo["CurrentLocationX"] = loc.mV[0]; + gDebugInfo["CurrentLocationY"] = loc.mV[1]; + gDebugInfo["CurrentLocationZ"] = loc.mV[2]; } if(LLAppViewer::instance()->mMainloopTimeout) |