diff options
| author | Andrew A. de Laix <alain@lindenlab.com> | 2010-07-01 17:30:19 -0700 | 
|---|---|---|
| committer | Andrew A. de Laix <alain@lindenlab.com> | 2010-07-01 17:30:19 -0700 | 
| commit | 5fd6887477b61e10ffd29086b9330a54b3a571d2 (patch) | |
| tree | e50f80aa537cb915b03b0fd23730f89dd2c9d77a | |
| parent | 55176768998fab1a6b9b5b25910d9d7fa8a16298 (diff) | |
Watchdog thread configurable though feature table; user config value will still take precedence.
| -rw-r--r-- | indra/newview/app_settings/settings.xml | 4 | ||||
| -rw-r--r-- | indra/newview/featuretable.txt | 2 | ||||
| -rw-r--r-- | indra/newview/featuretable_linux.txt | 1 | ||||
| -rw-r--r-- | indra/newview/featuretable_mac.txt | 1 | ||||
| -rw-r--r-- | indra/newview/featuretable_solaris.txt | 2 | ||||
| -rw-r--r-- | indra/newview/llappviewer.cpp | 46 | 
6 files changed, 30 insertions, 26 deletions
| diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index b493f38d76..d51498f6d1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11404,9 +11404,9 @@        <key>Persist</key>        <integer>0</integer>        <key>Type</key> -      <string>Boolean</string> +      <string>S32</string>        <key>Value</key> -      <integer>0</integer> +      <integer>-1</integer>      </map>      <key>WaterEditPresets</key>      <map> diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index e8591ca086..1c763453dc 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -58,6 +58,8 @@ Disregard96DefaultDrawDistance	1	1  RenderTextureMemoryMultiple		1	1.0  RenderShaderLightingMaxLevel	1	3  SkyUseClassicClouds			1	1 +WatchdogDisabled				1	1 +  //  // Low Graphics Settings diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 779490c9f7..45de51f3cf 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -57,6 +57,7 @@ Disregard128DefaultDrawDistance	1	1  Disregard96DefaultDrawDistance	1	1  RenderTextureMemoryMultiple		1	1.0  SkyUseClassicClouds			1	1 +WatchdogDisabled				1	1  //  // Low Graphics Settings diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 47033efc47..e89b0cc49d 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -59,6 +59,7 @@ RenderTextureMemoryMultiple		1	0.5  Disregard128DefaultDrawDistance	1	1  Disregard96DefaultDrawDistance	1	1  SkyUseClassicClouds			1	1 +WatchdogDisabled				1	1  //  // Low Graphics Settings diff --git a/indra/newview/featuretable_solaris.txt b/indra/newview/featuretable_solaris.txt index 6edd280686..0ae463332c 100644 --- a/indra/newview/featuretable_solaris.txt +++ b/indra/newview/featuretable_solaris.txt @@ -37,6 +37,8 @@ VertexShaderEnable	1	1  RenderTextureMemoryMultiple		1	1.0  UseOcclusion		1       1  RenderCubeMap		1       1 +WatchdogDisabled				1	1 +  //  // Class 0 Hardware (Unknown or just old) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 1b5b73e3dd..dc514eafe7 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -81,7 +81,7 @@  #include "llvoicechannel.h"  #include "llvoavatarself.h"  #include "llsidetray.h" - +#include "llfeaturemanager.h"  #include "llweb.h"  #include "llsecondlifeurls.h" @@ -379,14 +379,8 @@ bool handleCrashSubmitBehaviorChanged(const LLSD& newvalue)  	const S32 NEVER_SUBMIT_REPORT = 2;  	if(cb == NEVER_SUBMIT_REPORT)  	{ -// 		LLWatchdog::getInstance()->cleanup(); // SJB: cleaning up a running watchdog thread is unsafe  		LLAppViewer::instance()->destroyMainloopTimeout();  	} -	else if(gSavedSettings.getBOOL("WatchdogEnabled") == TRUE) -	{ -		// Don't re-enable the watchdog when we change the setting; this may get called before it's started -// 		LLWatchdog::getInstance()->init(); -	}  	return true;  } @@ -1689,14 +1683,6 @@ bool LLAppViewer::initThreads()  	static const bool enable_threads = true;  #endif -	const S32 NEVER_SUBMIT_REPORT = 2; -	bool use_watchdog = gSavedSettings.getBOOL("WatchdogEnabled"); -	bool send_reports = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT; -	if(use_watchdog && send_reports) -	{ -		LLWatchdog::getInstance()->init(watchdog_killer_callback); -	} -  	LLVFSThread::initClass(enable_threads && false);  	LLLFSThread::initClass(enable_threads && false); @@ -1925,18 +1911,11 @@ bool LLAppViewer::initConfiguration()  	}  #endif -	//*FIX:Mani - Set default to disabling watchdog mainloop  -	// timeout for mac and linux. There is no call stack info  -	// on these platform to help debug.  #ifndef	LL_RELEASE_FOR_DOWNLOAD -	gSavedSettings.setBOOL("WatchdogEnabled", FALSE);  	gSavedSettings.setBOOL("QAMode", TRUE ); +	gSavedSettings.setS32("WatchdogEnabled", 0);  #endif - -#ifndef LL_WINDOWS -	gSavedSettings.setBOOL("WatchdogEnabled", FALSE); -#endif - +	  	gCrashSettings.getControl(CRASH_BEHAVIOR_SETTING)->getSignal()->connect(boost::bind(&handleCrashSubmitBehaviorChanged, _2));	  	// These are warnings that appear on the first experience of that condition. @@ -2364,6 +2343,25 @@ bool LLAppViewer::initWindow()  		gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),  		FALSE, ignorePixelDepth); +	// Need to load feature table before cheking to start watchdog. +	const S32 NEVER_SUBMIT_REPORT = 2; +	bool use_watchdog = false; +	int watchdog_enabled_setting = gSavedSettings.getS32("WatchdogEnabled"); +	if(watchdog_enabled_setting == -1){ +		use_watchdog = !LLFeatureManager::getInstance()->isFeatureAvailable("WatchdogDisabled"); +	} +	else +	{ +		// The user has explicitly set this setting; always use that value. +		use_watchdog = bool(watchdog_enabled_setting); +	} + +	bool send_reports = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT; +	if(use_watchdog && send_reports) +	{ +		LLWatchdog::getInstance()->init(watchdog_killer_callback); +	} +  	LLNotificationsUI::LLNotificationManager::getInstance();  	if (gSavedSettings.getBOOL("WindowMaximized")) | 
