summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewerwin32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappviewerwin32.cpp')
-rw-r--r--indra/newview/llappviewerwin32.cpp50
1 files changed, 48 insertions, 2 deletions
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 0620b625d9..45c8c369ca 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -114,6 +114,7 @@ namespace
// MiniDmpSender pointer. As things stand, though, we must define an
// actual function and store the pointer statically.
static MiniDmpSender *sBugSplatSender = nullptr;
+ static std::string sBugsplatDesriptionField;
bool bugsplatSendLog(UINT nCode, LPVOID lpVal1, LPVOID lpVal2)
{
@@ -150,8 +151,21 @@ namespace
WCSTR(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "settings_per_account.xml")));
}
- // LL_ERRS message, when there is one
- sBugSplatSender->setDefaultUserDescription(WCSTR(LLError::getFatalMessage()));
+ if (!sBugsplatDesriptionField.empty())
+ {
+ // Can be set by watchdog or other code that detects a problem
+ // and wants to add some context to the crash report.
+ // Will be visible in the BugSplat web UI.
+ sBugSplatSender->setDefaultUserDescription(WCSTR(LLError::getFatalMessage()));
+ // This type of crash is not nessesarily a crash, or final.
+ // Prepare for the next one.
+ sBugsplatDesriptionField.clear();
+ }
+ else
+ {
+ // LL_ERRS message, when there is one
+ sBugSplatSender->setDefaultUserDescription(WCSTR(LLError::getFatalMessage()));
+ }
sBugSplatSender->setAttribute(WCSTR(L"OS"), WCSTR(LLOSInfo::instance().getOSStringSimple())); // In case we ever stop using email for this
sBugSplatSender->setAttribute(WCSTR(L"AppState"), WCSTR(LLStartUp::getStartupStateString()));
@@ -833,6 +847,38 @@ bool LLAppViewerWin32::reportCrashToBugsplat(void* pExcepInfo)
return false;
}
+#if defined(LL_BUGSPLAT)
+static int reportCustomToBugsplatFilter(EXCEPTION_POINTERS* pExcepInfo)
+{
+ if (sBugSplatSender)
+ {
+ sBugSplatSender->createReport(pExcepInfo);
+ }
+ return EXCEPTION_EXECUTE_HANDLER;
+}
+#endif
+
+bool LLAppViewerWin32::reportCustomToBugsplat(const std::string &description)
+{
+#if defined(LL_BUGSPLAT)
+ if (sBugSplatSender)
+ {
+ sBugsplatDesriptionField = description;
+
+ __try
+ {
+ // Generate a custom exception code
+ RaiseException(0xE0000001, 0, 0, NULL);
+ }
+ __except (reportCustomToBugsplatFilter(GetExceptionInformation()))
+ {
+ }
+ return true;
+ }
+#endif // LL_BUGSPLAT
+ return false;
+}
+
bool LLAppViewerWin32::initWindow()
{
// This is a workaround/hotfix for a change in Windows 11 24H2 (and possibly later)