World rendering: device removed with a page fault inside a freed texture and garbage descriptor handles #772

Open
opened 2026-11-26 04:13:57 +00:00 by github-bot · 3 comments
Owner

@⁠Allmightly on GitHub · 2026-11-24 10:13 UTC · original

Summary

Title: GTA6 Xbox build 1.0.2.1 (game_scarlett_master.exe).
The title reaches the main menu and renders it at 30 fps, and it loads into the world
(the world's pipelines translate and thousands of draws are issued per frame), but the
host GPU device is then removed with 0x887A0004 / 0x887A0006 after 60–150 s. With
VICTORY_D3D12_DRED=1 the removal reports a page fault inside an already freed
texture, plus descriptor handles past the end of the view/sampler heap.

Build

  • VIctory at 8e79c80 (8e79c80e4b71e252bcd271e0587aa662c4770008).
  • cargo build --release and cargo build --profile diag --features diagnostics, both clean.
  • One local patch: Agility SDK opt-in (D3D12Core.dll 1.620.2 in D3D12\ next to the
    exe, D3D12SDKVersion = 620, D3D12SDKPath = .\D3D12\ exported via build.rs).
    Needed because Windows 10 19045's inbox d3d12.dll rejects the title's
    CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | SAMPLER_HEAP_DIRECTLY_INDEXED root signature
    flags (root signature: Unsupported bit-flag set).
    With 1.722.1-preview / version 722 I get 0x887E0003; 1.620.2 / 620 works.

System

  • Windows 10 Pro 22H2, 10.0.19045.
  • AMD Radeon RX 6900 XT (0x73bf), driver 32.0.21045.29003 (26.11.2, 2026-11-17).
  • 6 cores / 12 threads, 31.1 GB RAM, pagefile 8 GB on C: + 64 GB on E: (commit limit 99.1 GB).
  • victory.toml: game_dir = the title, cache_dir/data_dir on E:.

Reproduction

victory.exe run "<...>\game_scarlett_master.exe" --execute

VICTORY_KEYS (diag build) advances the menus: legal notices → first-run wizard →
ToS → world. Menu renders fine, 30 fps, drawn = 5376/5376.
World entry: frames take 1.5–2.1 s, drawn 1135–4703, private memory 23.6–24.3 GB,
Srv s0+40: placed dim 1 42991392x1, then the device is removed.

What did not fix it

  • VICTORY_COPY_MODE=none: removed after 4 lists.
  • VICTORY_COPY_MODE=plain: crash inside the menu.
  • VICTORY_SHADER_LOOP_LIMIT=64: 0 fps.
  • VICTORY_D3D12_DEBUG=1 + VICTORY_GPU_TIMING=1: removed at frame 1337.
  • Snapshot pool 8 → 64: page faults 661k → 841k, removed at world entry.
  • Splitting submissions into bundles of 8 lists (each submission then waits ~371 ms):
    still removed, after a submission of 27/16/30 lists — so this is not "submission too long".
  • VICTORY_SKIP_PIPELINES=0184869d6e47e5fa (a compute pipeline that shows up in every slow
    submission): still removed.

DRED report (VICTORY_D3D12_DRED=1)

host GPU device removed after a submission of 30 lists; page fault at 0x53e6b4000;
  inside freed ["texture 1024x1024 f83 flags 0x0 (type 34)"];
  the nearest title memory copy below it: 0xb33c00000+0x400000 at host 0x53ce80000, offset 0x1834000;
  the nearest above: 0xb8c000000+0x455d80 at host 0x53e900000 (924 copies in all);
  view heap 0x104fa0000+0x2e00000: 0x436914000 past its end (slot 566987264);
  sampler heap 0x100081000+0x800: 0x43e632800 past its end (slot 1139159808);
  breadcrumbs (done/count, list) ["23/23 None", "23/23 None", "23/23 None", "2/2 None", ...]

The breadcrumbs show every earlier list completing, then the fault inside a pipeline:
9d790882d65f0ae3, whose tracked constants are
u8=0xa00000 [heap 327680: null], u9=0x20c0b60 [heap 1073243: null],
u10=0x20c09e0 [heap 1073231: null], u14=0x35a6b40, and whose descriptor table is
80e6426bcce9ceb7, sampling e.g.

Srv s0+40:  placed dim 1 42991392x1
Srv s0+688: placed dim 1 182452224x1
Srv s1+16:  buffer None        <-- a null SRV is sampled
Srv s1+32:  buffer None
Cbv s1+56:  [-0.9938614, 0.0069484105, -0.11041405, 0.0]
Cbv s1+64:  [NaN, NaN, NaN, NaN]   <-- NaN in a constant buffer

Reading

Two separate things point at descriptor liveness rather than at data content:

  1. The fault address lies inside a texture that was already freed. Some draw or dispatch
    that runs later still holds a descriptor (or a directly-indexed slot) for it.
  2. view heap ... slot 566987264 / sampler heap ... slot 1139159808 are absurd slot
    numbers derived from a handle (or from a value read out of title memory as a handle),
    i.e. a descriptor table is being built from a stale/garbage index rather than from a
    live allocation.

Question: is "resource freed while a submitted draw still references it" a known gap for
this title — e.g. the title frees a render target between frames and we still execute the
previous frame's list against it, or a dynamic-descriptor slot gets recycled while a
descriptor table built earlier still points at it? Anything you would like me to dump
(VICTORY_DUMP_TARGETS, per-draw descriptor tables, VICTORY_CRASH_SAVE) to pin it down?

I have the full run30 log (breadcrumbs of all 30 lists, heaps, the freed allocation
report) and can paste it or attach it.

**@⁠Allmightly** on GitHub · 2026-11-24 10:13 UTC · [original](https://github.com/Marvisak/VIctory/issues/772) ## Summary Title: GTA6 Xbox build `1.0.2.1` (`game_scarlett_master.exe`). The title reaches the main menu and renders it at 30 fps, and it loads into the world (the world's pipelines translate and thousands of draws are issued per frame), but the host GPU device is then removed with `0x887A0004` / `0x887A0006` after 60–150 s. With `VICTORY_D3D12_DRED=1` the removal reports a page fault inside an already **freed** texture, plus descriptor handles past the end of the view/sampler heap. ## Build - VIctory at `8e79c80` (`8e79c80e4b71e252bcd271e0587aa662c4770008`). - `cargo build --release` and `cargo build --profile diag --features diagnostics`, both clean. - One local patch: Agility SDK opt-in (`D3D12Core.dll` 1.620.2 in `D3D12\` next to the exe, `D3D12SDKVersion = 620`, `D3D12SDKPath = .\D3D12\` exported via `build.rs`). Needed because Windows 10 19045's inbox `d3d12.dll` rejects the title's `CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | SAMPLER_HEAP_DIRECTLY_INDEXED` root signature flags (`root signature: Unsupported bit-flag set`). With 1.722.1-preview / version 722 I get `0x887E0003`; 1.620.2 / 620 works. ## System - Windows 10 Pro 22H2, `10.0.19045`. - AMD Radeon RX 6900 XT (`0x73bf`), driver `32.0.21045.29003` (26.11.2, 2026-11-17). - 6 cores / 12 threads, 31.1 GB RAM, pagefile 8 GB on C: + 64 GB on E: (commit limit 99.1 GB). - `victory.toml`: `game_dir` = the title, `cache_dir`/`data_dir` on E:. ## Reproduction ``` victory.exe run "<...>\game_scarlett_master.exe" --execute ``` `VICTORY_KEYS` (diag build) advances the menus: legal notices → first-run wizard → ToS → world. Menu renders fine, 30 fps, `drawn = 5376/5376`. World entry: frames take 1.5–2.1 s, `drawn` 1135–4703, private memory 23.6–24.3 GB, `Srv s0+40: placed dim 1 42991392x1`, then the device is removed. ## What did *not* fix it - `VICTORY_COPY_MODE=none`: removed after 4 lists. - `VICTORY_COPY_MODE=plain`: crash inside the menu. - `VICTORY_SHADER_LOOP_LIMIT=64`: 0 fps. - `VICTORY_D3D12_DEBUG=1` + `VICTORY_GPU_TIMING=1`: removed at frame 1337. - Snapshot pool 8 → 64: page faults 661k → 841k, removed at world entry. - Splitting submissions into bundles of 8 lists (each submission then waits ~371 ms): still removed, after a submission of 27/16/30 lists — so this is not "submission too long". - `VICTORY_SKIP_PIPELINES=0184869d6e47e5fa` (a compute pipeline that shows up in every slow submission): still removed. ## DRED report (`VICTORY_D3D12_DRED=1`) ``` host GPU device removed after a submission of 30 lists; page fault at 0x53e6b4000; inside freed ["texture 1024x1024 f83 flags 0x0 (type 34)"]; the nearest title memory copy below it: 0xb33c00000+0x400000 at host 0x53ce80000, offset 0x1834000; the nearest above: 0xb8c000000+0x455d80 at host 0x53e900000 (924 copies in all); view heap 0x104fa0000+0x2e00000: 0x436914000 past its end (slot 566987264); sampler heap 0x100081000+0x800: 0x43e632800 past its end (slot 1139159808); breadcrumbs (done/count, list) ["23/23 None", "23/23 None", "23/23 None", "2/2 None", ...] ``` The breadcrumbs show every earlier list completing, then the fault inside a pipeline: `9d790882d65f0ae3`, whose tracked constants are `u8=0xa00000 [heap 327680: null]`, `u9=0x20c0b60 [heap 1073243: null]`, `u10=0x20c09e0 [heap 1073231: null]`, `u14=0x35a6b40`, and whose descriptor table is `80e6426bcce9ceb7`, sampling e.g. ``` Srv s0+40: placed dim 1 42991392x1 Srv s0+688: placed dim 1 182452224x1 Srv s1+16: buffer None <-- a null SRV is sampled Srv s1+32: buffer None Cbv s1+56: [-0.9938614, 0.0069484105, -0.11041405, 0.0] Cbv s1+64: [NaN, NaN, NaN, NaN] <-- NaN in a constant buffer ``` ## Reading Two separate things point at **descriptor liveness** rather than at data content: 1. The fault address lies inside a texture that was already freed. Some draw or dispatch that runs later still holds a descriptor (or a directly-indexed slot) for it. 2. `view heap ... slot 566987264` / `sampler heap ... slot 1139159808` are absurd slot numbers derived from a handle (or from a value read out of title memory as a handle), i.e. a descriptor table is being built from a stale/garbage index rather than from a live allocation. Question: is "resource freed while a submitted draw still references it" a known gap for this title — e.g. the title frees a render target between frames and we still execute the previous frame's list against it, or a dynamic-descriptor slot gets recycled while a descriptor table built earlier still points at it? Anything you would like me to dump (`VICTORY_DUMP_TARGETS`, per-draw descriptor tables, `VICTORY_CRASH_SAVE`) to pin it down? I have the full `run30` log (breadcrumbs of all 30 lists, heaps, the freed allocation report) and can paste it or attach it.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:13:57 +00:00
Author
Owner

@⁠MartinIndra02 on GitHub · 2026-11-24 10:15 UTC · original

Two quick pointers on the DRED output:

  1. Freed texture page fault (inside freed ["texture 1024x1024 f83 ..."]): yes, this is a known lifetime gap on main — PR #431 (GPU: free host textures only after running submissions, and make them on first use) specifically addresses host textures being freed while a recorded/submitted command list still references them.
  2. view heap ... 0x436914000 past its end (slot 566987264) / sampler heap ... slot 1139159808: those aren't garbage descriptor indices — DRED's reporter just prints the byte offset from each descriptor heap's GPUVA to the faulting address (0x104fa0000 + 0x2e00000 + 0x436914000 == 0x53e6b4000, the freed texture's address). So the fault itself is the freed texture, not an out-of-bounds heap slot.

No game data; AI-assisted.

**@⁠MartinIndra02** on GitHub · 2026-11-24 10:15 UTC · [original](https://github.com/Marvisak/VIctory/issues/772#issuecomment-7128532956) Two quick pointers on the DRED output: 1. **Freed texture page fault (`inside freed ["texture 1024x1024 f83 ..."]`):** yes, this is a known lifetime gap on `main` — PR **#431** (`GPU: free host textures only after running submissions, and make them on first use`) specifically addresses host textures being freed while a recorded/submitted command list still references them. 2. **`view heap ... 0x436914000 past its end (slot 566987264)` / `sampler heap ... slot 1139159808`:** those aren't garbage descriptor indices — DRED's reporter just prints the byte offset from each descriptor heap's GPUVA to the faulting address (`0x104fa0000 + 0x2e00000 + 0x436914000 == 0x53e6b4000`, the freed texture's address). So the fault itself is the freed texture, not an out-of-bounds heap slot. *No game data; AI-assisted.*
Author
Owner

@⁠Sunkiller-qc on GitHub · 2026-11-24 12:54 UTC · original

Same signature as #557 (device removed, page fault "inside freed" a 1024x1024 texture during world rendering). The latest results there change the picture: h0useadv found that the faulting texture had no view at all, and that the fault is most likely a read past the end of a 4 MB title-memory host copy. The freed texture is just whatever was at that address before. KingKaom confirmed it on RDNA4.

So #431 alone may not fix this. Your log would be more useful on #557, and I'd close this as a duplicate.

**@⁠Sunkiller-qc** on GitHub · 2026-11-24 12:54 UTC · [original](https://github.com/Marvisak/VIctory/issues/772#issuecomment-7132076771) Same signature as #557 (device removed, page fault "inside freed" a 1024x1024 texture during world rendering). The latest results there change the picture: h0useadv found that the faulting texture had no view at all, and that the fault is most likely a read past the end of a 4 MB title-memory host copy. The freed texture is just whatever was at that address before. KingKaom confirmed it on RDNA4. So #431 alone may not fix this. Your log would be more useful on #557, and I'd close this as a duplicate.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:51 UTC · original

Automated triage for the maintainers.

Thanks, a complete report (RX 6900 XT, driver 26.11.2, Windows 10 19045 with a local Agility SDK opt-in, 8e79c80, DRED output). The page fault ... inside freed ["texture 1024x1024 ..."] device removal in the world is tracked in #557, the oldest complete report of it. Please add your full log there.

On the two readings: the view heap ... past its end (slot ...) lines are offsets from each heap to the fault address, not descriptor indices the title used, as noted above. #557's latest results point to a read past the end of a title memory copy, not to a live view of the freed texture. Since 8e79c80, main gained d71c388, which binds root views as bounded views of their host copy (crates/victory-gpu/src/draw.rs). Please retry on current main (Windows 10 still needs your Agility opt-in, see #84) and say whether the fault remains. #609 (open) is the candidate for the freed-texture lifetime case.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:51 UTC · [original](https://github.com/Marvisak/VIctory/issues/772#issuecomment-7152308218) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-24T12:54:15Z at=2026-11-25T03:51:39Z --> Automated triage for the maintainers. Thanks, a complete report (RX 6900 XT, driver 26.11.2, Windows 10 19045 with a local Agility SDK opt-in, `8e79c80`, DRED output). The `page fault ... inside freed ["texture 1024x1024 ..."]` device removal in the world is tracked in #557, the oldest complete report of it. Please add your full log there. On the two readings: the `view heap ... past its end (slot ...)` lines are offsets from each heap to the fault address, not descriptor indices the title used, as noted above. #557's latest results point to a read past the end of a title memory copy, not to a live view of the freed texture. Since `8e79c80`, `main` gained `d71c388`, which binds root views as bounded views of their host copy (`crates/victory-gpu/src/draw.rs`). Please retry on current `main` (Windows 10 still needs your Agility opt-in, see #84) and say whether the fault remains. #609 (open) is the candidate for the freed-texture lifetime case. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
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/Marvisak--VIctory#772
No description provided.