diff options
| author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2026-05-19 18:51:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-19 18:51:02 -0400 |
| commit | 6d4c4c029ce43aa413266135829cd2bc00001890 (patch) | |
| tree | 209ae880aba5ac777d524bdc557ed166b466347f /indra/newview/llappviewerwin32.cpp | |
| parent | 5c500ccf407f0b5a0b253b98dd4bd3f33f643aba (diff) | |
| parent | 115686ca0f962da9ec5dbcdbe54a4cb6c86302bb (diff) | |
Merge pull request #5369 from secondlife/release/2026.02
Release/2026.02
Diffstat (limited to 'indra/newview/llappviewerwin32.cpp')
| -rw-r--r-- | indra/newview/llappviewerwin32.cpp | 66 |
1 files changed, 49 insertions, 17 deletions
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 94a5f7951e..2e4e9e29d5 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -119,6 +119,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 sBugsplatDescriptionField; bool bugsplatSendLog(UINT nCode, LPVOID lpVal1, LPVOID lpVal2) { @@ -155,8 +156,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 (!sBugsplatDescriptionField.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(sBugsplatDescriptionField)); + // This type of crash is not necessarily a crash, or final. + // Prepare for the next one. + sBugsplatDescriptionField.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())); @@ -433,22 +447,8 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, // commands and exit the process before we do anything else. if (!velopack_initialize()) { + // Obsolete? Always return true // Velopack handled the invocation (install/uninstall hook) - - // Drop install related settings - gDirUtilp->initAppDirs("SecondLife"); - - std::string user_settings_path = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "settings.xml"); - LLControlGroup settings("global"); - if (settings.loadFromFile(user_settings_path)) - { - // If user reinstalls or updates, we want to recheck for nsis leftovers. - if (settings.controlExists("PreviousInstallChecked")) - { - settings.setBOOL("PreviousInstallChecked", false); - } - settings.saveToFile(user_settings_path, true); - } return 0; } #endif @@ -862,6 +862,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) + { + sBugsplatDescriptionField = 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) |
