All submissions to this site are governed by the Second Life Viewer Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.

Review Board 1.6.11

Welcome to the Second Life Viewer Code Review tool.
See the documentation on our wiki for how to use this site.

Move marker file initialization and processing earlier in the init sequence

Review Request #620 - Created July 30, 2013 and updated

Oz Linden Reviewers
aura
None viewer-release
I don't think I actually changed any code other than the order.
Launched a viewer and logged in while watching the logs for bad symptoms.  Didn't see any and the viewer seemed ok.

Diff revision 1 (Latest)

  1. indra/newview/llappviewer.cpp: Loading...
indra/newview/llappviewer.cpp
Revision 421c20423df9 New Change
... 677 lines hidden [Expand]
LLAppViewer::LLAppViewer() :
678
	mPeriodicSlowFrame(LLCachedControl<bool>(gSavedSettings,"Periodic Slow Frame", FALSE)),
678
	mPeriodicSlowFrame(LLCachedControl<bool>(gSavedSettings,"Periodic Slow Frame", FALSE)),
679
	mFastTimerLogThread(NULL),
679
	mFastTimerLogThread(NULL),
680
	mUpdater(new LLUpdaterService()),
680
	mUpdater(new LLUpdaterService()),
681
	mSettingsLocationList(NULL)
681
	mSettingsLocationList(NULL)
