Skip to content

Improve shader cache error catching and improve reporting#5942

Merged
akleshchev merged 2 commits into
developfrom
andreyk/viewer_5084_5
Jun 22, 2026
Merged

Improve shader cache error catching and improve reporting#5942
akleshchev merged 2 commits into
developfrom
andreyk/viewer_5084_5

Conversation

@akleshchev

Copy link
Copy Markdown
Contributor
  1. Small sanity check for shader cache
  2. Exception handling for shader cache
  3. 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 LLAppViewer accessor 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;
}
@akleshchev akleshchev force-pushed the andreyk/viewer_5084_5 branch from 25ddcbb to eb83287 Compare June 20, 2026 05:48
@akleshchev akleshchev merged commit 6d9293f into develop Jun 22, 2026
15 checks passed
@akleshchev akleshchev deleted the andreyk/viewer_5084_5 branch June 22, 2026 16:14
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants