diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2018-07-11 16:01:48 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2018-07-11 16:01:48 -0400 |
commit | 66d083967ec25b5c46424689624b2aa366a2ae6b (patch) | |
tree | c48edbfc49f37f0efeea63351614ee3531598ff1 /indra | |
parent | 62eecd87a5610aae41cff6dc6ebcc81e7bcb474f (diff) |
DRTVWR-447: Add more diagnostic logging to Windows BugSplat crash.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llappviewerwin32.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index adb3a2bbe2..5c7cb5b9c6 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -116,24 +116,38 @@ namespace bool bugsplatSendLog(UINT nCode, LPVOID lpVal1, LPVOID lpVal2) { + // When BugSplat intercepts a crash, logging seems to stop?! + // Maybe because our test crashes use LL_ERROR(). Try writing a + // special log file "by hand." + std::ofstream log(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "BugSplat.log"), + std::ios_base::app); + log << "Entered bugsplatSendLog() callback\n"; if (nCode == MDSCB_EXCEPTIONCODE) { // send the main viewer log file // widen to wstring, convert to __wchar_t, then pass c_str() sBugSplatSender->sendAdditionalFile( WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.log"))); + log << "Attached " << gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "SecondLife.log") << '\n'; sBugSplatSender->sendAdditionalFile( WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml"))); + log << "Attached " << gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml") << '\n'; if (gAgentAvatarp) { // user name, when we have it sBugSplatSender->setDefaultUserName(WCSTR(gAgentAvatarp->getFullname())); + log << "Set default user name to '" << gAgentAvatarp->getFullname() << "'\n"; + } + else + { + log << "gAgentAvatarp is nullptr\n"; } // LL_ERRS message, when there is one sBugSplatSender->setDefaultUserDescription(WCSTR(LLError::getFatalMessage())); + log << "Set default user description to '" << LLError::getFatalMessage() << "'\n"; if (gAgent.getRegion()) { @@ -144,10 +158,25 @@ namespace << '/' << loc.mV[0] << '/' << loc.mV[1] << '/' << loc.mV[2]))); + log << "Set app identifier to '" + << gAgent.getRegion()->getName() + << '/' << loc.mV[0] + << '/' << loc.mV[1] + << '/' << log.mV[2] + << "'\n"; + } + else + { + log "gAgent.getRegion() is nullptr\n"; } LL_INFOS() << "Sending crash report to BugSplat." << LL_ENDL; + log << "Sending crash report to BugSplat.\n"; } // MDSCB_EXCEPTIONCODE + else + { + log << "nCode != MDSCB_EXCEPTIONCODE\n"; + } return false; } |