Frame recorder (VICTORY_RECORD) crashes at the first submitted list under vkd3d-proton; fix offered #6

Closed
opened 2026-12-01 03:06:20 +00:00 by github-bot · 4 comments
Owner

@⁠Anzymanz on GitHub · 2026-11-27 18:20 UTC · original

With VICTORY_RECORD set, the frame recorder in crates/victory-gpu/src/replay/ crashes the process at the first ExecuteCommandLists that submits a recorded list: an access violation in vkd3d-proton's d3d12core.dll (+0x55c80d in our build), about 7 s after start. Without VICTORY_RECORD nothing changes.

Cause, as we read it: the recorder hooks a list by pointing its method table at a shim. vkd3d-proton's ExecuteCommandLists only accepts a list whose table is one of its own; it reads a list with any other table as null. So every hooked list it is given is treated as null.

Fix we're running (2 files, +71/-1, inert without VICTORY_RECORD):

  • hook.rs: a bare(objects, f) helper. For the duration of the original call, it points each given object that sits on one of our shims back at its own table. After the call, it puts the shim back, unless something set a different table in the meantime.
  • record.rs: the queue's ExecuteCommandLists and the list's ExecuteBundle call the original through bare. Bundles are still counted as not recorded.

With it, a capture of one frame recorded and replayed on our side: 56 submissions, 340 lists, about 1,550 pipelines. It's one capture so far. Setup: RX 9070 XT, Mesa 26.3.1 RADV, GE-Proton11-14, vkd3d-proton master, CachyOS. Not tried on Windows' own D3D12, where the runtime may not check the table in the same way.

hook.rs and record.rs in your main are byte-identical to ours before the change. The same files are on FiveNine/victory-proton main. The recorder is avatarmanz's work (first in their 25 Nov commit "Record and replay a frame's D3D12 work"). Would you like it as a pull request?

Written with Claude Code.

**@⁠Anzymanz** on GitHub · 2026-11-27 18:20 UTC · [original](https://github.com/Slaktarn700/SlaktarnVI/issues/6) With `VICTORY_RECORD` set, the frame recorder in `crates/victory-gpu/src/replay/` crashes the process at the first `ExecuteCommandLists` that submits a recorded list: an access violation in vkd3d-proton's `d3d12core.dll` (+0x55c80d in our build), about 7 s after start. Without `VICTORY_RECORD` nothing changes. **Cause, as we read it:** the recorder hooks a list by pointing its method table at a shim. vkd3d-proton's `ExecuteCommandLists` only accepts a list whose table is one of its own; it reads a list with any other table as null. So every hooked list it is given is treated as null. **Fix we're running** (2 files, +71/-1, inert without `VICTORY_RECORD`): - `hook.rs`: a `bare(objects, f)` helper. For the duration of the original call, it points each given object that sits on one of our shims back at its own table. After the call, it puts the shim back, unless something set a different table in the meantime. - `record.rs`: the queue's `ExecuteCommandLists` and the list's `ExecuteBundle` call the original through `bare`. Bundles are still counted as not recorded. With it, a capture of one frame recorded and replayed on our side: 56 submissions, 340 lists, about 1,550 pipelines. It's one capture so far. Setup: RX 9070 XT, Mesa 26.3.1 RADV, GE-Proton11-14, vkd3d-proton master, CachyOS. Not tried on Windows' own D3D12, where the runtime may not check the table in the same way. `hook.rs` and `record.rs` in your `main` are byte-identical to ours before the change. The same files are on FiveNine/victory-proton `main`. The recorder is avatarmanz's work (first in their 25 Nov commit "Record and replay a frame's D3D12 work"). Would you like it as a pull request? Written with Claude Code.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 03:06:20 +00:00
Author
Owner

@⁠Slaktarn700 on GitHub · 2026-11-29 11:17 UTC · original

Fixed in my working copy following your design; the test that crashed passes. Not published yet.

**@⁠Slaktarn700** on GitHub · 2026-11-29 11:17 UTC · [original](https://github.com/Slaktarn700/SlaktarnVI/issues/6#issuecomment-7255013539) Fixed in my working copy following your design; the test that crashed passes. Not published yet.
Author
Owner

@⁠Anzymanz on GitHub · 2026-11-29 22:31 UTC · original

Thanks, @⁠Slaktarn700. We'll run the recorder on our Linux setup once it's published and say here whether it gets past the first submitted list.

Written with Claude Code.

**@⁠Anzymanz** on GitHub · 2026-11-29 22:31 UTC · [original](https://github.com/Slaktarn700/SlaktarnVI/issues/6#issuecomment-7263735564) Thanks, @⁠Slaktarn700. We'll run the recorder on our Linux setup once it's published and say here whether it gets past the first submitted list. Written with Claude Code.
Author
Owner

@⁠Slaktarn700 on GitHub · 2026-12-05 03:24 UTC · original

Thank you for this. Since 2026-12-02 the repository is on a new base (VIctory-xmem), and this was about the earlier one. Many things changed. A new release is out (https://github.com/Slaktarn700/SlaktarnVI/releases/tag/2026-12-05). Update with the same one command as the install (curl -fsSL https://raw.githubusercontent.com/Slaktarn700/SlaktarnVI/main/install.sh | bash). If it still happens there, please write here with the new log and I will look again.

**@⁠Slaktarn700** on GitHub · 2026-12-05 03:24 UTC · [original](https://github.com/Slaktarn700/SlaktarnVI/issues/6#issuecomment-7431040219) Thank you for this. Since 2026-12-02 the repository is on a new base (VIctory-xmem), and this was about the earlier one. Many things changed. A new release is out (https://github.com/Slaktarn700/SlaktarnVI/releases/tag/2026-12-05). Update with the same one command as the install (`curl -fsSL https://raw.githubusercontent.com/Slaktarn700/SlaktarnVI/main/install.sh | bash`). If it still happens there, please write here with the new log and I will look again.
Author
Owner

@⁠Slaktarn700 on GitHub · 2026-12-05 05:05 UTC · original

Thank you for the precise diagnosis. The new base (on main since 2026-12-02) has this fix in the recorder: around the queue's ExecuteCommandLists every list that points at one of our shims is pointed back at its own method table for the call, and the shim is put back afterwards (hook::bare in crates/victory-gpu/src/replay/hook.rs, used in record.rs), as you proposed. Captures complete under vkd3d-proton there. Closing; please reopen if it still crashes at the first submitted list.

**@⁠Slaktarn700** on GitHub · 2026-12-05 05:05 UTC · [original](https://github.com/Slaktarn700/SlaktarnVI/issues/6#issuecomment-7432358708) Thank you for the precise diagnosis. The new base (on main since 2026-12-02) has this fix in the recorder: around the queue's `ExecuteCommandLists` every list that points at one of our shims is pointed back at its own method table for the call, and the shim is put back afterwards (`hook::bare` in `crates/victory-gpu/src/replay/hook.rs`, used in `record.rs`), as you proposed. Captures complete under vkd3d-proton there. Closing; please reopen if it still crashes at the first submitted list.
This discussion has been locked. Commenting is limited to contributors.
No description provided.