summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2023-07-17 13:37:03 -0700
committerBrad Linden <brad@lindenlab.com>2023-07-17 13:37:03 -0700
commitf975cfd7361729195f2bb14d874e5eacc6140759 (patch)
tree471389ca5dab742aaf84c678c4dcef3433da8e9a /indra/newview/llappviewer.cpp
parent2f8f1c7a44f45490db5b5f040914e42aef2f5280 (diff)
parentec4135da63a3f3877222fba4ecb59b15650371fe (diff)
Merge remote-tracking branch 'origin/main' into DRTVWR-559
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp159
1 files changed, 0 insertions, 159 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index cf84094aa4..343778fe03 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3574,8 +3574,6 @@ void LLAppViewer::writeSystemInfo()
// "CrashNotHandled" is set here, while things are running well,
// in case of a freeze. If there is a freeze, the crash logger will be launched
// and can read this value from the debug_info.log.
- // If the crash is handled by LLAppViewer::handleViewerCrash, ie not a freeze,
- // then the value of "CrashNotHandled" will be set to true.
gDebugInfo["CrashNotHandled"] = LLSD::Boolean(true);
#else // LL_BUGSPLAT
// "CrashNotHandled" is obsolete; it used (not very successsfully)
@@ -3667,163 +3665,6 @@ void getFileList()
}
#endif
-void LLAppViewer::handleViewerCrash()
-{
- LL_INFOS("CRASHREPORT") << "Handle viewer crash entry." << LL_ENDL;
-
- LL_INFOS("CRASHREPORT") << "Last render pool type: " << LLPipeline::sCurRenderPoolType << LL_ENDL ;
-
- LLMemory::logMemoryInfo(true) ;
-
- //print out recorded call stacks if there are any.
- LLError::LLCallStacks::print();
-
- LLAppViewer* pApp = LLAppViewer::instance();
- if (pApp->beingDebugged())
- {
- // This will drop us into the debugger.
- abort();
- }
-
- if (LLApp::isCrashloggerDisabled())
- {
- abort();
- }
-
- // Returns whether a dialog was shown.
- // Only do the logic in here once
- if (pApp->mReportedCrash)
- {
- return;
- }
- pApp->mReportedCrash = TRUE;
-
- // Insert crash host url (url to post crash log to) if configured.
- std::string crashHostUrl = gSavedSettings.get<std::string>("CrashHostUrl");
- if(crashHostUrl != "")
- {
- gDebugInfo["Dynamic"]["CrashHostUrl"] = crashHostUrl;
- }
-
- LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
- if ( parcel && parcel->getMusicURL()[0])
- {
- gDebugInfo["Dynamic"]["ParcelMusicURL"] = parcel->getMusicURL();
- }
- if ( parcel && parcel->getMediaURL()[0])
- {
- gDebugInfo["Dynamic"]["ParcelMediaURL"] = parcel->getMediaURL();
- }
-
- gDebugInfo["Dynamic"]["SessionLength"] = F32(LLFrameTimer::getElapsedSeconds());
- gDebugInfo["Dynamic"]["RAMInfo"]["Allocated"] = LLSD::Integer(LLMemory::getCurrentRSS() / 1024);
-
- if(gLogoutInProgress)
- {
- gDebugInfo["Dynamic"]["LastExecEvent"] = LAST_EXEC_LOGOUT_CRASH;
- }
- else
- {
- gDebugInfo["Dynamic"]["LastExecEvent"] = gLLErrorActivated ? LAST_EXEC_LLERROR_CRASH : LAST_EXEC_OTHER_CRASH;
- }
-
- if(gAgent.getRegion())
- {
- gDebugInfo["Dynamic"]["CurrentSimHost"] = gAgent.getRegion()->getSimHostName();
- gDebugInfo["Dynamic"]["CurrentRegion"] = gAgent.getRegion()->getName();
-
- const LLVector3& loc = gAgent.getPositionAgent();
- gDebugInfo["Dynamic"]["CurrentLocationX"] = loc.mV[0];
- gDebugInfo["Dynamic"]["CurrentLocationY"] = loc.mV[1];
- gDebugInfo["Dynamic"]["CurrentLocationZ"] = loc.mV[2];
- }
-
- if(LLAppViewer::instance()->mMainloopTimeout)
- {
- gDebugInfo["Dynamic"]["MainloopTimeoutState"] = LLAppViewer::instance()->mMainloopTimeout->getState();
- }
-
- // The crash is being handled here so set this value to false.
- // Otherwise the crash logger will think this crash was a freeze.
- gDebugInfo["Dynamic"]["CrashNotHandled"] = LLSD::Boolean(false);
-
- //Write out the crash status file
- //Use marker file style setup, as that's the simplest, especially since
- //we're already in a crash situation
- if (gDirUtilp)
- {
- std::string crash_marker_file_name = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
- gLLErrorActivated
- ? LLERROR_MARKER_FILE_NAME
- : ERROR_MARKER_FILE_NAME);
- LLAPRFile crash_marker_file ;
- crash_marker_file.open(crash_marker_file_name, LL_APR_WB);
- if (crash_marker_file.getFileHandle())
- {
- LL_INFOS("MarkerFile") << "Created crash marker file " << crash_marker_file_name << LL_ENDL;
- recordMarkerVersion(crash_marker_file);
- }
- else
- {
- LL_WARNS("MarkerFile") << "Cannot create error marker file " << crash_marker_file_name << LL_ENDL;
- }
- }
- else
- {
- LL_WARNS("MarkerFile") << "No gDirUtilp with which to create error marker file name" << LL_ENDL;
- }
-
-#ifdef LL_WINDOWS
- Sleep(200);
-#endif
-
- char *minidump_file = pApp->getMiniDumpFilename();
- LL_DEBUGS("CRASHREPORT") << "minidump file name " << minidump_file << LL_ENDL;
- if(minidump_file && minidump_file[0] != 0)
- {
- gDebugInfo["Dynamic"]["MinidumpPath"] = minidump_file;
- }
- else
- {
-#ifdef LL_WINDOWS
- getFileList();
-#else
- LL_WARNS("CRASHREPORT") << "no minidump file?" << LL_ENDL;
-#endif
- }
- gDebugInfo["Dynamic"]["CrashType"]="crash";
-
- if (gMessageSystem && gDirUtilp)
- {
- std::string filename;
- filename = gDirUtilp->getExpandedFilename(LL_PATH_DUMP, "stats.log");
- LL_DEBUGS("CRASHREPORT") << "recording stats " << filename << LL_ENDL;
- llofstream file(filename.c_str(), std::ios_base::binary);
- if(file.good())
- {
- gMessageSystem->summarizeLogs(file);
- file.close();
- }
- else
- {
- LL_WARNS("CRASHREPORT") << "problem recording stats" << LL_ENDL;
- }
- }
-
- if (gMessageSystem)
- {
- gMessageSystem->getCircuitInfo(gDebugInfo["CircuitInfo"]);
- gMessageSystem->stopLogging();
- }
-
- if (LLWorld::instanceExists()) LLWorld::getInstance()->getInfo(gDebugInfo["Dynamic"]);
-
- gDebugInfo["FatalMessage"] = LLError::getFatalMessage();
-
- // Close the debug file
- pApp->writeDebugInfo(false); //false answers the isStatic question with the least overhead.
-}
-
// static
void LLAppViewer::recordMarkerVersion(LLAPRFile& marker_file)
{