Present: the two-plane fallbacks release the presenter mutex first #1645

Manually merged
github merged 1 commit from github-bot/gh-1645 into main 2026-11-29 08:21:02 +00:00 AGit
Owner

@⁠unueberlegt on GitHub · 2026-11-28 22:57 UTC · original
unueberlegt:fix/present-planes-deadlock → main · +18 −3 · 2 files · 1 commits · merged 2026-11-29 08:16 UTC

What it changes

The three error paths of present_planes (Series S two-plane presentation) — the composer not made before a resize, the composer not made after one, and a composite recording that failed — tried to release the presenter mutex by dropping the &mut Option<Presenter> they hold of it, which does nothing (std::mem::drop with a reference; three of Clippy's warnings), and then recursed into present_planes to present the base plane. That call locks the presenter mutex again, so the thread hung instead of showing the base plane: a resize followed by a composer failure, or a failing composite record, turned a recoverable warning into a stopped present.

The mutex guard goes back before the fallback now, at all three paths (drop(presentation)); the three warnings are gone, and the borrow checker confirms no borrow outlives the drop (each path returns straight after).

How it was tested

  • GPU and profile: GeForce RTX 5070 12 GB, 31 GB RAM, Windows 11 26300 — the game loads and plays on this build as before (the paths are error-only, not hit in a normal run).
  • victory-gpu lib suite: 550 passed, 0 failed, 43 ignored.
  • Verification of the fix itself is cargo clippy: the three "calls to std::mem::drop with a reference instead of an owned value does nothing" warnings on these paths are gone (3 → 0). A unit test of the deadlock would need a D3D12 device with a deterministically failing composer, which there is no scaffold for.

🤖 Generated with Claude Code

**@⁠unueberlegt** on GitHub · 2026-11-28 22:57 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1645) `unueberlegt:fix/present-planes-deadlock` → `main` · +18 −3 · 2 files · 1 commits · merged 2026-11-29 08:16 UTC ## What it changes The three error paths of `present_planes` (Series S two-plane presentation) — the composer not made before a resize, the composer not made after one, and a composite recording that failed — tried to release the presenter mutex by dropping the `&mut Option<Presenter>` they hold of it, which does nothing (`std::mem::drop` with a reference; three of Clippy's warnings), and then recursed into `present_planes` to present the base plane. That call locks the presenter mutex again, so the thread hung instead of showing the base plane: a resize followed by a composer failure, or a failing composite record, turned a recoverable warning into a stopped present. The mutex guard goes back before the fallback now, at all three paths (`drop(presentation)`); the three warnings are gone, and the borrow checker confirms no borrow outlives the drop (each path returns straight after). ## How it was tested - GPU and profile: GeForce RTX 5070 12 GB, 31 GB RAM, Windows 11 26300 — the game loads and plays on this build as before (the paths are error-only, not hit in a normal run). - `victory-gpu` lib suite: **550 passed, 0 failed, 43 ignored**. - Verification of the fix itself is `cargo clippy`: the three "calls to `std::mem::drop` with a reference instead of an owned value does nothing" warnings on these paths are gone (3 → 0). A unit test of the deadlock would need a D3D12 device with a deterministically failing composer, which there is no scaffold for. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The three error paths of present_planes — the composer not made before
and after a resize, and a composite recording that failed — dropped the
&mut Option<Presenter> they hold instead of the mutex guard, which does
nothing, and then recursed into present_planes: it locks the presenter
mutex again, so the thread hung instead of showing the base plane.
(std::mem::drop with a reference; three of Clippy's warnings.) The
guard goes back before the fallback now, at all three paths, and the
warnings are gone.

Co-Authored-By: Claude Code <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 23:02:49 +00:00
github manually merged commit 22129d33a5 into main 2026-11-29 08:21:02 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1645
No description provided.