Improve shader cache error catching and improve reporting#5942
Merged
Conversation
akleshchev
commented
Jun 19, 2026
Contributor
- Small sanity check for shader cache
- Exception handling for shader cache
- Watchdog improvement to know what state app was in on crash (windows only, mac has no such data)
sanity check size, catch exceptions. Cache isn't mission critical.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves robustness and diagnostics around shader cache loading and crash reporting, adding more context to Windows BugSplat reports and hardening shader binary cache reads.
Changes:
- Add a
LLAppVieweraccessor to expose the current mainloop watchdog state for crash reporting. - Include the mainloop watchdog state as a BugSplat attribute on Windows crash reports.
- Add sanity limits and exception handling when reading cached shader program binaries, with improved warning logs on partial reads.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| indra/newview/llappviewerwin32.cpp | Adds BugSplat attribute reporting for the mainloop watchdog state. |
| indra/newview/llappviewer.h | Declares getMainloopWatchdogState() on LLAppViewer. |
| indra/newview/llappviewer.cpp | Implements getMainloopWatchdogState() based on the mainloop watchdog timeout object. |
| indra/llrender/llshadermgr.cpp | Adds shader binary cache read size limit + exception handling + better partial-read logging. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+6332
to
+6341
| // Check if the watchdog is currently active (timer started) | ||
| if (!mMainloopTimeout->isAlive()) | ||
| { | ||
| // Timer is not running, meaning watchdog is paused/stopped | ||
| if (state.empty()) | ||
| { | ||
| return "Paused"; | ||
| } | ||
| return "Paused at " + state; | ||
| } |
to help diagnose crashes
25ddcbb to
eb83287
Compare
maxim-productengine
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.