aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llappviewer.cpp')
-rw-r--r--linden/indra/newview/llappviewer.cpp29
1 files changed, 25 insertions, 4 deletions
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 35acafc..53685e4 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -1405,6 +1405,25 @@ bool LLAppViewer::cleanup()
1405 return true; 1405 return true;
1406} 1406}
1407 1407
1408// A callback for llerrs to call during the watchdog error.
1409void watchdog_llerrs_callback(const std::string &error_string)
1410{
1411 gLLErrorActivated = true;
1412
1413#ifdef LL_WINDOWS
1414 RaiseException(0,0,0,0);
1415#else
1416 raise(SIGQUIT);
1417#endif
1418}
1419
1420// A callback for the watchdog to call.
1421void watchdog_killer_callback()
1422{
1423 LLError::setFatalFunction(watchdog_llerrs_callback);
1424 llerrs << "Watchdog killer event" << llendl;
1425}
1426
1408bool LLAppViewer::initThreads() 1427bool LLAppViewer::initThreads()
1409{ 1428{
1410#if MEM_TRACK_MEM 1429#if MEM_TRACK_MEM
@@ -1414,10 +1433,11 @@ bool LLAppViewer::initThreads()
1414#endif 1433#endif
1415 1434
1416 const S32 NEVER_SUBMIT_REPORT = 2; 1435 const S32 NEVER_SUBMIT_REPORT = 2;
1417 if(TRUE == gSavedSettings.getBOOL("WatchdogEnabled") 1436 bool use_watchdog = gSavedSettings.getBOOL("WatchdogEnabled");
1418 && (gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT)) 1437 bool send_reports = gCrashSettings.getS32(CRASH_BEHAVIOR_SETTING) != NEVER_SUBMIT_REPORT;
1438 if(use_watchdog && send_reports)
1419 { 1439 {
1420 LLWatchdog::getInstance()->init(); 1440 LLWatchdog::getInstance()->init(watchdog_killer_callback);
1421 } 1441 }
1422 1442
1423 LLVFSThread::initClass(enable_threads && true); 1443 LLVFSThread::initClass(enable_threads && true);
@@ -2280,7 +2300,8 @@ void LLAppViewer::handleViewerCrash()
2280 gDebugInfo["ViewerExePath"] = gDirUtilp->getExecutablePathAndName(); 2300 gDebugInfo["ViewerExePath"] = gDirUtilp->getExecutablePathAndName();
2281 gDebugInfo["CurrentPath"] = gDirUtilp->getCurPath(); 2301 gDebugInfo["CurrentPath"] = gDirUtilp->getCurPath();
2282 gDebugInfo["SessionLength"] = F32(LLFrameTimer::getElapsedSeconds()); 2302 gDebugInfo["SessionLength"] = F32(LLFrameTimer::getElapsedSeconds());
2283 2303 gDebugInfo["StartupState"] = LLStartUp::getStartupStateString();
2304
2284 if(gLogoutInProgress) 2305 if(gLogoutInProgress)
2285 { 2306 {
2286 gDebugInfo["LastExecEvent"] = LAST_EXEC_LOGOUT_CRASH; 2307 gDebugInfo["LastExecEvent"] = LAST_EXEC_LOGOUT_CRASH;