diff -r 1354210af0d2 -r 15ae39020dd5 indra/newview/llappviewer.cpp --- a/indra/newview/llappviewer.cpp Wed Jul 24 13:54:46 2013 -0700 +++ b/indra/newview/llappviewer.cpp Tue Jul 30 10:27:13 2013 -0400 @@ -685,86 +685,19 @@ llerrs << "Oh no! An instance of LLAppViewer already exists! LLAppViewer is sort of like a singleton." << llendl; } - mDumpPath =""; - // Need to do this initialization before we do anything else, since anything // that touches files should really go through the lldir API gDirUtilp->initAppDirs("SecondLife"); - setupErrorHandling(); - sInstance = this; - gLoggedInTime.stop(); - - LLLoginInstance::instance().setUpdaterService(mUpdater.get()); - LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString()); -} - -LLAppViewer::~LLAppViewer() -{ - delete mSettingsLocationList; - - LLLoginInstance::instance().setUpdaterService(0); - - destroyMainloopTimeout(); - - // If we got to this destructor somehow, the app didn't hang. - removeMarkerFile(); -} - -class LLUITranslationBridge : public LLTranslationBridge -{ -public: - virtual std::string getString(const std::string &xml_desc) - { - return LLTrans::getString(xml_desc); - } -}; - -bool LLAppViewer::init() -{ - // - // Start of the application // // IMPORTANT! Do NOT put anything that will write // into the log files during normal startup until AFTER // we run the "program crashed last time" error handler below. // - LLFastTimer::reset(); - - // initialize LLWearableType translation bridge. - // Memory will be cleaned up in ::cleanupClass() - LLWearableType::initClass(new LLUITranslationBridge()); - - // initialize SSE options - LLVector4a::initClass(); - - //initialize particle index pool - LLVOPartGroup::initClass(); - - // set skin search path to default, will be overridden later - // this allows simple skinned file lookups to work - gDirUtilp->setSkinFolder("default", "en"); - - initLoggingAndGetLastDuration(); + setupErrorHandling(); + sInstance = this; + gLoggedInTime.stop(); - processMarkerFiles(); - - // - // OK to write stuff to logs now, we've now crash reported if necessary - // - - init_default_trans_args(); - - if (!initConfiguration()) - return false; - - LL_INFOS("InitInfo") << "Configuration initialized." << LL_ENDL ; - - //set the max heap size. - initMaxHeapSize() ; - LLCoros::instance().setStackSize(gSavedSettings.getS32("CoroutineStackSize")); - - LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ; // write Google Breakpad minidump files to a per-run dump directory to avoid multiple viewer issues. std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, ""); mDumpPath = logdir; @@ -772,6 +705,71 @@ logdir += gDirUtilp->getDirDelimiter(); setDebugFileNames(logdir); + initLoggingAndGetLastDuration(); + + processMarkerFiles(); + // + // OK to write stuff to logs now, we've now crash reported if necessary + // + + LLLoginInstance::instance().setUpdaterService(mUpdater.get()); + LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString()); +} + +LLAppViewer::~LLAppViewer() +{ + delete mSettingsLocationList; + + LLLoginInstance::instance().setUpdaterService(0); + + destroyMainloopTimeout(); + + // If we got to this destructor somehow, the app didn't hang. + removeMarkerFile(); +} + +class LLUITranslationBridge : public LLTranslationBridge +{ +public: + virtual std::string getString(const std::string &xml_desc) + { + return LLTrans::getString(xml_desc); + } +}; + +bool LLAppViewer::init() +{ + // + // Start of the application + // + LLFastTimer::reset(); + + // initialize LLWearableType translation bridge. + // Memory will be cleaned up in ::cleanupClass() + LLWearableType::initClass(new LLUITranslationBridge()); + + // initialize SSE options + LLVector4a::initClass(); + + //initialize particle index pool + LLVOPartGroup::initClass(); + + // set skin search path to default, will be overridden later + // this allows simple skinned file lookups to work + gDirUtilp->setSkinFolder("default", "en"); + + init_default_trans_args(); + + if (!initConfiguration()) + return false; + + LL_INFOS("InitInfo") << "Configuration initialized." << LL_ENDL ; + + //set the max heap size. + initMaxHeapSize() ; + LLCoros::instance().setStackSize(gSavedSettings.getS32("CoroutineStackSize")); + + LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ; // Although initLoggingAndGetLastDuration() is the right place to mess with // setFatalFunction(), we can't query gSavedSettings until after