682
{
682
{
683
	if(NULL != sInstance)
683
	if(NULL != sInstance)
684
	{
684
	{
685
		llerrs << "Oh no! An instance of LLAppViewer already exists! LLAppViewer is sort of like a singleton." << llendl;
685
		llerrs << "Oh no! An instance of LLAppViewer already exists! LLAppViewer is sort of like a singleton." << llendl;
686
	}
686
	}
687

   
687

   
688
    mDumpPath ="";

   
689

   

   
690
	// Need to do this initialization before we do anything else, since anything
688
	// Need to do this initialization before we do anything else, since anything
691
	// that touches files should really go through the lldir API
689
	// that touches files should really go through the lldir API
692
	gDirUtilp->initAppDirs("SecondLife");
690
	gDirUtilp->initAppDirs("SecondLife");
693

   
691

   

   
692
	//

   
693
	// IMPORTANT! Do NOT put anything that will write

   
694
	// into the log files during normal startup until AFTER

   
695
	// we run the "program crashed last time" error handler below.

   
696
	//
694
	setupErrorHandling();
697
	setupErrorHandling();
695
	sInstance = this;
698
	sInstance = this;
696
	gLoggedInTime.stop();
699
	gLoggedInTime.stop();
697
	
700
	
Moved from 768

   
701
	// write Google Breakpad minidump files to a per-run dump directory to avoid multiple viewer issues.
Moved from 769

   
702
	std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
Moved from 770

   
703
	mDumpPath = logdir;
Moved from 771

   
704
	setMiniDumpDir(logdir);
Moved from 772

   
705
	logdir += gDirUtilp->getDirDelimiter();
Moved from 773

   
706
    setDebugFileNames(logdir);

   
707

   

   
708
	initLoggingAndGetLastDuration();

   
709
	

   
710
	processMarkerFiles();

   
711
	//

   
712
	// OK to write stuff to logs now, we've now crash reported if necessary

   
713
	//

   
714
	
698
	LLLoginInstance::instance().setUpdaterService(mUpdater.get());
715
	LLLoginInstance::instance().setUpdaterService(mUpdater.get());
699
	LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString());
716
	LLLoginInstance::instance().setPlatformInfo(gPlatform, getOSInfo().getOSVersionString());
700
}
717
}
701

   
718

   
702
LLAppViewer::~LLAppViewer()
719
LLAppViewer::~LLAppViewer()
703
{
720
{
704
	delete mSettingsLocationList;
721
	delete mSettingsLocationList;
705

   
722

   
706
	LLLoginInstance::instance().setUpdaterService(0);
723
	LLLoginInstance::instance().setUpdaterService(0);
707
	
724
	
... 10 lines hidden [Expand]
public:
718
	{
735
	{
719
		return LLTrans::getString(xml_desc);
736
		return LLTrans::getString(xml_desc);
720
	}
737
	}
721
};
738
};
722

   
739

   
723
bool LLAppViewer::init()
740
bool LLAppViewer::init()
724
{	
741
{	
725
	//
742
	//
726
	// Start of the application
743
	// Start of the application
727
	//
744
	//
728
	// IMPORTANT! Do NOT put anything that will write

   
729
	// into the log files during normal startup until AFTER

   
730
	// we run the "program crashed last time" error handler below.

   
731
	//

   
732
	LLFastTimer::reset();
745
	LLFastTimer::reset();
733

   
746

   
734
	// initialize LLWearableType translation bridge.
747
	// initialize LLWearableType translation bridge.
735
	// Memory will be cleaned up in ::cleanupClass()
748
	// Memory will be cleaned up in ::cleanupClass()
736
	LLWearableType::initClass(new LLUITranslationBridge());
749
	LLWearableType::initClass(new LLUITranslationBridge());
737

   
750

   
738
	// initialize SSE options
751
	// initialize SSE options
739
	LLVector4a::initClass();
752
	LLVector4a::initClass();
740

   
753

   
741
	//initialize particle index pool
754
	//initialize particle index pool
742
	LLVOPartGroup::initClass();
755
	LLVOPartGroup::initClass();
743

   
756

   
744
	// set skin search path to default, will be overridden later
757
	// set skin search path to default, will be overridden later
745
	// this allows simple skinned file lookups to work
758
	// this allows simple skinned file lookups to work
746
	gDirUtilp->setSkinFolder("default", "en");
759
	gDirUtilp->setSkinFolder("default", "en");
747

   
760

   
748
	initLoggingAndGetLastDuration();

   
749
	

   
750
	processMarkerFiles();

   
751

   

   
752
	//

   
753
	// OK to write stuff to logs now, we've now crash reported if necessary

   
754
	//

   
755
	

   
756
	init_default_trans_args();
761
	init_default_trans_args();
757
	
762
	
758
	if (!initConfiguration())
763
	if (!initConfiguration())
759
		return false;
764
		return false;
760

   
765

   
761
	LL_INFOS("InitInfo") << "Configuration initialized." << LL_ENDL ;
766
	LL_INFOS("InitInfo") << "Configuration initialized." << LL_ENDL ;
762

   
767

   
763
	//set the max heap size.
768
	//set the max heap size.
764
	initMaxHeapSize() ;
769
	initMaxHeapSize() ;
765
	LLCoros::instance().setStackSize(gSavedSettings.getS32("CoroutineStackSize"));
770
	LLCoros::instance().setStackSize(gSavedSettings.getS32("CoroutineStackSize"));
766

   
771

   
767
	LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ;
772
	LLPrivateMemoryPoolManager::initClass((BOOL)gSavedSettings.getBOOL("MemoryPrivatePoolEnabled"), (U32)gSavedSettings.getU32("MemoryPrivatePoolSize")*1024*1024) ;
768
	// write Google Breakpad minidump files to a per-run dump directory to avoid multiple viewer issues.
Moved to 701

   
769
	std::string logdir = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "");
Moved to 702

   
770
	mDumpPath = logdir;
Moved to 703

   
771
	setMiniDumpDir(logdir);
Moved to 704

   
772
	logdir += gDirUtilp->getDirDelimiter();
Moved to 705

   
773
    setDebugFileNames(logdir);
Moved to 706

   
774

   

   
775

   
773

   
776
	// Although initLoggingAndGetLastDuration() is the right place to mess with
774
	// Although initLoggingAndGetLastDuration() is the right place to mess with
777
	// setFatalFunction(), we can't query gSavedSettings until after
775
	// setFatalFunction(), we can't query gSavedSettings until after
778
	// initConfiguration().
776
	// initConfiguration().
779
	S32 rc(gSavedSettings.getS32("QAModeTermCode"));
777
	S32 rc(gSavedSettings.getS32("QAModeTermCode"));
780
	if (rc >= 0)
778
	if (rc >= 0)
781
	{
779
	{
782
		// QAModeTermCode set, terminate with that rc on LL_ERRS. Use _exit()
780
		// QAModeTermCode set, terminate with that rc on LL_ERRS. Use _exit()
783
		// rather than exit() because normal cleanup depends too much on
781
		// rather than exit() because normal cleanup depends too much on
784
		// successful startup!
782
		// successful startup!
... 4799 lines hidden [Expand]
  1. indra/newview/llappviewer.cpp: Loading...