Repository navigation
fix: reject export previews after shared GPU device loss - #2400
Merged
Merged
Conversation
Member
Author
|
hey @greptileai, please re-review the PR |
richiemcilroy
marked this pull request as ready for review
October 5, 2026 14:16
Member
Author
|
hey @greptileai, please re-review the PR |
This branch was successfully deployed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
After the shared graphics device is lost, fast export previews keep creating renderer layers on that same device. Each retry can panic again because both the shared cache and the editor retain the failed resource generation.
Track loss when the shared device is created and reject previews before decoding and again before renderer allocation. After the existing bounded retries, show the restart-Cap error and clear the stale preview/estimate. Keep the original loss diagnostics, normal GPU validation, and existing panic boundary. Devices, textures, and pipelines stay together; this does not attempt automatic recovery.
Verification on macOS arm64 with Rust 1.88.0:
The original device-loss cause is unknown. Synthetic destruction is not a Windows driver fault, hardware rendering test, or complete preview IPC test. Loss during rendering can still reach the existing panic boundary. Fallback devices created after shared initialization failure are outside this guard. Windows hardware loss, the complete preview IPC flow, and packaged-app behavior remain unverified.
CI on the current head, after merging main, passes on Windows x64, macOS arm64 and Linux x64: Clippy, Build Desktop (including the four GPU-loss regression tests and the GPUI suite), Typecheck, formatting, lint, CodeQL and Socket. Rust cache and the Tauri plugin-version check are skipped by their existing conditions. The earlier Windows Clippy dead-code warning and the GPUI
every_embedded_icon_is_referencedfailure were baseline issues that main has since fixed.Not yet verified by hand: a real GPU device loss in the native application.
The PR appears safe to merge; this re-review found no new actionable issue.
Summary
The PR tracks loss of the shared GPU device, rejects export previews before decoding and renderer allocation, clears stale preview state after retries, and adds regression tests to desktop CI.
Reviews (3) · Last reviewed commit: "ci: run the device-loss test after the G..."