summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-11-17 20:30:37 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-11-18 11:08:41 +0200
commitb64e5802600ef3d24a627127f9b527d1209bbdff (patch)
treefeff2aa3f6f961e06a212de53dafcb7d3a309238
parent3e7c67b5493d6dde2751c08e324db0c8d00a5a6a (diff)
#4939 Bugsplat often confuses log files on mac, try to make it more reliable
-rw-r--r--indra/newview/llappdelegate-objc.mm4
-rw-r--r--indra/newview/llappviewer.cpp21
2 files changed, 22 insertions, 3 deletions
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index a5b8ddd25c..11761dbaae 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -350,12 +350,12 @@ struct AttachmentInfo
info.push_back(AttachmentInfo(secondLogPath, "text/xml"));
}
- // We "happen to know" that info[0].basename is "SecondLife.old" -- due to
+ // We "happen to know" that info[0].basename is "SecondLife.crash" -- due to
// the fact that BugsplatMac only notices a crash during the viewer run
// following the crash.
// The Bugsplat service doesn't respect the MIME type above when returning
// the log data to a browser, so take this opportunity to rename the file
- // from <base>.old to <base>_log.txt
+ // from <base>.crash to <base>_log.txt
info[0].basename =
boost::filesystem::path(info[0].pathname).stem().string() + "_log.txt";
infos("attachmentsForBugsplatStartupManager attaching log " + info[0].basename);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 9bc5b57695..9b16cbd3bf 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3622,7 +3622,10 @@ void LLAppViewer::writeSystemInfo()
if (! gDebugInfo.has("Dynamic") )
gDebugInfo["Dynamic"] = LLSD::emptyMap();
-#if LL_WINDOWS && !LL_BUGSPLAT
+#if LL_DARWIN
+ // crash processing in CrashMetadataSingleton reads SLLog
+ gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"SecondLife.crash");
+#elif LL_WINDOWS && !LL_BUGSPLAT
gDebugInfo["SLLog"] = gDirUtilp->getExpandedFilename(LL_PATH_DUMP,"SecondLife.log");
#else
// Far from ideal, especially when multiple instances get involved.
@@ -4034,6 +4037,22 @@ void LLAppViewer::processMarkerFiles()
}
LLAPRFile::remove(error_marker_file);
}
+
+#if LL_DARWIN
+ if (!mSecondInstance && gLastExecEvent != LAST_EXEC_NORMAL)
+ {
+ // While windows reports crashes immediately, mac reports next run and
+ // may take a while to trigger crash report so it has a special file.
+ // Remove .crash file if exists
+ std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ "SecondLife.old");
+ std::string crash_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ "SecondLife.crash");
+ LLFile::remove(crash_log_file);
+ // Rename ".old" log file to ".crash"
+ LLFile::rename(old_log_file, crash_log_file);
+ }
+#endif
}
void LLAppViewer::removeMarkerFiles()