From 7dc014474de0c2d83a3cd314acd9dc0882622299 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 22 Aug 2018 10:48:29 -0400 Subject: DRTVWR-447: Attempt to post BugSplat metadata with Mac crash reports. Introduce CrashMetadata, an LLSingleton in llappviewermacosx.cpp, declared in llappviewermacosx-for-objc.h and accessed by the various BugsplatStartupManagerDelegate override methods. CrashMetadata is populated by reading the previous (presumably crashed) run's static_debug_info.log file. This replaces the previous getOldLogFilePathname(), getFatalMessage() and getAgentFullname() functions. To extend that suite for additional metadata, not only would we have to keep adding new free functions, but we'd have to keep rereading the static_debug_info.log file. Override the new applicationKeyForBugsplatStartupManager, defaultUserNameForBugsplatStartupManager, defaultUserEmailForBugsplatStartupManager methods to extract relevant fields from CrashMetadata. Change applicationLogForBugsplatStartupManager and attachmentForBugsplatStartupManager to do the same. Enhance llviewerregion.cpp to update the static_debug_info.log file every time we enter a new region. --- indra/newview/llviewerregion.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/newview/llviewerregion.cpp') diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index b759c2a3ab..ca452fc766 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -44,6 +44,7 @@ #include "llagent.h" #include "llagentcamera.h" +#include "llappviewer.h" #include "llavatarrenderinfoaccountant.h" #include "llcallingcard.h" #include "llcommandhandler.h" @@ -104,6 +105,18 @@ typedef std::map CapabilityMap; static void log_capabilities(const CapabilityMap &capmap); +namespace +{ + +void newRegionEntry(LLViewerRegion& region) +{ + LL_INFOS("LLViewerRegion") << "Entering region [" << region.getName() << "]" << LL_ENDL; + gDebugInfo["CurrentRegion"] = region.getName(); + LLAppViewer::instance()->writeDebugInfo(); +} + +} // anonymous namespace + // support for secondlife:///app/region/{REGION} SLapps // N.B. this is defined to work exactly like the classic secondlife://{REGION} // However, the later syntax cannot support spaces in the region name because @@ -249,6 +262,9 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCoro(U64 regionHandle) return; // this error condition is not recoverable. } + // record that we just entered a new region + newRegionEntry(*regionp); + // After a few attempts, continue login. But keep trying to get the caps: if (mSeedCapAttempts >= mSeedCapMaxAttemptsBeforeLogin && STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState()) @@ -369,6 +385,9 @@ void LLViewerRegionImpl::requestBaseCapabilitiesCompleteCoro(U64 regionHandle) break; // this error condition is not recoverable. } + // record that we just entered a new region + newRegionEntry(*regionp); + LLSD capabilityNames = LLSD::emptyArray(); buildCapabilityNames(capabilityNames); -- cgit v1.2.3