A failed section heap is fatal in d73f11d/4b52fcd: a 12 GB card dies at boot (0xE0434352) where 68b6d06 survived and reached the story load #13

Closed
opened 2026-11-27 03:13:37 +00:00 by github-bot · 46 comments
Owner

@⁠danik1222 on GitHub · 2026-11-24 21:04 UTC · original

On a 12 GB card the game's 6.2 GiB section cannot be backed on the GPU. 68b6d06 survived that and reached the story load; every build since (d73f11d, 4b52fcd) dies at boot instead, right after the first failed section heap.

Tested on one machine, not the reference one:

CPU Intel Core i7-4770 (Haswell, no SSE4a, CLZERO, MONITORX/MWAITX, CLWB)
GPU NVIDIA RTX 3060, 12 GB
RAM 15.6 GB + 32 GB pagefile (commit limit 46.6 GB, grows to ~78 GB; never reached)
OS Windows 10/11 x64
Dump GTA VI Xbox Series 1.0.2.1, title 7952987A

Command (loader options after --):

fivestar run <dump> --work fs-new --gdk-lib xgameruntime.lib --dxc dxc.exe --timeout 1800
  -- --gdk-abi gdk-abi.txt --input-script boot-libre.input
     --shader-jobs 2 --min-free-memory 0 --max-commit 60
     --bcpack-tables bcpack-tables.bin
     --capture-dir captures --capture-presents 1800,3000

What works here (all of this on 68b6d06)

  • 1.107 imports, 0 unresolved; GDK table from Microsoft.GDK.Windows 2610 (416 named thunks).
  • With bcpack-tables.bin (the 77,982-byte file from VIctory's repository) fonts and textures
    decode exactly: the UI text is complete (Spanish), the artwork is full colour, 4K frames.
  • Reaches the first-run screens (legal, terms) and the story-load spinner.
  • Best run: 4.200 presents, 0 faults, ~5–8 fps while the driver compiles.
  • On-demand translation works: 0 up-front shader-translate, the driver cache builds up over boots.

The blocker: a failed section heap is fatal in the newer builds

On this card OpenExistingHeapFromAddress fails for part of the game's 6.2 GiB section
(XMemVirtualAlloc(0x185c00000)), because ~5 GiB of heaps is all that fits next to the title's 4K
targets and textures:

[xmem] XMemVirtualAlloc(0x0, 0x185c00000, ...)
[d3d12_xs] heap over section 0x1598 window 3 (0x40000000 bytes at ...)
[d3d12_xs] heap over section 0x1598 window 4 (0x40000000 bytes at ...)
WARN  [d3d12_xs] OpenExistingHeapFromAddress(...) failed: 0x8007000e
WARN  [d3d12_xs] address map: no view over section 0x1598; its pages read as zeros
  • 68b6d06: logs that and keeps running. The boot then lasts minutes and reaches the story
    load, where the game faults with 0xc0000005 access violation, write to 0x0 — plausibly reading
    0 from the unmapped window.
  • d73f11d and 4b52fcd: the same failure is fatal at boot: 0 presents, exit
    0xE0434352, in every configuration tried:
    • with the pipeline-cache/pipelines-used.bin produced here, and with it removed,
    • with the program-cache from 68b6d06, and with it removed,
    • with and without --trace-pool-stores,
    • with and without --retire-waits-all-queues.
      An AppDomain.UnhandledException handler in Program.Main does not fire, so it is not a plain
      unhandled exception on the main thread; WER shows only KERNELBASE+0xc569a, and there is no
      .NET Runtime event in the Application log.

So the new address map (the log line address map: 0x20a0000 bytes for 64 spans, views from desktop index 10, 1 ranges waiting) appears to treat the failed heap as fatal, where the old code read zeros
and continued. On a 24 GB card that failure never happens, which is why it is invisible on the
reference machines.

Window-size and profile tests (12 GB card)

Change Result
SectionHeaps.WindowBytes 1 GiB → 256 MiB Worse: all 25 windows fail with 0x8007000e; the limit is cumulative (~5 GiB), not per-allocation
--device-type 6 (Series S) Does not help: the run still logs a failed heap and the swap chain stays 3840x2160
--retire-waits-all-queues Sometimes runs 4.200 frames, sometimes faults after 2.400; not a reliable workaround
Patching the executable's CLWB to NOPs (--patches) Breaks the boot (0x80000003 at 8 presents, or 0xc0000005 with 0)

Secondary: intermittent 0xC000001D at a CLWB site (Intel Haswell)

Exit 0xC000001D (-1073741795), unrelated to the heap: sometimes after 8 presents, sometimes after
4.200. A WER dump gives:

exception code : 0xc000001d
exception addr : 0x144ecc84a   (game_scarlett_master.exe + 0x4ecc84a)

Bytes at that RVA (.text, RVA 0x1000 / raw 0x400):

8d 44 01 ff        lea eax,[rcx+rax-1]
49 83 e1 c0        and r9, -64
66 41 0f ae 31     clwb [r9]          <- faulting instruction (REX.B form)
49 83 c1 40        add r9, 64
49 39 c1           cmp r9, rax
76 f2              jbe -14

The handler emulated CLWB at +0x4e4b680 earlier in the same log, so the same kind of fault is
handled at one site and not at another. Forcing LineLoop.TrySkip to return 0 (no cache-line loop
fast-forward) does not change it.

Ask

  1. A failed section heap should not be fatal. 68b6d06 fell back to zeros; if the new address map
    did the same, a 12 GB card would reach the story load (and the rest of the run would at least be
    measurable).
  2. Could the section be backed lazily, per page a program actually addresses? The title maps
    6.2 GiB but the frames we see touch far less; on a 12 GB card that difference decides whether the
    load completes.
  3. Is the CLWB REX.B form supposed to be emulated? It is emulated once and then faults at the
    same RIP later in the same boot.

Patches/logs available on request: the two logs (68b6d06 and 4b52fcd), the WER dump (trimmed) and
the exact command line. I can also run any diagnostic build (--memory-map, --watch-transient,
--trace-pool-stores) on this card and report back — that is the one thing the reference machine
cannot reproduce.

**@⁠danik1222** on GitHub · 2026-11-24 21:04 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13) **On a 12 GB card the game's 6.2 GiB section cannot be backed on the GPU. `68b6d06` survived that and reached the story load; every build since (`d73f11d`, `4b52fcd`) dies at boot instead, right after the first failed section heap.** Tested on one machine, not the reference one: | | | |---|---| | CPU | Intel Core i7-4770 (Haswell, no SSE4a, CLZERO, MONITORX/MWAITX, CLWB) | | GPU | **NVIDIA RTX 3060, 12 GB** | | RAM | 15.6 GB + 32 GB pagefile (commit limit 46.6 GB, grows to ~78 GB; never reached) | | OS | Windows 10/11 x64 | | Dump | GTA VI Xbox Series 1.0.2.1, title `7952987A` | Command (loader options after `--`): ``` fivestar run <dump> --work fs-new --gdk-lib xgameruntime.lib --dxc dxc.exe --timeout 1800 -- --gdk-abi gdk-abi.txt --input-script boot-libre.input --shader-jobs 2 --min-free-memory 0 --max-commit 60 --bcpack-tables bcpack-tables.bin --capture-dir captures --capture-presents 1800,3000 ``` ## What works here (all of this on `68b6d06`) * 1.107 imports, 0 unresolved; GDK table from `Microsoft.GDK.Windows` 2610 (416 named thunks). * With `bcpack-tables.bin` (the 77,982-byte file from VIctory's repository) fonts and textures decode exactly: the UI text is complete (Spanish), the artwork is full colour, 4K frames. * Reaches the first-run screens (legal, terms) and the story-load spinner. * Best run: **4.200 presents**, 0 faults, ~5–8 fps while the driver compiles. * On-demand translation works: 0 up-front `shader-translate`, the driver cache builds up over boots. ## The blocker: a failed section heap is fatal in the newer builds On this card `OpenExistingHeapFromAddress` fails for part of the game's 6.2 GiB section (`XMemVirtualAlloc(0x185c00000)`), because ~5 GiB of heaps is all that fits next to the title's 4K targets and textures: ``` [xmem] XMemVirtualAlloc(0x0, 0x185c00000, ...) [d3d12_xs] heap over section 0x1598 window 3 (0x40000000 bytes at ...) [d3d12_xs] heap over section 0x1598 window 4 (0x40000000 bytes at ...) WARN [d3d12_xs] OpenExistingHeapFromAddress(...) failed: 0x8007000e WARN [d3d12_xs] address map: no view over section 0x1598; its pages read as zeros ``` * **`68b6d06`**: logs that and keeps running. The boot then lasts minutes and reaches the story load, where the game faults with `0xc0000005 access violation, write to 0x0` — plausibly reading 0 from the unmapped window. * **`d73f11d` and `4b52fcd`**: the same failure is **fatal at boot**: `0 presents`, exit `0xE0434352`, in every configuration tried: * with the `pipeline-cache`/`pipelines-used.bin` produced here, and with it removed, * with the `program-cache` from `68b6d06`, and with it removed, * with and without `--trace-pool-stores`, * with and without `--retire-waits-all-queues`. An `AppDomain.UnhandledException` handler in `Program.Main` does not fire, so it is not a plain unhandled exception on the main thread; WER shows only `KERNELBASE+0xc569a`, and there is no `.NET Runtime` event in the Application log. So the new address map (the log line `address map: 0x20a0000 bytes for 64 spans, views from desktop index 10, 1 ranges waiting`) appears to treat the failed heap as fatal, where the old code read zeros and continued. On a 24 GB card that failure never happens, which is why it is invisible on the reference machines. ### Window-size and profile tests (12 GB card) | Change | Result | |---|---| | `SectionHeaps.WindowBytes` 1 GiB → 256 MiB | **Worse**: all 25 windows fail with `0x8007000e`; the limit is cumulative (~5 GiB), not per-allocation | | `--device-type 6` (Series S) | Does not help: the run still logs a failed heap and the swap chain stays 3840x2160 | | `--retire-waits-all-queues` | Sometimes runs 4.200 frames, sometimes faults after 2.400; not a reliable workaround | | Patching the executable's `CLWB` to NOPs (`--patches`) | Breaks the boot (`0x80000003` at 8 presents, or `0xc0000005` with 0) | ## Secondary: intermittent `0xC000001D` at a `CLWB` site (Intel Haswell) Exit `0xC000001D` (`-1073741795`), unrelated to the heap: sometimes after 8 presents, sometimes after 4.200. A WER dump gives: ``` exception code : 0xc000001d exception addr : 0x144ecc84a (game_scarlett_master.exe + 0x4ecc84a) ``` Bytes at that RVA (`.text`, RVA 0x1000 / raw 0x400): ``` 8d 44 01 ff lea eax,[rcx+rax-1] 49 83 e1 c0 and r9, -64 66 41 0f ae 31 clwb [r9] <- faulting instruction (REX.B form) 49 83 c1 40 add r9, 64 49 39 c1 cmp r9, rax 76 f2 jbe -14 ``` The handler emulated `CLWB` at `+0x4e4b680` earlier in the same log, so the same kind of fault is handled at one site and not at another. Forcing `LineLoop.TrySkip` to return 0 (no cache-line loop fast-forward) does not change it. ## Ask 1. **A failed section heap should not be fatal.** `68b6d06` fell back to zeros; if the new address map did the same, a 12 GB card would reach the story load (and the rest of the run would at least be measurable). 2. **Could the section be backed lazily, per page a program actually addresses?** The title maps 6.2 GiB but the frames we see touch far less; on a 12 GB card that difference decides whether the load completes. 3. **Is the `CLWB` REX.B form supposed to be emulated?** It is emulated once and then faults at the same RIP later in the same boot. Patches/logs available on request: the two logs (`68b6d06` and `4b52fcd`), the WER dump (trimmed) and the exact command line. I can also run any diagnostic build (`--memory-map`, `--watch-transient`, `--trace-pool-stores`) on this card and report back — that is the one thing the reference machine cannot reproduce.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 03:13:37 +00:00
Author
Owner

@⁠danik1222 on GitHub · 2026-11-24 21:04 UTC · original

Excerpts from the two logs on the 12 GB card. Both are from the same machine, same dump, same command line; only the build differs.

68b6d06 — the failure is tolerated, the boot runs to the story load

[xmem] XMemVirtualAlloc(0x0, 0x185c00000, type=0x20402000, flags=0x23, protect=0x2004) -> 0x13676620000
[d3d12_xs] heap over section 0x15ec window 0 (0x40000000 bytes at 0x137fc220000)
[d3d12_xs] heap over section 0x15ec window 1 (0x40000000 bytes at 0x1383c220000)
[d3d12_xs] heap over section 0x15ec window 2 (0x40000000 bytes at 0x1387c220000)
[d3d12_xs] heap over section 0x15ec window 3 (0x40000000 bytes at 0x138bc220000)
[d3d12_xs] heap over section 0x15ec window 4 (0x40000000 bytes at 0x138fc220000)
WARN  [d3d12_xs] OpenExistingHeapFromAddress(0x138fc220000) failed: 0x8007000e
WARN  [d3d12_xs] address map: no view over section 0x15ec; its pages read as zeros
[d3d12_xs] heap over section 0x15ec window 5 (0x40000000 bytes at 0x1393c220000)
WARN  [d3d12_xs] OpenExistingHeapFromAddress(0x1393c220000) failed: 0x8007000e
[d3d12_xs] heap over section 0x15ec window 6 (0x8000000 bytes at 0x1397c220000)
...
[present] 600 presents, 72.87 ms mean interval over the last 600
[present] 1200 presents, 183.83 ms mean interval over the last 600
ERROR FAULT #1 on thread 10956: 0xc0000005 access violation, write to 0x0

4b52fcd — the same failure, then the process ends at boot

[d3d12_xs] heap over section 0x1598 window 2 (0x40000000 bytes at 0x1d7f8d40000)
[d3d12_xs] heap over section 0x1598 window 3 (0x40000000 bytes at 0x1d838d40000)
[d3d12_xs] heap over section 0x1598 window 4 (0x40000000 bytes at 0x1d878d40000)
WARN  [d3d12_xs] OpenExistingHeapFromAddress(0x1d878d40000) failed: 0x8007000e
WARN  [d3d12_xs] address map: no view over section 0x1598; its pages read as zeros
[d3d12_xs] heap over section 0x1598 window 5 (0x40000000 bytes at 0x1d8b8d40000)
WARN  [d3d12_xs] OpenExistingHeapFromAddress(0x1d8b8d40000) failed: 0x8007000e
[d3d12_xs] heap over section 0x1598 window 6 (0x8000000 bytes at 0x1d8f8d40000)
[d3d12_xs] ID3D12Device.X::Slot74(0x1d5f3140000, 99776 pages) -> S_OK (no-op)
[d3d12_xs] D3D12SerializeVersionedRootSignature(version=0x2, flags 0xc00) -> 0x00000000 (forwarded to d3d12.dll)
[d3d12_xs] console-address textures: PlacedTexture 0, View 4, ViewResolved 0, ViewCreatedTexture 0, ViewBuffer 3, ViewNull 0, Upload 0, UploadSkipped 0
[d3d12_xs] texture at 0x1d2b7532000: 256x128x1, 1 mips, format 61, layout 0x117, 0x8000 bytes, filled from memory

then nothing: fivestar-loader exit code -532462766 (0xE0434352), 0 presents, 0 faults, 6 warnings.

Both sections are ~6.2 GiB (99776 pages at the call above); in each case the heap that fails is the
fifth or sixth 1 GiB window, i.e. once ~4–5 GiB of heaps is already resident on a 12 GB card.

The failure also reproduces with --bcpack-tables absent (placeholder textures), so it is not the
decoded texture set that pushes it over: it is the section mapping itself.

**@⁠danik1222** on GitHub · 2026-11-24 21:04 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7144443082) Excerpts from the two logs on the 12 GB card. Both are from the same machine, same dump, same command line; only the build differs. ### `68b6d06` — the failure is tolerated, the boot runs to the story load ``` [xmem] XMemVirtualAlloc(0x0, 0x185c00000, type=0x20402000, flags=0x23, protect=0x2004) -> 0x13676620000 [d3d12_xs] heap over section 0x15ec window 0 (0x40000000 bytes at 0x137fc220000) [d3d12_xs] heap over section 0x15ec window 1 (0x40000000 bytes at 0x1383c220000) [d3d12_xs] heap over section 0x15ec window 2 (0x40000000 bytes at 0x1387c220000) [d3d12_xs] heap over section 0x15ec window 3 (0x40000000 bytes at 0x138bc220000) [d3d12_xs] heap over section 0x15ec window 4 (0x40000000 bytes at 0x138fc220000) WARN [d3d12_xs] OpenExistingHeapFromAddress(0x138fc220000) failed: 0x8007000e WARN [d3d12_xs] address map: no view over section 0x15ec; its pages read as zeros [d3d12_xs] heap over section 0x15ec window 5 (0x40000000 bytes at 0x1393c220000) WARN [d3d12_xs] OpenExistingHeapFromAddress(0x1393c220000) failed: 0x8007000e [d3d12_xs] heap over section 0x15ec window 6 (0x8000000 bytes at 0x1397c220000) ... [present] 600 presents, 72.87 ms mean interval over the last 600 [present] 1200 presents, 183.83 ms mean interval over the last 600 ERROR FAULT #1 on thread 10956: 0xc0000005 access violation, write to 0x0 ``` ### `4b52fcd` — the same failure, then the process ends at boot ``` [d3d12_xs] heap over section 0x1598 window 2 (0x40000000 bytes at 0x1d7f8d40000) [d3d12_xs] heap over section 0x1598 window 3 (0x40000000 bytes at 0x1d838d40000) [d3d12_xs] heap over section 0x1598 window 4 (0x40000000 bytes at 0x1d878d40000) WARN [d3d12_xs] OpenExistingHeapFromAddress(0x1d878d40000) failed: 0x8007000e WARN [d3d12_xs] address map: no view over section 0x1598; its pages read as zeros [d3d12_xs] heap over section 0x1598 window 5 (0x40000000 bytes at 0x1d8b8d40000) WARN [d3d12_xs] OpenExistingHeapFromAddress(0x1d8b8d40000) failed: 0x8007000e [d3d12_xs] heap over section 0x1598 window 6 (0x8000000 bytes at 0x1d8f8d40000) [d3d12_xs] ID3D12Device.X::Slot74(0x1d5f3140000, 99776 pages) -> S_OK (no-op) [d3d12_xs] D3D12SerializeVersionedRootSignature(version=0x2, flags 0xc00) -> 0x00000000 (forwarded to d3d12.dll) [d3d12_xs] console-address textures: PlacedTexture 0, View 4, ViewResolved 0, ViewCreatedTexture 0, ViewBuffer 3, ViewNull 0, Upload 0, UploadSkipped 0 [d3d12_xs] texture at 0x1d2b7532000: 256x128x1, 1 mips, format 61, layout 0x117, 0x8000 bytes, filled from memory ``` then nothing: `fivestar-loader exit code -532462766` (`0xE0434352`), 0 presents, 0 faults, 6 warnings. Both sections are ~6.2 GiB (`99776` pages at the call above); in each case the heap that fails is the fifth or sixth 1 GiB window, i.e. once ~4–5 GiB of heaps is already resident on a 12 GB card. The failure also reproduces with `--bcpack-tables` absent (placeholder textures), so it is not the decoded texture set that pushes it over: it is the section mapping itself.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-24 21:39 UTC · original

Also reproduced on 9423dde (main as of 2026-11-24 22:38, i.e. after the lane-present letterboxed scaling and the lane-perf texture-upload changes), same machine, same command line:

fivestar-loader exit code -532462766 (0xE0434352): 0 presents, 0 faults, 6 warnings

The log again ends right after the failed section heap:

[d3d12_xs] heap over section 0x15d8 window 4 (0x10000000 bytes at ...)      <- this run had a smaller window
WARN  [d3d12_xs] OpenExistingHeapFromAddress(...) failed: 0x8007000e
WARN  [d3d12_xs] address map: no view over section 0x15d8; its pages read as zeros

68b6d06 on the same card still boots and reaches the story load, so the difference is still the newer address map treating a failed heap as fatal. Retested with the program cache and the pipeline journal removed as well: same result.

**@⁠danik1222** on GitHub · 2026-11-24 21:39 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7145226617) Also reproduced on **`9423dde`** (main as of 2026-11-24 22:38, i.e. after the lane-present letterboxed scaling and the lane-perf texture-upload changes), same machine, same command line: ``` fivestar-loader exit code -532462766 (0xE0434352): 0 presents, 0 faults, 6 warnings ``` The log again ends right after the failed section heap: ``` [d3d12_xs] heap over section 0x15d8 window 4 (0x10000000 bytes at ...) <- this run had a smaller window WARN [d3d12_xs] OpenExistingHeapFromAddress(...) failed: 0x8007000e WARN [d3d12_xs] address map: no view over section 0x15d8; its pages read as zeros ``` `68b6d06` on the same card still boots and reaches the story load, so the difference is still the newer address map treating a failed heap as fatal. Retested with the program cache and the pipeline journal removed as well: same result.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-24 21:40 UTC · original

Two notes from the machine in this report (i7-4770, RTX 3060 12 GB):

#14 is about this machine. The "5 to 8 fps on a 4-core i7-4770" in that PR is this run: 600→4.200 presents at 73–200 ms per frame while the driver compiles. Once a build boots here again (see the section heap below), I can run the A/B that PR asks for -- --normal-priority-builds on and off, same dump, same input script, with --capture-presents for the frame times -- and post the numbers. That is a 4-core, not a 12-thread, data point.

Still the blocker on this card: main 9423dde and 4b52fcd both die at boot with 0xE0434352 and 0 presents, right after OpenExistingHeapFromAddress fails for a window of the 6.2 GiB section; 68b6d06 logs the same failure and keeps going to the story load. So any A/B has to wait for a build where a failed section heap is not fatal -- or for a way to make it not fail on 12 GB (lazy per-page backing).

**@⁠danik1222** on GitHub · 2026-11-24 21:40 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7145250018) Two notes from the machine in this report (i7-4770, RTX 3060 12 GB): **#14 is about this machine.** The "5 to 8 fps on a 4-core i7-4770" in that PR is this run: 600→4.200 presents at 73–200 ms per frame while the driver compiles. Once a build boots here again (see the section heap below), I can run the A/B that PR asks for -- `--normal-priority-builds` on and off, same dump, same input script, with `--capture-presents` for the frame times -- and post the numbers. That is a 4-core, not a 12-thread, data point. **Still the blocker on this card:** main `9423dde` and `4b52fcd` both die at boot with `0xE0434352` and 0 presents, right after `OpenExistingHeapFromAddress` fails for a window of the 6.2 GiB section; `68b6d06` logs the same failure and keeps going to the story load. So any A/B has to wait for a build where a failed section heap is not fatal -- or for a way to make it not fail on 12 GB (lazy per-page backing).
Author
Owner

@⁠marquezinii on GitHub · 2026-11-24 21:49 UTC · original

I looked at the crash on the 12 GB card and wrote a fix: #15. Summary:

Why the newer builds end at boot. GpuTextureUploader creates its upload buffer through Vortice, and Vortice throws when the creation fails. The upload buffer is system memory, and the section heaps had already used up that budget (the same 0x8007000e as the failed windows). So the first texture filled from memory threw E_OUTOFMEMORY on the game's thread, and the process ended with 0xE0434352. That is why nothing was logged and your UnhandledException handler never ran. With #15, that fill fails, is logged and counted (UploadFailed), and the boot goes on.

What runs out is RAM, not VRAM. Heaps from OpenExistingHeapFromAddress are system memory and count against the adapter's non-local segment, whose budget is half of physical memory. On my machine (RTX 5070, also 12 GB, 32 GB of RAM) QueryVideoMemoryInfo reports a local budget of 11.7 GB and a non-local budget of 16.3 GB. With 15.6 GB of RAM you get about 7.8 GB. The 6.2 GiB section's windows, plus the upload ring and the other system-memory buffers, go past that around the fifth window, which matches your logs. A 3060 in a 32 GB machine would most likely open every window.

Why 68b6d06 got further. The address map that follows remaps (#8, mine) gives every mapped XMem page a view of its section. It does that when the map starts and at every remap, so the whole 6.2 GiB section is opened as heaps at boot. Before that, only slot-133 buffer runs opened windows, and only when the game placed one there. So #8 raised the non-local use, and on a 16 GB machine that is where the budget runs out.

What #15 does not fix. Pages in a window whose heap failed still read as zeros on the GPU. That is probably what led to the write to 0x0 fault at the story load on 68b6d06, and a 16 GB machine will likely reach it again. Possible directions; the choice is the maintainer's:

  • open a window only once something in it is used by the GPU, not for every mapped page;
  • make window heaps resident on demand (MakeResident/Evict), so the 6.2 GiB do not all stay resident at once;
  • log the non-local budget at startup and warn when the section heaps will not fit, so a run on a 16 GB machine says so up front.

@⁠danik1222, could you run #15 (branch loader/texture-upload-oom on marquezinii/five-star-recomp) on the 3060 machine and post how far it gets, and whether the log shows not filled from memory lines? I can't reproduce it here: with 32 GB the budget is 16 GB.

**@⁠marquezinii** on GitHub · 2026-11-24 21:49 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7145429995) I looked at the crash on the 12 GB card and wrote a fix: #15. Summary: **Why the newer builds end at boot.** `GpuTextureUploader` creates its upload buffer through Vortice, and Vortice throws when the creation fails. The upload buffer is system memory, and the section heaps had already used up that budget (the same `0x8007000e` as the failed windows). So the first texture filled from memory threw `E_OUTOFMEMORY` on the game's thread, and the process ended with 0xE0434352. That is why nothing was logged and your `UnhandledException` handler never ran. With #15, that fill fails, is logged and counted (`UploadFailed`), and the boot goes on. **What runs out is RAM, not VRAM.** Heaps from `OpenExistingHeapFromAddress` are system memory and count against the adapter's non-local segment, whose budget is half of physical memory. On my machine (RTX 5070, also 12 GB, 32 GB of RAM) `QueryVideoMemoryInfo` reports a local budget of 11.7 GB and a non-local budget of 16.3 GB. With 15.6 GB of RAM you get about 7.8 GB. The 6.2 GiB section's windows, plus the upload ring and the other system-memory buffers, go past that around the fifth window, which matches your logs. A 3060 in a 32 GB machine would most likely open every window. **Why `68b6d06` got further.** The address map that follows remaps (#8, mine) gives every mapped XMem page a view of its section. It does that when the map starts and at every remap, so the whole 6.2 GiB section is opened as heaps at boot. Before that, only slot-133 buffer runs opened windows, and only when the game placed one there. So #8 raised the non-local use, and on a 16 GB machine that is where the budget runs out. **What #15 does not fix.** Pages in a window whose heap failed still read as zeros on the GPU. That is probably what led to the `write to 0x0` fault at the story load on `68b6d06`, and a 16 GB machine will likely reach it again. Possible directions; the choice is the maintainer's: - open a window only once something in it is used by the GPU, not for every mapped page; - make window heaps resident on demand (`MakeResident`/`Evict`), so the 6.2 GiB do not all stay resident at once; - log the non-local budget at startup and warn when the section heaps will not fit, so a run on a 16 GB machine says so up front. @⁠danik1222, could you run #15 (branch `loader/texture-upload-oom` on marquezinii/five-star-recomp) on the 3060 machine and post how far it gets, and whether the log shows `not filled from memory` lines? I can't reproduce it here: with 32 GB the budget is 16 GB.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-24 21:53 UTC · original

**#15 tested on the 3060 machine** (branch loader/texture-upload-oom at a654736, built here; same dump, same command line, --bcpack-tables + --shader-jobs 2).

Good news first: the 0xE0434352 crash is gone. The boot no longer dies with 0 presents on a managed exception.

What the log shows now (exactly the lines you asked about):

WARN  [d3d12_xs] OpenExistingHeapFromAddress(0x141f8ff0000) failed: 0x8007000e
WARN  [d3d12_xs] address map: no view over section 0x15b0; its pages read as zeros
WARN  [d3d12_xs] OpenExistingHeapFromAddress(0x14238ff0000) failed: 0x8007000e
WARN  [d3d12_xs] texture at 0x13c60a92000 (32768 bytes) not filled from memory: E_OUTOFMEMORY ...
WARN  [d3d12_xs] texture at 0x13c6f057000 (4096 bytes) not filled from memory: E_OUTOFMEMORY ...
... 14 `not filled from memory` in all, 3 failed section heaps

Then the boot stops on the game's own breakpoint:

ERROR FAULT #1 on thread 14204: 0x80000003
fivestar-loader exit code -2147483645  (0x80000003): 0 presents, 1 fault, 20 warnings

So: UploadFailed works, the run survives the fill failures, and the next wall is a int3 in the game right after (the last traced calls are xg_xs.dll!XGCreateTextureComputer / XGSuggestSwizzleMode). My guess is the game asserts because the textures it asked for are not there -- but you will know better than me.

This also confirms your budget arithmetic: with 15.6 GB of RAM the section heaps run out at the fifth window, and the upload ring goes with them. If you want a data point from a 32 GB machine I cannot give it -- this one is 15.6 GB. But I can run anything you want on it: a diagnostic build that logs QueryVideoMemoryInfo at startup (as you suggested), --eager-pipelines off/on, or #14's --normal-priority-builds A/B once a build gets past this int3.

**@⁠danik1222** on GitHub · 2026-11-24 21:53 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7145526139) **#15 tested on the 3060 machine** (branch `loader/texture-upload-oom` at `a654736`, built here; same dump, same command line, `--bcpack-tables` + `--shader-jobs 2`). Good news first: **the `0xE0434352` crash is gone.** The boot no longer dies with 0 presents on a managed exception. What the log shows now (exactly the lines you asked about): ``` WARN [d3d12_xs] OpenExistingHeapFromAddress(0x141f8ff0000) failed: 0x8007000e WARN [d3d12_xs] address map: no view over section 0x15b0; its pages read as zeros WARN [d3d12_xs] OpenExistingHeapFromAddress(0x14238ff0000) failed: 0x8007000e WARN [d3d12_xs] texture at 0x13c60a92000 (32768 bytes) not filled from memory: E_OUTOFMEMORY ... WARN [d3d12_xs] texture at 0x13c6f057000 (4096 bytes) not filled from memory: E_OUTOFMEMORY ... ... 14 `not filled from memory` in all, 3 failed section heaps ``` Then the boot stops on the game's own breakpoint: ``` ERROR FAULT #1 on thread 14204: 0x80000003 fivestar-loader exit code -2147483645 (0x80000003): 0 presents, 1 fault, 20 warnings ``` So: `UploadFailed` works, the run survives the fill failures, and the next wall is a `int3` in the game right after (the last traced calls are `xg_xs.dll!XGCreateTextureComputer` / `XGSuggestSwizzleMode`). My guess is the game asserts because the textures it asked for are not there -- but you will know better than me. This also confirms your budget arithmetic: with 15.6 GB of RAM the section heaps run out at the fifth window, and the upload ring goes with them. **If you want a data point from a 32 GB machine I cannot give it** -- this one is 15.6 GB. But I can run anything you want on it: a diagnostic build that logs `QueryVideoMemoryInfo` at startup (as you suggested), `--eager-pipelines` off/on, or #14's `--normal-priority-builds` A/B once a build gets past this int3.
Author
Owner

@⁠marquezinii on GitHub · 2026-11-24 21:55 UTC · original

Thanks for testing so fast. So the managed exception was the first wall, and #15 gets past it.

About the int3: I think the cause is the same budget running out, not the textures. With the non-local segment full, the command-list upload ring can't get its buffer either (list slot 148: no upload buffer; allocations return null). After that, every AllocateUploadMemory returns null to the game, and a null there is something the game would assert on. The XG calls are probably just the last ones traced before it. To confirm:

  1. Is that list slot 148 warning in the log, and roughly where relative to the int3?
  2. The faulting address of FAULT #1 (the RVA in game_scarlett_master.exe), and the ~20 log lines before it.

If it is the upload ring, more fallbacks won't help. The section heaps have to take less of the non-local budget on a 16 GB machine, i.e. open windows lazily instead of one heap per mapped page at boot. That is follow-up work on the address map from #8. I'll raise it with the maintainer rather than start it unasked, since it touches their memory model.

The --normal-priority-builds A/B from #14 is on hold until the maintainer's compile-host change lands. #14 will then be narrowed to the pipeline build threads.

**@⁠marquezinii** on GitHub · 2026-11-24 21:55 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7145571380) Thanks for testing so fast. So the managed exception was the first wall, and #15 gets past it. About the `int3`: I think the cause is the same budget running out, not the textures. With the non-local segment full, the command-list upload ring can't get its buffer either (`list slot 148: no upload buffer; allocations return null`). After that, every `AllocateUploadMemory` returns null to the game, and a null there is something the game would assert on. The XG calls are probably just the last ones traced before it. To confirm: 1. Is that `list slot 148` warning in the log, and roughly where relative to the `int3`? 2. The faulting address of `FAULT #1` (the RVA in `game_scarlett_master.exe`), and the ~20 log lines before it. If it is the upload ring, more fallbacks won't help. The section heaps have to take less of the non-local budget on a 16 GB machine, i.e. open windows lazily instead of one heap per mapped page at boot. That is follow-up work on the address map from #8. I'll raise it with the maintainer rather than start it unasked, since it touches their memory model. The `--normal-priority-builds` A/B from #14 is on hold until the maintainer's compile-host change lands. #14 will then be narrowed to the pipeline build threads.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-24 21:57 UTC · original

Answers to both questions, from run-20261124-225153.log (build a654736).

1. No list slot 148 warning at all (0 matches for slot 148, upload buffer or AllocateUpload). What is there, in the last 25 lines before the int3, is a failed command-list close, and the boxed HRESULT is the same budget:

[d3d12_xs] console-address textures: PlacedTexture 2, View 32, ViewResolved 0, ViewCreatedTexture 22,
            ViewBuffer 9, ViewNull 3, Upload 0, UploadSkipped 0, UploadFailed 22
WARN  [d3d12_xs] game memory 0x13c17690000: OpenExistingHeapFromAddress failed: 0x8007000e
WARN  [d3d12_xs] a bottom-of-pipe write to 0x13c1b826698, outside known game memory: skipped
WARN  [d3d12_xs] command list Close failed: 0x8007000e (an invalid call was recorded; the list is replaced at its next Reset)
ERROR FAULT #1 on thread 14204: 0x80000003

2. The faulting address and the assertion. It is game_scarlett_master.exe RVA 0x72ac, inside the function at RVA 0x7270..0x7323 (+0x3c):

at       0x1400072ac game_scarlett_master.exe RVA 0x72ac
function RVA 0x7270..0x7323 (+0x3c, inside the nearest .pdata entry)
code     CC EB 07 89 C1 E8 AA 43 E9 04 C6 07 01 48 C7 47
rax=0x000000008007000e   rcx=0x00000023c9aff3f8   rdx=0x0
stack (12 frames):
0x1400072ac RVA 0x72ac
0x144daa120 RVA 0x4daa120
0x144da9e8b RVA 0x4da9e8b
0x142484808 RVA 0x2484808
...

So it is the game's own int3 assertion, and rax still holds 0x8007000e when it fires -- the E_OUTOFMEMORY from the failed allocation is what it asserts on. That fits your reading: the ring/budget runs out, an allocation returns the failure, the game checks it and breaks. The xg_xs calls after that are just the last traced ones.

Your summary matches what we see: #15 turns the process-ending managed exception into 22 counted UploadFailed and a logged close failure, and the next wall is the game's assertion on that HRESULT. I agree that more fallbacks do not help -- the section heaps have to give the non-local budget back, i.e. lazy windows in the #8 address map. Happy to test that when it exists, and to run QueryVideoMemoryInfo logging on this machine in the meantime if it helps you size the budget (15.6 GB RAM here).

**@⁠danik1222** on GitHub · 2026-11-24 21:57 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7145623196) Answers to both questions, from `run-20261124-225153.log` (build `a654736`). **1. No `list slot 148` warning at all** (0 matches for `slot 148`, `upload buffer` or `AllocateUpload`). What is there, in the last 25 lines before the `int3`, is a **failed command-list close**, and the boxed HRESULT is the same budget: ``` [d3d12_xs] console-address textures: PlacedTexture 2, View 32, ViewResolved 0, ViewCreatedTexture 22, ViewBuffer 9, ViewNull 3, Upload 0, UploadSkipped 0, UploadFailed 22 WARN [d3d12_xs] game memory 0x13c17690000: OpenExistingHeapFromAddress failed: 0x8007000e WARN [d3d12_xs] a bottom-of-pipe write to 0x13c1b826698, outside known game memory: skipped WARN [d3d12_xs] command list Close failed: 0x8007000e (an invalid call was recorded; the list is replaced at its next Reset) ERROR FAULT #1 on thread 14204: 0x80000003 ``` **2. The faulting address and the assertion.** It is `game_scarlett_master.exe RVA 0x72ac`, inside the function at RVA `0x7270..0x7323` (+0x3c): ``` at 0x1400072ac game_scarlett_master.exe RVA 0x72ac function RVA 0x7270..0x7323 (+0x3c, inside the nearest .pdata entry) code CC EB 07 89 C1 E8 AA 43 E9 04 C6 07 01 48 C7 47 rax=0x000000008007000e rcx=0x00000023c9aff3f8 rdx=0x0 stack (12 frames): 0x1400072ac RVA 0x72ac 0x144daa120 RVA 0x4daa120 0x144da9e8b RVA 0x4da9e8b 0x142484808 RVA 0x2484808 ... ``` So it is the game's own `int3` assertion, and **`rax` still holds `0x8007000e`** when it fires -- the E_OUTOFMEMORY from the failed allocation is what it asserts on. That fits your reading: the ring/budget runs out, an allocation returns the failure, the game checks it and breaks. The `xg_xs` calls after that are just the last traced ones. Your summary matches what we see: #15 turns the process-ending managed exception into 22 counted `UploadFailed` and a logged close failure, and the next wall is the game's assertion on that HRESULT. I agree that more fallbacks do not help -- the section heaps have to give the non-local budget back, i.e. lazy windows in the #8 address map. Happy to test that when it exists, and to run `QueryVideoMemoryInfo` logging on this machine in the meantime if it helps you size the budget (15.6 GB RAM here).
Author
Owner

@⁠danik1222 on GitHub · 2026-11-24 22:09 UTC · original

One negative result, so nobody spends time on it: trimming the working set does not change the budget.

I ran #15 with a helper that called EmptyWorkingSet on the loader every 2 s (forcing pages to the pagefile, freeing physical RAM), to test whether the non-local budget follows free memory rather than RAM/2. Identical numbers with and without it:

failed section heaps not filled from memory end
#15, plain 3 8 int3 (0x80000003), 0 presents
#15 + working-set trim 3 8 int3 (0x80000003), command list Close failed: 0x8007000e

So the budget is fixed (half of physical RAM), not a function of free memory -- freeing 2-3 GB of working set opens no extra window. That rules out the "make room by paging" direction on a 16 GB machine; only taking less of the budget (lazy windows) or more RAM will do it.

I am back on 68b6d06 here in the meantime, since it boots and reaches the story load.

**@⁠danik1222** on GitHub · 2026-11-24 22:09 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7145887253) One negative result, so nobody spends time on it: **trimming the working set does not change the budget.** I ran #15 with a helper that called `EmptyWorkingSet` on the loader every 2 s (forcing pages to the pagefile, freeing physical RAM), to test whether the non-local budget follows free memory rather than RAM/2. Identical numbers with and without it: | | failed section heaps | `not filled from memory` | end | |---|---|---|---| | #15, plain | 3 | 8 | int3 (0x80000003), 0 presents | | #15 + working-set trim | 3 | 8 | int3 (0x80000003), `command list Close failed: 0x8007000e` | So the budget is fixed (half of physical RAM), not a function of free memory -- freeing 2-3 GB of working set opens no extra window. That rules out the "make room by paging" direction on a 16 GB machine; only taking less of the budget (lazy windows) or more RAM will do it. I am back on `68b6d06` here in the meantime, since it boots and reaches the story load.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-24 22:14 UTC · original

Tested main 2e637d (the merge of #15) on the 3060 / 15.6 GB machine, same command line:

ERROR FAULT #1 on thread 14728: 0x80000003
WARN  [d3d12_xs] command list Close failed: 0x8007000e (an invalid call was recorded; the list is replaced at its next Reset)
fivestar-loader exit code -2147483645: 0 presents, 1 fault, 20 warnings

Same counts as the branch build: 3 failed section heaps, 8
ot filled from memory
, 0 presents.

So #15 did its job (no more ␀xE0434352; the failures are logged and counted) and the next wall is exactly what you predicted: the non-local budget is gone before the game finishes booting, an allocation returns ␀x8007000e, and the game asserts on it.

That makes the address-map change the only thing between this machine and a boot: open windows when the GPU first uses them instead of one heap per mapped page at startup (#8). Happy to test any branch that does it, and to post the numbers for it on a 16 GB machine -- which is the case you cannot reproduce.

**@⁠danik1222** on GitHub · 2026-11-24 22:14 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7145973477) Tested **main 2e637d** (the merge of #15) on the 3060 / 15.6 GB machine, same command line: ``` ERROR FAULT #1 on thread 14728: 0x80000003 WARN [d3d12_xs] command list Close failed: 0x8007000e (an invalid call was recorded; the list is replaced at its next Reset) fivestar-loader exit code -2147483645: 0 presents, 1 fault, 20 warnings ``` Same counts as the branch build: **3 failed section heaps**, **8 ot filled from memory**, **0 presents**. So #15 did its job (no more ␀xE0434352; the failures are logged and counted) and the next wall is exactly what you predicted: the non-local budget is gone before the game finishes booting, an allocation returns ␀x8007000e, and the game asserts on it. That makes the address-map change the only thing between this machine and a boot: open windows when the GPU first uses them instead of one heap per mapped page at startup (#8). Happy to test any branch that does it, and to post the numbers for it on a 16 GB machine -- which is the case you cannot reproduce.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-24 22:34 UTC · original

lazy windows are in main now (880e616), which is pretty much what you two worked out here. the loader reads the non-local budget from DXGI and only opens section heaps while they fit, with some headroom left for upload buffers and the command lists. a section that doesn't fit gets backed in 64 MiB windows when it's first used. we simulated your machine with --section-heap-budget 5 and it got past the first-run screens to the story load

also fixed the CLWB crash, that was a race when bink installs its exception handler at every video

@⁠danik1222 could you give 880e616 a go on the 3060? the useful lines are "GPU memory", "does not fit" and "no heap at". if it still dies at the story load, the RVA would help: we get an AV at 0x540abf5 there on our own machine too, so that one probably isn't you

**@⁠ThatRecompDev** on GitHub · 2026-11-24 22:34 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7146391422) lazy windows are in main now (880e616), which is pretty much what you two worked out here. the loader reads the non-local budget from DXGI and only opens section heaps while they fit, with some headroom left for upload buffers and the command lists. a section that doesn't fit gets backed in 64 MiB windows when it's first used. we simulated your machine with `--section-heap-budget 5` and it got past the first-run screens to the story load also fixed the CLWB crash, that was a race when bink installs its exception handler at every video @⁠danik1222 could you give 880e616 a go on the 3060? the useful lines are "GPU memory", "does not fit" and "no heap at". if it still dies at the story load, the RVA would help: we get an AV at 0x540abf5 there on our own machine too, so that one probably isn't you
Author
Owner

@⁠danik1222 on GitHub · 2026-11-24 22:45 UTC · original

880e616 tested on the 3060 / 15.6 GB machine. Big step: it boots and runs -- 9.000 presents, 0 faults, ~80 ms per frame, no 0xE0434352, no failed heap (the CLWB fix holds too, 5 emulated CLWB, no 0xC000001D).

But the screen is entirely black, and I think the budget lines explain why:

[d3d12_xs] GPU memory: local 0.01 of 11.08 GiB, system 0.01 of 6.68 GiB
WARN  [d3d12_xs] section 0x15bc (6272 MiB) does not fit the 2328 MiB of section-heap room
      (192 MiB open, no cap, GPU local 0.12 of 11.08 GiB, system 2.66 of 6.68 GiB):
      backed in 64 MiB windows as they are used, pages without one read as zeros

So the section is backed lazily as designed, but on this machine it only gets 2328 MiB of room, not the ~5 GiB you simulated with --section-heap-budget 5. system is already at 2.66 of 6.68 GiB when the map starts (textures: Upload 28616, plus the ring and the map's own buffers), which leaves the smaller room.

Evidence that nothing is drawn: every captured frame is 0 of 8,294,400 pixels not black (mean rgb 0,0,0), at present 1200, 2400, 3600 and 4800, while the game keeps presenting and taking Space taps.

No no heap at lines at all, and no not filled from memory either -- the windows that open are fine; it looks like the UI data lives past the 2328 MiB that fit.

Questions:

  1. Is there a way to see how many 64 MiB windows opened and where the room went? (The GPU memory line only prints at startup and when the map starts.)
  2. Would lowering the other system-memory users help here -- e.g. holding fewer texture uploads, or the descriptor window (View 12,148,741 views created this boot looks enormous) -- so the section gets more room?
  3. Is --section-heap-budget usable on a real run to force a bigger room than DXGI reports, or is it only for simulation? If it can only lower it, we are stuck with 2328 MiB on 15.6 GB of RAM.

If it dies at the story load I will send the RVA as you asked; this boot did not fault at all, it just draws nothing.

**@⁠danik1222** on GitHub · 2026-11-24 22:45 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7146612841) **880e616 tested on the 3060 / 15.6 GB machine.** Big step: **it boots and runs -- 9.000 presents, 0 faults, ~80 ms per frame, no `0xE0434352`, no failed heap** (the CLWB fix holds too, 5 emulated CLWB, no `0xC000001D`). But the screen is **entirely black**, and I think the budget lines explain why: ``` [d3d12_xs] GPU memory: local 0.01 of 11.08 GiB, system 0.01 of 6.68 GiB WARN [d3d12_xs] section 0x15bc (6272 MiB) does not fit the 2328 MiB of section-heap room (192 MiB open, no cap, GPU local 0.12 of 11.08 GiB, system 2.66 of 6.68 GiB): backed in 64 MiB windows as they are used, pages without one read as zeros ``` So the section is backed lazily as designed, but on this machine it only gets **2328 MiB of room**, not the ~5 GiB you simulated with `--section-heap-budget 5`. `system` is already at 2.66 of 6.68 GiB when the map starts (textures: `Upload 28616`, plus the ring and the map's own buffers), which leaves the smaller room. Evidence that nothing is drawn: every captured frame is **0 of 8,294,400 pixels not black** (mean rgb 0,0,0), at present 1200, 2400, 3600 and 4800, while the game keeps presenting and taking Space taps. No `no heap at` lines at all, and no `not filled from memory` either -- the windows that open are fine; it looks like the UI data lives past the 2328 MiB that fit. Questions: 1. Is there a way to see how many 64 MiB windows opened and where the room went? (The `GPU memory` line only prints at startup and when the map starts.) 2. Would lowering the other system-memory users help here -- e.g. holding fewer texture uploads, or the descriptor window (`View 12,148,741` views created this boot looks enormous) -- so the section gets more room? 3. Is `--section-heap-budget` usable on a real run to force a bigger room than DXGI reports, or is it only for simulation? If it can only lower it, we are stuck with 2328 MiB on 15.6 GB of RAM. If it dies at the story load I will send the RVA as you asked; this boot did not fault at all, it just draws nothing.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-24 22:48 UTC · original

One more data point from that same 880e616 boot, and it is a good one: the opening cutscene starts here. I stopped the run by hand, but before that:

[file] GetFileAttributesW("G:\movies.rpf")            -> opened, BinkNextFrame active
[file] ...\pack\story000\data\audio\sfx\story000.speech.scripted.vx.rpf
[file] ...\pack\story000\data\audio\sfx\story000.syncscenes.rpf
[file] ...\pack\story000\data\audio\story000.metadata.rpf
[present] 9000 presents, 82.67 ms mean interval over the last 600

So the story load completes on a 15.6 GB machine with lazy windows -- it gets to the cutscene, and the audio of it plays (I could hear it). What is missing is only the picture: black, 0 of 8.294.400 pixels.

The two lines that go with it:

2322: WARN section 0x15bc (6272 MiB) does not fit the 2328 MiB of section-heap room (192 MiB open, no cap, system 2.66 of 6.68 GiB): backed in 64 MiB windows as they are used, pages without one read as zeros
2360: WARN address map: no heap over part of section 0x15bc; its pages read as zeros until one opens

So the remaining gap is the room, not a fault: 2328 MiB of room for a 6272 MiB section, and the parts the cutscene draws from never get a heap. If the room calculation left more of the 6.68 GiB for the section (or the section's windows were allowed past the headroom), this machine would very likely show the cutscene.

For reference, this boot had no faults at all, 0 failed heaps, 0 not filled from memory, and presented ~12 fps the whole time.

**@⁠danik1222** on GitHub · 2026-11-24 22:48 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7146667695) One more data point from that same 880e616 boot, and it is a good one: **the opening cutscene starts here.** I stopped the run by hand, but before that: ``` [file] GetFileAttributesW("G:\movies.rpf") -> opened, BinkNextFrame active [file] ...\pack\story000\data\audio\sfx\story000.speech.scripted.vx.rpf [file] ...\pack\story000\data\audio\sfx\story000.syncscenes.rpf [file] ...\pack\story000\data\audio\story000.metadata.rpf [present] 9000 presents, 82.67 ms mean interval over the last 600 ``` So the story load completes on a 15.6 GB machine with lazy windows -- it gets to the cutscene, and **the audio of it plays** (I could hear it). What is missing is only the picture: black, 0 of 8.294.400 pixels. The two lines that go with it: ``` 2322: WARN section 0x15bc (6272 MiB) does not fit the 2328 MiB of section-heap room (192 MiB open, no cap, system 2.66 of 6.68 GiB): backed in 64 MiB windows as they are used, pages without one read as zeros 2360: WARN address map: no heap over part of section 0x15bc; its pages read as zeros until one opens ``` So the remaining gap is the room, not a fault: 2328 MiB of room for a 6272 MiB section, and the parts the cutscene draws from never get a heap. If the room calculation left more of the 6.68 GiB for the section (or the section's windows were allowed past the headroom), this machine would very likely show the cutscene. For reference, this boot had no faults at all, 0 failed heaps, 0 `not filled from memory`, and presented ~12 fps the whole time.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-24 23:05 UTC · original

Negative result that narrows it down: more room is not enough.

I lowered Headroom (768 -> 256 MiB) and PlacedReserve (1 GiB -> 256 MiB) locally on 880e616 to see whether the picture came back with a bigger window room:

section 0x1564 (6272 MiB) does not fit the 3608 MiB of section-heap room   (was 2328 MiB)
capture present-1800/3000/4200/5400: 0 of 8,294,400 pixels not black, mean rgb (0,0,0)
... 9600 presents, then ERROR FAULT #1: 0x80000003 and ERROR FAULT #2: 0xc0000005, write to 0x0
WARN command list Close failed: 0x8007000e

So +1280 MiB of room changed nothing visually, and taking it from the headroom broke the upload ring (command list Close failed). The cutscene is drawing from parts of the section far past 3.6 GiB, and on this machine the whole 6272 MiB will not fit in a 6.68 GiB budget that already has 2.66 GiB in use.

That leaves two designs that would work on 15.6 GB of RAM, both yours to choose:

  1. Make windows evictable (MakeResident/Evict, or release a window's heap when the GPU is done with it) so the 6272 MiB do not all have to be resident at once. That is the one that fits a 16 GB machine.
  2. Accept that 16 GB machines see the cutscene black for now, and say so in the status (the boot and the audio work; the picture needs ~6.3 GiB of section plus ~2.7 GiB of everything else, i.e. about 9 GiB of the non-local budget = ~18 GB + of RAM).

I reverted my local constants and I am back on 880e616 unmodified, so nothing I report comes from a patched build except the numbers above.

**@⁠danik1222** on GitHub · 2026-11-24 23:05 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7146999056) Negative result that narrows it down: **more room is not enough.** I lowered Headroom (768 -> 256 MiB) and PlacedReserve (1 GiB -> 256 MiB) locally on 880e616 to see whether the picture came back with a bigger window room: ``` section 0x1564 (6272 MiB) does not fit the 3608 MiB of section-heap room (was 2328 MiB) capture present-1800/3000/4200/5400: 0 of 8,294,400 pixels not black, mean rgb (0,0,0) ... 9600 presents, then ERROR FAULT #1: 0x80000003 and ERROR FAULT #2: 0xc0000005, write to 0x0 WARN command list Close failed: 0x8007000e ``` So +1280 MiB of room changed nothing visually, and taking it from the headroom broke the upload ring (command list Close failed). The cutscene is drawing from parts of the section far past 3.6 GiB, and on this machine the whole 6272 MiB will not fit in a 6.68 GiB budget that already has 2.66 GiB in use. That leaves two designs that would work on 15.6 GB of RAM, both yours to choose: 1. **Make windows evictable** (MakeResident/Evict, or release a window's heap when the GPU is done with it) so the 6272 MiB do not all have to be resident at once. That is the one that fits a 16 GB machine. 2. Accept that 16 GB machines see the cutscene black for now, and say so in the status (the boot and the audio work; the picture needs ~6.3 GiB of section plus ~2.7 GiB of everything else, i.e. about 9 GiB of the non-local budget = ~18 GB + of RAM). I reverted my local constants and I am back on 880e616 unmodified, so nothing I report comes from a patched build except the numbers above.
Author
Owner

@⁠marquezinii on GitHub · 2026-11-24 23:19 UTC · original

Some answers from the code on main (323ea30), for the questions that don't need a design decision:

Where the 2.66 GiB of system went before the map started. Most of it is probably the game's own 2.2 GiB heap. XboxGameMemoryBuffers handles the first GPU address that misses the placed buffers by opening the whole VirtualAlloc allocation around it as one heap (OpenExistingHeapFromAddress) and covering it with one buffer. The game's committed heap (2.2 GiB, PAGE_GRAPHICS_READWRITE) is that kind of allocation. It counts against the same non-local budget as the section windows, and it is opened whole, not in windows. The upload ring is 32 MiB, and the texture uploader keeps one staging buffer the size of the largest texture, so neither comes close.

Q2, View 12,148,741. That counter counts slot-70 calls, not live descriptors. The views are written into the game's own descriptor heaps, so the number says nothing about memory. Fewer texture uploads would not help either: each upload reuses the one staging buffer.

Q3, --section-heap-budget. It can only lower the room. SectionHeaps.Room is min(Cap - opened, system budget - use - headroom), so it can simulate a smaller machine but not give yours more.

That adds up with your last result: 6.1 GiB of section plus 2.2 GiB of game heap is already more than the 6.68 GiB budget before anything else, so no choice of headroom shows the cutscene on 15.6 GB. Either windows have to stop being resident all at once (your option 1, which would also apply to the game heap if it were windowed), or 16 GB stays a "boots, plays audio, draws nothing" case for now. That choice is the maintainer's.

**@⁠marquezinii** on GitHub · 2026-11-24 23:19 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7147262175) Some answers from the code on main (`323ea30`), for the questions that don't need a design decision: **Where the 2.66 GiB of `system` went before the map started.** Most of it is probably the game's own 2.2 GiB heap. `XboxGameMemoryBuffers` handles the first GPU address that misses the placed buffers by opening the whole `VirtualAlloc` allocation around it as one heap (`OpenExistingHeapFromAddress`) and covering it with one buffer. The game's committed heap (2.2 GiB, `PAGE_GRAPHICS_READWRITE`) is that kind of allocation. It counts against the same non-local budget as the section windows, and it is opened whole, not in windows. The upload ring is 32 MiB, and the texture uploader keeps one staging buffer the size of the largest texture, so neither comes close. **Q2, `View 12,148,741`.** That counter counts slot-70 calls, not live descriptors. The views are written into the game's own descriptor heaps, so the number says nothing about memory. Fewer texture uploads would not help either: each upload reuses the one staging buffer. **Q3, `--section-heap-budget`.** It can only lower the room. `SectionHeaps.Room` is `min(Cap - opened, system budget - use - headroom)`, so it can simulate a smaller machine but not give yours more. That adds up with your last result: 6.1 GiB of section plus 2.2 GiB of game heap is already more than the 6.68 GiB budget before anything else, so no choice of headroom shows the cutscene on 15.6 GB. Either windows have to stop being resident all at once (your option 1, which would also apply to the game heap if it were windowed), or 16 GB stays a "boots, plays audio, draws nothing" case for now. That choice is the maintainer's.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-24 23:53 UTC · original

One number that updates the premise of #14, from the same i7-4770 / 3060 / 15.6 GB machine, on main 98426b0 (the compile cap and ceiling):

[present] 18600 presents, 39.01 ms mean interval over the last 600
[present] 19200 presents, 37.00 ms mean interval over the last 600
[present] 19800 presents, 35.39 ms mean interval over the last 600     (~28 fps)
19,800 presents, 1 fault (0x80000003 at the end, after ~14 minutes)

Before tonight's compile changes the same machine ran at 73-200 ms per frame, so 35-39 ms is a 4-5x improvement on 4 cores -- #14's "5 to 8 fps on a 4-core i7-4770" is no longer the state of this machine. (The screen is still black: the 2328 MiB of section-heap room for a 6272 MiB section is unchanged, and every captured frame is 0 of 8,294,400 pixels.)

So from this side: performance, stability and the CLWB crash are all fine now; the only open item is the section/game-heap residency, as you explained in #14. I will stay quiet here unless you want another run.

**@⁠danik1222** on GitHub · 2026-11-24 23:53 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7147913174) One number that updates the premise of #14, from the same i7-4770 / 3060 / 15.6 GB machine, on main `98426b0` (the compile cap and ceiling): ``` [present] 18600 presents, 39.01 ms mean interval over the last 600 [present] 19200 presents, 37.00 ms mean interval over the last 600 [present] 19800 presents, 35.39 ms mean interval over the last 600 (~28 fps) 19,800 presents, 1 fault (0x80000003 at the end, after ~14 minutes) ``` Before tonight's compile changes the same machine ran at 73-200 ms per frame, so **35-39 ms is a 4-5x improvement on 4 cores** -- #14's "5 to 8 fps on a 4-core i7-4770" is no longer the state of this machine. (The screen is still black: the `2328 MiB of section-heap room` for a `6272 MiB` section is unchanged, and every captured frame is 0 of 8,294,400 pixels.) So from this side: performance, stability and the CLWB crash are all fine now; the only open item is the section/game-heap residency, as you explained in #14. I will stay quiet here unless you want another run.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 08:10 UTC · original

hey @⁠danik1222, thanks for all the runs last night, the numbers really helped.

there's a new experimental flag on main, --evict-windows. it's off by default, so you have to add it. what it does: the GPU tells the loader which parts of that 6.1 GiB section it actually reads, only those get opened, and the ones nobody has used for a while get released again. it also opens the game's 2.2 GiB heap in 64 MiB pieces instead of all at once, so that heap only takes budget where it's used. idea is the whole thing doesn't have to fit in your 6.68 GiB at the same time.

one heads up: with the flag on, shaders get their own cache, so the first boot recompiles everything and will be slow. a second boot should be back to normal speed.

could you give latest main a go on the 3060 with --evict-windows added to your usual command line? the useful bits from the log:

  • the section windows: N asked for, N opened for them, N released part of the [sample] lines (the last one is enough)
  • the game memory 0x... (0x4000000 bytes of the allocation at ...) lines, or a no ID3D12Device13 warning if your driver doesn't have it
  • any device removed / 0x887a0005, plus the ~30 lines before it
  • and of course whether the cutscene shows up, or if it's still black

one thing we found overnight: when we squeeze the section heaps on our machine to even less room than yours, the cutscene still draws. so the black screen might not be the section heaps at all, and could be the whole system budget being nearly full. if it's still black with the flag, a run of plain main next to it (same command line) would help us tell the two apart.

placed textures are now on by default too, which fixed a set of device losses on our side, so the latest main is worth a try even without the flag

**@⁠ThatRecompDev** on GitHub · 2026-11-25 08:10 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7156705068) hey @⁠danik1222, thanks for all the runs last night, the numbers really helped. there's a new experimental flag on main, `--evict-windows`. it's off by default, so you have to add it. what it does: the GPU tells the loader which parts of that 6.1 GiB section it actually reads, only those get opened, and the ones nobody has used for a while get released again. it also opens the game's 2.2 GiB heap in 64 MiB pieces instead of all at once, so that heap only takes budget where it's used. idea is the whole thing doesn't have to fit in your 6.68 GiB at the same time. one heads up: with the flag on, shaders get their own cache, so the first boot recompiles everything and will be slow. a second boot should be back to normal speed. could you give latest main a go on the 3060 with `--evict-windows` added to your usual command line? the useful bits from the log: - the `section windows: N asked for, N opened for them, N released` part of the `[sample]` lines (the last one is enough) - the `game memory 0x... (0x4000000 bytes of the allocation at ...)` lines, or a `no ID3D12Device13` warning if your driver doesn't have it - any `device removed` / `0x887a0005`, plus the ~30 lines before it - and of course whether the cutscene shows up, or if it's still black one thing we found overnight: when we squeeze the section heaps on our machine to even less room than yours, the cutscene still draws. so the black screen might not be the section heaps at all, and could be the whole system budget being nearly full. if it's still black with the flag, a run of plain main next to it (same command line) would help us tell the two apart. placed textures are now on by default too, which fixed a set of device losses on our side, so the latest main is worth a try even without the flag
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 09:27 UTC · original

19134c8 + --evict-windows on the 3060 / 15.6 GB machine: the cutscene shows. 41,400 presents, ~35-101 ms.

You were right about the flag being a first-boot cost. Two runs, same command line:

First boot (cold cache, as you warned). 19,800 presents, every capture black, section windows: 0 asked for, 0 opened for them, 0 released, 85,122 stand-ins, 2.1 M draws skipped. Nothing to draw with yet, so that run says nothing.

Second boot (warm cache). 41,400 presents, 35.11 ms mean over the last 600, and the frames are real:

[capture] present-1800: 8,294,400 of 8,294,400 pixels not black, mean rgb (132, 100, 108)
[capture] present-3600: 8,293,949 of 8,294,400 pixels not black, mean rgb (147, 114, 133)
[capture] present-5400: 8,294,400 of 8,294,400 pixels not black, mean rgb (36, 35, 47)
[capture] present-7200: 8,294,400 of 8,294,400 pixels not black, mean rgb (32, 32, 44)

1800 is Jason leaning on the car (Leonida tank top), 3600 is Lucia at the storefront with the bag, both letterboxed as your new present scaling intends. I can attach PNGs if you want them.

The numbers you asked for:

  • section windows: 0 asked for, 0 opened for them, 0 released in every [sample] line, also in the boot that shows the picture. So the window feedback never fired here: the picture came from the game heap being opened in 64 MiB pieces, not from a window the GPU asked for. Either the programs reading tagged pages are not the ones with the define, or the read never reaches a marker. Worth a look, because on a section-only budget that path would matter.
  • game memory 0x1c0ed510000 (0x4000000 bytes of the allocation at 0x1c0e9510000) and four more like it -- the 64 MiB windowing of the 2.2 GiB heap is in the log and working. (One ␀x89700000 allocation is still opened whole at 0x2f0000000.)
  • No
    o ID3D12Device13, no device removed, no ␀x887a0005 in either run.
  • Both runs end with ERROR FAULT #1: 0xc0000005 access violation, write to 0x0 (the cold-cache one at ~14 min, the warm one at ~30 min), so that fault is still there after the cutscene.
  • Memory on the warm boot: private 19.6 GB (12.5 GB of it write-combined), physical pages 7.0 GB, commit 34.6 of 46.6 GB, 1.4 GB physical free. 4,119 compiles were still queued and 14.3 M draws skipped, so there is a lot of cache still warming.

Plain main, same command line, no flag: 10,800 presents, every capture black, same ␀xc0000005 write to 0x0 at the end. So on this machine the difference between black and the cutscene is --evict-windows (and the second boot).

Great work -- this is the first time this machine has shown anything but black.

**@⁠danik1222** on GitHub · 2026-11-25 09:27 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7158353689) **19134c8 + --evict-windows on the 3060 / 15.6 GB machine: the cutscene shows. 41,400 presents, ~35-101 ms.** You were right about the flag being a first-boot cost. Two runs, same command line: **First boot (cold cache, as you warned).** 19,800 presents, every capture black, section windows: 0 asked for, 0 opened for them, 0 released, 85,122 stand-ins, 2.1 M draws skipped. Nothing to draw with yet, so that run says nothing. **Second boot (warm cache).** 41,400 presents, 35.11 ms mean over the last 600, and the frames are real: ``` [capture] present-1800: 8,294,400 of 8,294,400 pixels not black, mean rgb (132, 100, 108) [capture] present-3600: 8,293,949 of 8,294,400 pixels not black, mean rgb (147, 114, 133) [capture] present-5400: 8,294,400 of 8,294,400 pixels not black, mean rgb (36, 35, 47) [capture] present-7200: 8,294,400 of 8,294,400 pixels not black, mean rgb (32, 32, 44) ``` 1800 is Jason leaning on the car (Leonida tank top), 3600 is Lucia at the storefront with the bag, both letterboxed as your new present scaling intends. I can attach PNGs if you want them. **The numbers you asked for:** - section windows: 0 asked for, 0 opened for them, 0 released in every [sample] line, **also in the boot that shows the picture**. So the window feedback never fired here: the picture came from the game heap being opened in 64 MiB pieces, not from a window the GPU asked for. Either the programs reading tagged pages are not the ones with the define, or the read never reaches a marker. Worth a look, because on a section-only budget that path would matter. - game memory 0x1c0ed510000 (0x4000000 bytes of the allocation at 0x1c0e9510000) and four more like it -- the 64 MiB windowing of the 2.2 GiB heap is in the log and working. (One ␀x89700000 allocation is still opened whole at 0x2f0000000.) - No o ID3D12Device13, no device removed, no ␀x887a0005 in either run. - Both runs end with ERROR FAULT #1: 0xc0000005 access violation, write to 0x0 (the cold-cache one at ~14 min, the warm one at ~30 min), so that fault is still there after the cutscene. - Memory on the warm boot: private 19.6 GB (12.5 GB of it write-combined), physical pages 7.0 GB, commit 34.6 of 46.6 GB, 1.4 GB physical free. 4,119 compiles were still queued and 14.3 M draws skipped, so there is a lot of cache still warming. **Plain main, same command line, no flag:** 10,800 presents, every capture black, same ␀xc0000005 write to 0x0 at the end. So on this machine the difference between black and the cutscene is --evict-windows (and the second boot). Great work -- this is the first time this machine has shown anything but black.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 09:35 UTC · original

that's great to see, thanks for running both boots and for the careful numbers. first time a 16 GB machine shows the cutscene, nice

the 0 asked for part is interesting. it means the picture came from the game heap being opened in 64 MiB pieces, and the GPU feedback path for the section never triggered. we'll look into why, since on a section-heavy budget that's the part that should matter

for the write to 0x0 at the end: could you send the FAULT block (the RVA and the stack lines under it) plus the ~30 log lines before it? we see a similar late fault on our side and want to know if it's the same one

also worth knowing, main moved a lot since 19134c8: all of the game's shaders translate now (176 deferred-pass ones were failing before), the mesh shaders are a lot cheaper to compile, and compiled shaders are now cached by content, so translator updates don't throw your whole cache away anymore. a run on latest main with --evict-windows would be a good comparison when you have time. and yes, PNGs would be very welcome

**@⁠ThatRecompDev** on GitHub · 2026-11-25 09:35 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7158543788) that's great to see, thanks for running both boots and for the careful numbers. first time a 16 GB machine shows the cutscene, nice the `0 asked for` part is interesting. it means the picture came from the game heap being opened in 64 MiB pieces, and the GPU feedback path for the section never triggered. we'll look into why, since on a section-heavy budget that's the part that should matter for the write to 0x0 at the end: could you send the FAULT block (the RVA and the stack lines under it) plus the ~30 log lines before it? we see a similar late fault on our side and want to know if it's the same one also worth knowing, main moved a lot since 19134c8: all of the game's shaders translate now (176 deferred-pass ones were failing before), the mesh shaders are a lot cheaper to compile, and compiled shaders are now cached by content, so translator updates don't throw your whole cache away anymore. a run on latest main with `--evict-windows` would be a good comparison when you have time. and yes, PNGs would be very welcome
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 09:49 UTC · original

Here is the FAULT block from the warm boot (
un-20261125-094537.log, fault at ~30 min, after the cutscene had been drawing):

ERROR FAULT #1 on thread 15764: 0xc0000005 access violation, write to 0x0
at       0x1423cf683 game_scarlett_master.exe RVA 0x23cf683
function RVA 0x23cf620..0x23cf693 (+0x63, inside the nearest .pdata entry)
code     C704250000000021D48B4D4883C448C3
rax=0x0000000000000000  rcx=0x0000021483eec348  rdx=0x0000000000000001  rbx=0x0000000000000000
rsp=0x000000f8a5e3fde0  rbp=0x0000000000000000  rsi=0x000000f8a5e3fe58  rdi=0x0000007aa5227457
rip=0x00000001423cf683
stack (5 frames):
0x1423cf683 game_scarlett_master.exe RVA 0x23cf683
0x142215c35 game_scarlett_master.exe RVA 0x2215c35
0x142215eca game_scarlett_master.exe RVA 0x2215eca
0x7ffc937bdda7 KERNEL32.DLL+0x2dda7
0x7ffc94ab9c5c ntdll.dll+0xc9c5c

The instruction at RVA 0x23cf683 is C7 04 25 00000000 21D48B -- an absolute store to address 0 (mov dword ptr [0], 0x8bd421), so the game writes to a null pointer it computed, rather than dereferencing one it read.

The lines immediately before it (the [sample] block above is my own --sample-threads 60 thread dump, nothing D3D in it):

[d3d12_xs] texture at 0x2143b4a0000: 1024x1024x1, 9 mips, format 78, layout 6 -> 0x00000000
[d3d12_xs] texture at 0x2143b6a0000: 1024x1024x1, 9 mips, format 98, 0x160000 bytes, filled from memory
... (five more 1024x1024 format 98/99 textures, all "filled from memory")
[d3d12_xs] allocation info: 1 console textures (first 512x512x1, 8 mips, format 99): 0x56000 bytes

So no failed allocation, no device removed and no 0x887a0005 before it -- it is a plain null write after a run of texture uploads.

On the 16 GB / cold vs warm difference: agreed, and my guess is the same as yours -- the game heap opened in 64 MiB pieces is what gave the section enough room to show the picture. The GPU feedback never fired (0 asked for), so that path is untested on this machine.

On the PNGs: they are on this machine and I can send them (Discord is easiest), but I would rather not put game frames in the repository or a fork given the no-game-content rule. Say where you want them and they are yours.

On latest main: building it now and will run it with --evict-windows (two boots again if the cache is cold), then post the same set of numbers for comparison.

**@⁠danik1222** on GitHub · 2026-11-25 09:49 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7158839808) Here is the FAULT block from the warm boot ( un-20261125-094537.log, fault at ~30 min, after the cutscene had been drawing): ``` ERROR FAULT #1 on thread 15764: 0xc0000005 access violation, write to 0x0 at 0x1423cf683 game_scarlett_master.exe RVA 0x23cf683 function RVA 0x23cf620..0x23cf693 (+0x63, inside the nearest .pdata entry) code C704250000000021D48B4D4883C448C3 rax=0x0000000000000000 rcx=0x0000021483eec348 rdx=0x0000000000000001 rbx=0x0000000000000000 rsp=0x000000f8a5e3fde0 rbp=0x0000000000000000 rsi=0x000000f8a5e3fe58 rdi=0x0000007aa5227457 rip=0x00000001423cf683 stack (5 frames): 0x1423cf683 game_scarlett_master.exe RVA 0x23cf683 0x142215c35 game_scarlett_master.exe RVA 0x2215c35 0x142215eca game_scarlett_master.exe RVA 0x2215eca 0x7ffc937bdda7 KERNEL32.DLL+0x2dda7 0x7ffc94ab9c5c ntdll.dll+0xc9c5c ``` The instruction at RVA 0x23cf683 is `C7 04 25 00000000 21D48B` -- an **absolute store to address 0** (`mov dword ptr [0], 0x8bd421`), so the game writes to a null pointer it computed, rather than dereferencing one it read. The lines immediately before it (the `[sample]` block above is my own `--sample-threads 60` thread dump, nothing D3D in it): ``` [d3d12_xs] texture at 0x2143b4a0000: 1024x1024x1, 9 mips, format 78, layout 6 -> 0x00000000 [d3d12_xs] texture at 0x2143b6a0000: 1024x1024x1, 9 mips, format 98, 0x160000 bytes, filled from memory ... (five more 1024x1024 format 98/99 textures, all "filled from memory") [d3d12_xs] allocation info: 1 console textures (first 512x512x1, 8 mips, format 99): 0x56000 bytes ``` So no failed allocation, no device removed and no `0x887a0005` before it -- it is a plain null write after a run of texture uploads. **On the 16 GB / cold vs warm difference:** agreed, and my guess is the same as yours -- the game heap opened in 64 MiB pieces is what gave the section enough room to show the picture. The GPU feedback never fired (`0 asked for`), so that path is untested on this machine. **On the PNGs:** they are on this machine and I can send them (Discord is easiest), but I would rather not put game frames in the repository or a fork given the no-game-content rule. Say where you want them and they are yours. **On latest main:** building it now and will run it with `--evict-windows` (two boots again if the cache is cold), then post the same set of numbers for comparison.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 10:14 UTC · original

Latest main 36385c5 + --evict-windows, same machine, two boots:

First boot (cold): ␀xE0434352 at 3.000 presents, ~2.5 min. No stack in the log. The [sample] line just before it says where the time is going:

84.266 stand-in pipelines (82.401 built on first use, 2 used)
programs on demand: 2.221 asked for, 10 translated and compiled
compile host: 0.0 GB private, 2.231 queued, 0 running, 2 waiting for memory

Second boot (warm): it draws, but the picture is frozen on one shot. 16.800 presents, 43.22 ms mean:

[capture] present-1800: 8.293.958 of 8.294.400 pixels not black, mean rgb (147, 114, 133)
[capture] present-3600: 8.293.954 of 8.294.400 pixels not black, mean rgb (146, 113, 132)
[capture] present-5400: 8.293.952 of 8.294.400 pixels not black, mean rgb (147, 113, 132)
[capture] present-7200: 8.293.974 of 8.294.400 pixels not black, mean rgb (145, 112, 131)

All four are the same Lucia frame (the mean barely moves over 5.400 presents, ~4 min). With 19134c8 the four captures were four different shots (Jason, Lucia, and two dark ones), so the cutscene advanced there and here it does not. My guess: the queue (3.973 queued, 2 waiting for memory, 5.3 M draws skipped, 764 over the first-use budget) keeps the next shot's pipelines as stand-ins, so the presenter keeps the last good frame. But you will know if that is expected.

Other numbers from the warm boot: section windows: 0 asked for, 0 opened for them, 0 released again, game memory ... (0x4000000 bytes ...) lines present, no device removed, and the same late fault as before: ␀xc0000005 access violation, write to 0x0, this time after 762 s.

So on this machine: 19134c8 = cutscene advancing; 36385c5 = black on a cold boot, one frozen shot on a warm boot. If it helps, I can bisect between them (the two are ~40 commits apart) and tell you the first one that keeps the cutscene moving.

**@⁠danik1222** on GitHub · 2026-11-25 10:14 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7159417400) **Latest main 36385c5 + --evict-windows, same machine, two boots:** **First boot (cold): ␀xE0434352 at 3.000 presents, ~2.5 min.** No stack in the log. The `[sample]` line just before it says where the time is going: ``` 84.266 stand-in pipelines (82.401 built on first use, 2 used) programs on demand: 2.221 asked for, 10 translated and compiled compile host: 0.0 GB private, 2.231 queued, 0 running, 2 waiting for memory ``` **Second boot (warm): it draws, but the picture is frozen on one shot.** 16.800 presents, 43.22 ms mean: ``` [capture] present-1800: 8.293.958 of 8.294.400 pixels not black, mean rgb (147, 114, 133) [capture] present-3600: 8.293.954 of 8.294.400 pixels not black, mean rgb (146, 113, 132) [capture] present-5400: 8.293.952 of 8.294.400 pixels not black, mean rgb (147, 113, 132) [capture] present-7200: 8.293.974 of 8.294.400 pixels not black, mean rgb (145, 112, 131) ``` All four are the same Lucia frame (the mean barely moves over 5.400 presents, ~4 min). With 19134c8 the four captures were four different shots (Jason, Lucia, and two dark ones), so the cutscene advanced there and here it does not. My guess: the queue (3.973 queued, 2 waiting for memory, 5.3 M draws skipped, 764 over the first-use budget) keeps the next shot's pipelines as stand-ins, so the presenter keeps the last good frame. But you will know if that is expected. **Other numbers from the warm boot:** `section windows: 0 asked for, 0 opened for them, 0 released` again, game memory ... (0x4000000 bytes ...) lines present, no device removed, and the same late fault as before: ␀xc0000005 access violation, write to 0x0, this time after 762 s. So on this machine: 19134c8 = cutscene advancing; 36385c5 = black on a cold boot, one frozen shot on a warm boot. If it helps, I can bisect between them (the two are ~40 commits apart) and tell you the first one that keeps the cutscene moving.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 10:28 UTC · original

https://discord.gg/FpRTMVa (1hour)

**@⁠ThatRecompDev** on GitHub · 2026-11-25 10:28 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7159752319) https://discord.gg/FpRTMVa (1hour)
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 11:17 UTC · original

Both commits work on the 15.6 GB machine. 2ec2ec3 + --evict-windows:

section windows: 521 asked for, 66 opened for them, 48 released        (was 0/0/0)
programs on demand: 2.251 asked for, 1.145 translated and compiled      (was 10-53)
compile host: 2.679 queued, 2 running, 0 waiting for memory             (was 0 running, 2 waiting)

And the cutscene moves again -- the five captures are different shots:

present-1800: 8.293.949 of 8.294.400 not black, mean rgb (147, 114, 133)   Lucia
present-3600: 8.294.400 of 8.294.400 not black, mean rgb (33, 32, 45)      dark shot
present-5400: 8.293.973 of 8.294.400 not black, mean rgb (147, 114, 133)   Lucia
present-7200: 8.293.967 of 8.294.400 not black, mean rgb (147, 113, 132)   Lucia
present-9000: 16.642 of 8.294.400 not black, box (1605,1923)-(3776,2117), mean rgb (0,0,0)   fade / subtitle

So the frozen frame is gone: the feedback path fires (521 asked), windows open and are released (66 opened, 48 released), and the compile floor at RAM/8 lets programs be made (1.145 instead of 10). 9.001 presents, ~960 s, then the same late fault.

The late fault is unchanged -- and this time Windows showed it as the usual dialog, which confirms the address: "The instruction at 0x00000001423CF683 made a reference to memory at 0x0000000000000000. The memory could not be written." So it is exactly the ␀x23cf683 / mov dword ptr [0], ... block above, every run.

No unhandled-exception stack was needed this time: the cold boot of 2ec2ec3 started fine, so whatever was throwing in 36385c5 is gone (or the new floor avoids it).

From this machine: the low-RAM path is doing what you designed it to do. Only the null write at 0x23cf683 is left.

**@⁠danik1222** on GitHub · 2026-11-25 11:17 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7160844116) **Both commits work on the 15.6 GB machine.** 2ec2ec3 + --evict-windows: ``` section windows: 521 asked for, 66 opened for them, 48 released (was 0/0/0) programs on demand: 2.251 asked for, 1.145 translated and compiled (was 10-53) compile host: 2.679 queued, 2 running, 0 waiting for memory (was 0 running, 2 waiting) ``` And the cutscene **moves** again -- the five captures are different shots: ``` present-1800: 8.293.949 of 8.294.400 not black, mean rgb (147, 114, 133) Lucia present-3600: 8.294.400 of 8.294.400 not black, mean rgb (33, 32, 45) dark shot present-5400: 8.293.973 of 8.294.400 not black, mean rgb (147, 114, 133) Lucia present-7200: 8.293.967 of 8.294.400 not black, mean rgb (147, 113, 132) Lucia present-9000: 16.642 of 8.294.400 not black, box (1605,1923)-(3776,2117), mean rgb (0,0,0) fade / subtitle ``` So the frozen frame is gone: the feedback path fires (521 asked), windows open and are released (66 opened, 48 released), and the compile floor at RAM/8 lets programs be made (1.145 instead of 10). 9.001 presents, ~960 s, then the same late fault. **The late fault is unchanged** -- and this time Windows showed it as the usual dialog, which confirms the address: *"The instruction at 0x00000001423CF683 made a reference to memory at 0x0000000000000000. The memory could not be written."* So it is exactly the ␀x23cf683 / mov dword ptr [0], ... block above, every run. No unhandled-exception stack was needed this time: the cold boot of 2ec2ec3 started fine, so whatever was throwing in 36385c5 is gone (or the new floor avoids it). From this machine: the low-RAM path is doing what you designed it to do. Only the null write at 0x23cf683 is left.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 11:20 UTC · original

Thanks for the Discord invite -- I will pass on it: I do not use Discord, and everything I have is already in this thread, in English, which is fine for me. If there is anything you want from the machine, ask here and it will be in the next comment.

On the PNGs: I can send them if you name a place that is not the repository (they are game frames, so they do not belong there under your no-game-content rule). Otherwise the capture lines above are the whole story: four different shots, and a near-black one at present 9000 that looks like a fade or a subtitle.

**@⁠danik1222** on GitHub · 2026-11-25 11:20 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7160910364) Thanks for the Discord invite -- I will pass on it: I do not use Discord, and everything I have is already in this thread, in English, which is fine for me. If there is anything you want from the machine, ask here and it will be in the next comment. On the PNGs: I can send them if you name a place that is not the repository (they are game frames, so they do not belong there under your no-game-content rule). Otherwise the capture lines above are the whole story: four different shots, and a near-black one at present 9000 that looks like a fade or a subtitle.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 11:29 UTC · original

Two frames from the 19134c8 warm boot, on a temporary host (they expire in 72 h and are not mirrored anywhere, so nothing of the game stays online):

Both are 3840x2160 with the letterbox your new present scaling adds, straight from --capture-presents. The frames from 2ec2ec3 (the moving cutscene) I have not uploaded; say the word and they go to the same temporary host for 72 h.

The null write at ␀x23cf683 is the only thing left from this side. It happens at ~960 s on 2ec2ec3, after the cutscene has been playing, and Windows shows it as "The instruction at 0x00000001423CF683 made a reference to memory at 0x0000000000000000. The memory could not be written."

**@⁠danik1222** on GitHub · 2026-11-25 11:29 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7161126249) Two frames from the 19134c8 warm boot, on a temporary host (they expire in **72 h** and are not mirrored anywhere, so nothing of the game stays online): - Jason, present 1800: https://litter.catbox.moe/zeq1s4.png - Lucia, present 3600: https://litter.catbox.moe/zgm1ew.png Both are 3840x2160 with the letterbox your new present scaling adds, straight from --capture-presents. The frames from 2ec2ec3 (the moving cutscene) I have not uploaded; say the word and they go to the same temporary host for 72 h. The null write at ␀x23cf683 is the only thing left from this side. It happens at ~960 s on 2ec2ec3, after the cutscene has been playing, and Windows shows it as *"The instruction at 0x00000001423CF683 made a reference to memory at 0x0000000000000000. The memory could not be written."*
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 11:42 UTC · original

great to hear the cutscene moves now, thanks for testing all of these!

that write at 0x23cf683 is the game's own hang watchdog: it crashes on purpose when a frame takes over 30 s, which happens when some GPU work runs for a very long time. we've been chasing exactly that today: a few mesh shaders loop on bad counts, and we've capped those loops so a runaway one now costs ~0.1-0.2 s instead of seconds (on main since 33b52d7). if you have time for one more run on current main, --watch-hang --d3d12-breadcrumbs would name the stuck pass in the log

**@⁠ThatRecompDev** on GitHub · 2026-11-25 11:42 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7161402166) great to hear the cutscene moves now, thanks for testing all of these! that write at 0x23cf683 is the game's own hang watchdog: it crashes on purpose when a frame takes over 30 s, which happens when some GPU work runs for a very long time. we've been chasing exactly that today: a few mesh shaders loop on bad counts, and we've capped those loops so a runaway one now costs ~0.1-0.2 s instead of seconds (on main since 33b52d7). if you have time for one more run on current main, `--watch-hang --d3d12-breadcrumbs` would name the stuck pass in the log
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 11:44 UTC · original

one more thing we noticed looking at your runs again: your second (warm) boot starts with the save folder the first boot wrote (%LOCALAPPDATA%\FiveStar\GdkData\<TitleId>), so the game skips the first-run screens and loads its autosaved checkpoint instead of playing the new-game intro. so those moving shots are the save-load path, not the opening intro we test on.

both are useful, but they're different paths, so it'd help to know which one each run takes:

  • intro path (what we test): move or rename that GdkData folder before each boot, so every run starts as a first run (with --input-script docs/first-run.input to get through the screens).
  • save-load path: keep the folder, like your warm boots.

if you can, a pair of warm-cache runs, one of each, would tell us whether the late 0x23cf683 watchdog is specific to loading the save or happens on the intro too

**@⁠ThatRecompDev** on GitHub · 2026-11-25 11:44 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7161430042) one more thing we noticed looking at your runs again: your second (warm) boot starts with the save folder the first boot wrote (`%LOCALAPPDATA%\FiveStar\GdkData\<TitleId>`), so the game skips the first-run screens and loads its autosaved checkpoint instead of playing the new-game intro. so those moving shots are the save-load path, not the opening intro we test on. both are useful, but they're different paths, so it'd help to know which one each run takes: - **intro path (what we test):** move or rename that GdkData folder before each boot, so every run starts as a first run (with `--input-script docs/first-run.input` to get through the screens). - **save-load path:** keep the folder, like your warm boots. if you can, a pair of warm-cache runs, one of each, would tell us whether the late 0x23cf683 watchdog is specific to loading the save or happens on the intro too
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 12:31 UTC · original

The two paths are different, and --watch-hang names what stalls. Current main (376adc4), same command line, --evict-windows --watch-hang --d3d12-breadcrumbs.

A. Save-load path (GdkData present). 43.800 presents at 33.7 ms (30 fps), placed textures: 18.312 live in 24 heaps (6.0 GB used) -- then it stops on the game's own "NO SE HA PODIDO GUARDAR AUTOMÁTICAMENTE" dialog (Retry / Done). A and B taps do not dismiss it; I also reloaded the input script with only B and it stayed. No watchdog fault on this path: it just waits on that dialog.

B. Intro path (GdkData moved aside, first run). 17.400 presents; the four captures are all the same uniform frame, mean rgb (32, 32, 44) -- the story-load screen -- and then the watchdog fires. --watch-hang gives this:

[hang] 520.1 s: main state 3 (next 3), loading screen 0, loading render callback 0, session 0x2a96c49a0a0 ready 0, watchdog paused 0, handler 0x0
[hang] 520.2 s: ... handler 0x1423cf620
[hang] 525.4 s: heartbeat still for 5.1 s; loader waits: small compute pipeline at first use 5.2 s,
       pipeline creation budget 4.7 s, small compute programs made inline 1.2 s, driver compile memory budget 0.0 s; ...
       section windows: 1922 asked for, 94 opened for them, 75 released

Two things from that:

  1. handler 0x1423cf620 -- the watchdog handler the game arms is the function that starts at RVA 0x23cf620, and the crash is at 0x23cf683 inside it. That confirms your reading: the fault is the watchdog, not a memory bug. (Windows shows it as "the instruction at 0x1423CF683 ... memory at 0x0 could not be written".)
  2. The loader's own waits are in the 5.1 s heartbeat stall: small compute pipeline at first use 5.2 s and pipeline creation budget 4.7 s. If those waits stack on a frame that is already slow, the 30 s watchdog is reachable.

And one thread is stuck in a self-recursive chain while it happens:

[hang] 1 x [12100 wait:ExecutionDelay]: game_scarlett_master.exe+0x43c8ec (fn 0x43c040) x5
       <- +0x52710f7 (fn 0x52710c0) <- +0x43ba00 (fn 0x43b7d0) <- +0x25a58d5 (fn 0x25a57b0)
       <- +0x25a5764 (fn 0x25a56f0) <- +0x2215eca <- KERNEL32 <- ntdll

So: on this machine the intro path never gets past the story load (uniform 32,32,44 for 7.200 presents), while the save-load path reaches gameplay at 30 fps and then blocks on a failed autosave. Tell me which of the two you want me to dig into, and I will keep the runs coming.

**@⁠danik1222** on GitHub · 2026-11-25 12:31 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7162481495) **The two paths are different, and --watch-hang names what stalls.** Current main (376adc4), same command line, --evict-windows --watch-hang --d3d12-breadcrumbs. **A. Save-load path (GdkData present).** 43.800 presents at **33.7 ms (30 fps)**, placed textures: 18.312 live in 24 heaps (6.0 GB used) -- then it stops on the game's own **"NO SE HA PODIDO GUARDAR AUTOMÁTICAMENTE"** dialog (Retry / Done). A and B taps do not dismiss it; I also reloaded the input script with only B and it stayed. No watchdog fault on this path: it just waits on that dialog. **B. Intro path (GdkData moved aside, first run).** 17.400 presents; the four captures are all the same uniform frame, mean rgb (32, 32, 44) -- the story-load screen -- and then the watchdog fires. --watch-hang gives this: ``` [hang] 520.1 s: main state 3 (next 3), loading screen 0, loading render callback 0, session 0x2a96c49a0a0 ready 0, watchdog paused 0, handler 0x0 [hang] 520.2 s: ... handler 0x1423cf620 [hang] 525.4 s: heartbeat still for 5.1 s; loader waits: small compute pipeline at first use 5.2 s, pipeline creation budget 4.7 s, small compute programs made inline 1.2 s, driver compile memory budget 0.0 s; ... section windows: 1922 asked for, 94 opened for them, 75 released ``` Two things from that: 1. **handler 0x1423cf620** -- the watchdog handler the game arms is the function that starts at **RVA 0x23cf620**, and the crash is at **0x23cf683** inside it. That confirms your reading: the fault *is* the watchdog, not a memory bug. (Windows shows it as "the instruction at 0x1423CF683 ... memory at 0x0 could not be written".) 2. **The loader's own waits are in the 5.1 s heartbeat stall**: small compute pipeline at first use 5.2 s and pipeline creation budget 4.7 s. If those waits stack on a frame that is already slow, the 30 s watchdog is reachable. And one thread is stuck in a self-recursive chain while it happens: ``` [hang] 1 x [12100 wait:ExecutionDelay]: game_scarlett_master.exe+0x43c8ec (fn 0x43c040) x5 <- +0x52710f7 (fn 0x52710c0) <- +0x43ba00 (fn 0x43b7d0) <- +0x25a58d5 (fn 0x25a57b0) <- +0x25a5764 (fn 0x25a56f0) <- +0x2215eca <- KERNEL32 <- ntdll ``` So: on this machine the intro path never gets past the story load (uniform 32,32,44 for 7.200 presents), while the save-load path reaches gameplay at 30 fps and then blocks on a failed autosave. Tell me which of the two you want me to dig into, and I will keep the runs coming.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 12:45 UTC · original

thanks, both of these were really useful. what we found:

intro path (stuck at the story load). the "loader waits" numbers in that line were totals since boot over all threads, not what blocked this stall, so they made the loader look guilty when it probably isn't. fixed on main (bba95b5): the stall line now first lists only the waits that grew since the heartbeat stopped. the thread in fn 0x43c040 is just the game's audio thread sleeping, so it's a red herring too. with handler 0x1423cf620 armed, the game is waiting for the loading screen's render thread, which in turn waits on the five Subrender:%02u workers, so the stuck one is one of those.

could you rerun the intro path on bba95b5 and paste the whole [hang] block at 15 s and 25 s? the Subrender and loading-render thread lines, any "waiting in ..." tags and the new "since the heartbeat last moved" part are what we need.

save-load path (the autosave dialog). one of our save calls failed. most likely replacing the old save file while something else (Defender, an indexer, or our own read) still had it open. on bba95b5 save updates run one at a time, the replace is retried for a second, and a failure is logged as [gdk] XGameSave update "<name>" failed: .... if the dialog still shows up, grep the log for XGameSave and managed async op around it.

**@⁠ThatRecompDev** on GitHub · 2026-11-25 12:45 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7162815936) thanks, both of these were really useful. what we found: **intro path (stuck at the story load).** the "loader waits" numbers in that line were totals since boot over all threads, not what blocked this stall, so they made the loader look guilty when it probably isn't. fixed on main (bba95b5): the stall line now first lists only the waits that grew since the heartbeat stopped. the thread in fn 0x43c040 is just the game's audio thread sleeping, so it's a red herring too. with handler 0x1423cf620 armed, the game is waiting for the loading screen's render thread, which in turn waits on the five `Subrender:%02u` workers, so the stuck one is one of those. could you rerun the intro path on bba95b5 and paste the whole `[hang]` block at 15 s and 25 s? the Subrender and loading-render thread lines, any "waiting in ..." tags and the new "since the heartbeat last moved" part are what we need. **save-load path (the autosave dialog).** one of our save calls failed. most likely replacing the old save file while something else (Defender, an indexer, or our own read) still had it open. on bba95b5 save updates run one at a time, the replace is retried for a second, and a failure is logged as `[gdk] XGameSave update "<name>" failed: ...`. if the dialog still shows up, grep the log for `XGameSave` and `managed async op` around it.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 12:53 UTC · original

Before the ba95b5 runs: the intro path on 376adc4 ended in another ␀xC000001D, and the shape is the one you fixed for CLWB:

[loader] AddVectoredExceptionHandler(1, bink2scarlett.dll+0x233a0) -> 0x22a45edf3f0
... (last line of the log)
Windows: "unknown software exception (0xC000001D) ... at 0x0000000144E8AAB0"

␀x144E8AAB0 = RVA 0x4e8aab0, one of the CLZERO sites (cpu: emulating CLZERO at game_scarlett_master.exe+0x4e8aab0 appears earlier in the same log). So: Bink registers its handler, and the next AMD-only instruction faults without reaching the emulator -- the same race you fixed for the ␀x4ecc84a CLWB, now at a CLZERO. It happened after 22.800 presents (~18 min), so the handler was working for many faults before.

Also, the memory map at the end of that run looks worth a look on a 15.6 GB machine:

[memory] #0 at 1102.2 s: private 27.93 GB = anonymous 14.13 GB (518) + heap 9.02 GB (601) + XMemVirtualAlloc 4.51 GB (9) + game images 0.17 GB (6) + XMemAlloc 0.09 GB (21)
                           mapped 22.35 GB; committed heap 1.84 GB of the anonymous

9.02 GB in 601 heaps at the end (2 hours in, but it had been running 18 min). If that is not expected, it may be the real cause of the tight system budget on this machine.

And the good news from the same run: your docs/first-run.input plus an F8 watcher goes through the screens here -- it learned subtitles, legal and legal-next ([input] script waits for screen X ... press F8 -> F8 sent) and got to 22.800 presents instead of stopping at legal. So the input side is fine; it is the CLZERO fault that ends it.

Next: ba95b5 intro path with --watch-hang, and I will paste the whole [hang] block at 15 s and 25 s (Subrender and loading-render lines, waiting in ..., and the new "since the heartbeat last moved" part), then the save-load run for the XGameSave update lines.

**@⁠danik1222** on GitHub · 2026-11-25 12:53 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7162989661) Before the ba95b5 runs: the intro path on 376adc4 ended in **another ␀xC000001D, and the shape is the one you fixed for CLWB**: ``` [loader] AddVectoredExceptionHandler(1, bink2scarlett.dll+0x233a0) -> 0x22a45edf3f0 ... (last line of the log) Windows: "unknown software exception (0xC000001D) ... at 0x0000000144E8AAB0" ``` ␀x144E8AAB0 = **RVA 0x4e8aab0**, one of the **CLZERO** sites (cpu: emulating CLZERO at game_scarlett_master.exe+0x4e8aab0 appears earlier in the same log). So: Bink registers its handler, and the next AMD-only instruction faults without reaching the emulator -- the same race you fixed for the ␀x4ecc84a CLWB, now at a CLZERO. It happened after 22.800 presents (~18 min), so the handler was working for many faults before. Also, the memory map at the end of that run looks worth a look on a 15.6 GB machine: ``` [memory] #0 at 1102.2 s: private 27.93 GB = anonymous 14.13 GB (518) + heap 9.02 GB (601) + XMemVirtualAlloc 4.51 GB (9) + game images 0.17 GB (6) + XMemAlloc 0.09 GB (21) mapped 22.35 GB; committed heap 1.84 GB of the anonymous ``` **9.02 GB in 601 heaps** at the end (2 hours in, but it had been running 18 min). If that is not expected, it may be the real cause of the tight system budget on this machine. And the good news from the same run: your docs/first-run.input plus an F8 watcher goes through the screens here -- it learned subtitles, legal and legal-next ([input] script waits for screen X ... press F8 -> F8 sent) and got to 22.800 presents instead of stopping at legal. So the input side is fine; it is the CLZERO fault that ends it. Next: ba95b5 intro path with --watch-hang, and I will paste the whole [hang] block at 15 s and 25 s (Subrender and loading-render lines, waiting in ..., and the new "since the heartbeat last moved" part), then the save-load run for the XGameSave update lines.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 13:21 UTC · original

Intro path on 2735cb0 (with ba95b5): 34.800 presents at 34 ms, and the story load never finishes.

Eight captures, all the same uniform frame -- mean rgb (32, 32, 44), 8,270,851 of 8,294,400 pixels not black -- i.e. the story-load screen, for the whole ~23 minutes. Then the watchdog: ERROR FAULT #1 on thread 8136: 0xc0000005 access violation, write to 0x0.

Your new stall line does what you wanted: it says the loader is innocent now.

[hang] 1074.0 s: heartbeat still for 5.1 s; loader waits since the heartbeat last moved, all threads: none; loader waits since the start, all threads: pipeline creation budget 3.0 s; DirectStorage 17 queues: 66771 entries enqueued, 65752 submitted, 64348 requests run (0 failed), 0xe8519d4a bytes delivered; BCPack pages: 1001 exact, 0 approximate, 0 placeholder, 0 failed; 84269 pipelines requested, 84269 created, 427 MB of DXIL held, 84224 stand-in pipelines (82313 built on first use, 0 of them used, 82877 with programs made on demand, 58 built since, 1852 queued, 3 build threads waiting for memory), 0 draws and dispatches skipped, 0 dispatches and ExecuteIndirects skipped after a skipped one of their list,450547 recorded, 0 lists ran work after a skipped one (), 0 small compute pipelines made at first use (0 with programs made inline or found ready,0 not waited for: programs not made, 0 over the first-use budget), 0 waited for by name (0 past the limit), 459037 table binds mirrored in 339 ms, 0 tables mirrored further at draws for programs' reach, programs on demand: 2328 asked for, 2327 translated and compiled, 0 found compiled, DXIL backend 2772, dxc 9 (0 not lowered, 9 rejected by validation), compile host: 1 started, 0 ended, 0 requests not answered in time, 0.2 GB private, ready after 250.1 s on average and 603 s at most, 0 failed (), 1 queued, 0 running, 1 waiting for memory, 564 pairs needed a linked producer, 290 linked, 9 failed, pipeline cache: 65 loaded, 38 stored, 0 refused, 230 pipelines in C:\Games\VictoryData\fs-new\pipeline-cache; 31115 presents, 0 presents waited for the GPU (0 gave up after 5000 ms); section windows: 234 asked for, 52 opened for them, 30 released; GameInput 90943 reading queries, 2 device-callback registrations; audio: Opus 2 created, 2 destroyed, 3325 packets (0 failed, 3191376 samples), 3329 results taken; XMA 0 enables, 0 disables, 0 takes, 0 blocks written, 0 passes out of input, 0 unmapped; XDsp 0 commands; memory: private 17.5 GB (9.9 GB of it write-combined: the driver's mapping of video memory, not RAM), managed heap 1.2 GB, XMem allocations 0.1 GB, physical pages 7.0 GB; machine: 13.0 GB of 14.6 GB in use, 14.8 GB of it this process (RAM-backed), its pages and helpers (0.2 GB), -1.8 GB everything else, GPU system memory 4.8 GB; GPU memory: local 9.15 of 11.04 GiB budget, 5.67 available for reservation, 0.00 reserved; system 4.82 of 6.68 GiB budget, 3.47 available for reservation, 0.00 reserved; memory: 17.5 GB private, 1.6 GB physical free, commit 33.5 of 46.6 GB; write-combined: 9.9 GB in 261 regions, 61 of 32 MiB; commit by category: private 17.5 GB = video memory mirror 9.9 GB (placed texture heaps 4.8 GB, other 5.1 GB) + managed 1.6 GB + game memory 1.8 GB + driver and native 4.2 GB (compile arenas expected 0.0 GB); outside it XMem pages 7.0 GB (section heaps open over 2.3 GB of them), helper processes 0.2 GB; command objects: 450 allocators (+188 spares, 0 of them released idle), 625 lists (+8 for splits, 31115 splits); kept-index buffer views: 6 made raw, 3 null, 7 read-only slots a write could reach

About the Subrender:%02u and loading-render lines: they are not in this log. Select-String 'Subrender|loading-render|waiting in' returns 0 matches; the game's threads come out unnamed, as addresses and stacks only. So here is the whole [hang] block with the game-stack groups (the full block is 63 lines; these are the 13 with game frames, deduplicated by stack):

[hang] 120 threads, 61 distinct stacks
[hang]   15 x [3280 wait:UserRequest, 2304 wait:UserRequest, 7804 wait:UserRequest, 10776 wait:UserRequest, 6132 wait:UserRequest, 13436 wait:UserRequest, 12812 wait:UserRequest, 15876 wait:UserRequest, 15496 wait:UserRequest, 14760 wait:UserRequest, 11876 wait:UserRequest, 11896 wait:UserRequest, 1356 wait:UserRequest, 4940 wait:UserRequest, 1776 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x221c3c2 (fn 0x221c1f0) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   5 x [7112 wait:UserRequest, 11548 wait:UserRequest, 5316 wait:UserRequest, 15136 wait:UserRequest, 3764 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x43c421e (fn 0x43c4140) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   4 x [9000 wait:UserRequest, 16104 wait:UserRequest, 15288 wait:UserRequest, 13716 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x22511f (fn 0x225110) <- game_scarlett_master.exe+0x22170d3 (fn 0x2217090) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   4 x [2092 wait:UserRequest, 14904 wait:UserRequest, 14812 wait:UserRequest, 7424 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x22511f (fn 0x225110) <- game_scarlett_master.exe+0x25782e2 (fn 0x2578290) <- game_scarlett_master.exe+0x2578607 (fn 0x25785c0) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   2 x [12164 wait:UserRequest, 12256 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x56a0d (fn 0x569f0) <- game_scarlett_master.exe+0x2218c82 (fn 0x2218c60) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [13688 wait:ExecutionDelay]: "mapped main": ntdll.dll+0x166a67 <- ntdll.dll+0xd3194 <- KERNELBASE.dll+0x8cca1 <- game_scarlett_master.exe+0x23cf729 (fn 0x23cf6a0) <- game_scarlett_master.exe+0x8126a7 (fn 0x812620) <- game_scarlett_master.exe+0x53ec040 (fn 0x53ebfe0) <- game_scarlett_master.exe+0x53ebf3a (fn 0x53ebea0) <- game_scarlett_master.exe+0x661f0 (fn 0x661e0) <- game_scarlett_master.exe+0x1d109c9 (fn 0x1d109b0) <- game_scarlett_master.exe+0x5a91c0d (fn 0x5a91bd0) <- game_scarlett_master.exe+0x56a1e5a (fn 0x56a1d54) <- 0x7ffbbf233db0
[hang]   1 x [7932 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x55e8b2a (fn 0x55e8b00) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [8136 wait:ExecutionDelay]: ntdll.dll+0x166a67 <- ntdll.dll+0xd3194 <- KERNELBASE.dll+0x8cca1 <- game_scarlett_master.exe+0x2215b0b (fn 0x2215a60) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [15520 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x56a0d (fn 0x569f0) <- game_scarlett_master.exe+0x4e7f358 (fn 0x4e7f340) <- game_scarlett_master.exe+0x6259 (fn 0x6180) <- game_scarlett_master.exe+0xa7c3f3 (fn 0xa7c340) <- game_scarlett_master.exe+0x4bd6 (fn 0x4b40) <- game_scarlett_master.exe+0x1b2b4f (fn 0x1b2b30) <- game_scarlett_master.exe+0x1b2b1b (fn 0x1b2b00) <- game_scarlett_master.exe+0x2593254 (fn 0x2592c50) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [6496 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x56a0d (fn 0x569f0) <- game_scarlett_master.exe+0x4e7f358 (fn 0x4e7f340) <- game_scarlett_master.exe+0x6259 (fn 0x6180) <- game_scarlett_master.exe+0x2481f73 (fn 0x2481e90) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [10904 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x22511f (fn 0x225110) <- game_scarlett_master.exe+0x2a8bc5c (fn 0x2a8b840) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [9756 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x19b4eaf (fn 0x19b4e50) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [10028 wait:ExecutionDelay]: ntdll.dll+0x166a67 <- ntdll.dll+0xd3194 <- KERNELBASE.dll+0x8cca1 <- game_scarlett_master.exe+0x3a158bf (fn 0x3a15850) <- game_scarlett_master.exe+0x3a15773 (fn 0x3a15680) <- game_scarlett_master.exe+0x1bc2f47 (fn 0x1bc2de0) <- game_scarlett_master.exe+0x58ab92d (fn 0x58ab900) <- game_scarlett_master.exe+0x442fcae (fn 0x442fa80) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [6396 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x3a1a200 (fn 0x3a1a180) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [4284 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x56a0d (fn 0x569f0) <- game_scarlett_master.exe+0x4e7f358 (fn 0x4e7f340) <- game_scarlett_master.exe+0x6259 (fn 0x6180) <- game_scarlett_master.exe+0x3a1a5ab (fn 0x3a1a500) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [10472 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x56a0d (fn 0x569f0) <- game_scarlett_master.exe+0x1da8776 (fn 0x1da8740) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [1652 wait:ExecutionDelay]: ntdll.dll+0x166a67 <- ntdll.dll+0xd3194 <- KERNELBASE.dll+0x8cca1 <- game_scarlett_master.exe+0x43ae2ad (fn 0x43ae230) <- game_scarlett_master.exe+0x1e95177 (fn 0x1e95040) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [2780 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x43adeda (fn 0x43ade50) <- game_scarlett_master.exe+0x43add8d (fn 0x43adc40) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [8252 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x22511f (fn 0x225110) <- game_scarlett_master.exe+0x41f1949 (fn 0x41f18b0) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [10920 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x41ec1a9 (fn 0x41ec190) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [13300 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x41eb52b (fn 0x41eb4f0) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [14292 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x56a0d (fn 0x569f0) <- game_scarlett_master.exe+0x41ea2f4 (fn 0x41ea2b0) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [4004 wait:ExecutionDelay]: ntdll.dll+0x166a67 <- ntdll.dll+0xd3194 <- KERNELBASE.dll+0x8cca1 <- game_scarlett_master.exe+0x3da3da9 (fn 0x3da3d60) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [1876 wait:ExecutionDelay]: ntdll.dll+0x166a67 <- ntdll.dll+0xd3194 <- KERNELBASE.dll+0x8cca1 <- game_scarlett_master.exe+0x25a595c (fn 0x25a57b0) <- game_scarlett_master.exe+0x25a5764 (fn 0x25a56f0) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c
[hang]   1 x [15008 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x22511f (fn 0x225110) <- game_scarlett_master.exe+0x2a1bc0 (fn 0x2a1b90) <- game_scarlett_master.exe+0x5b6bf7e (fn 0x5b6bf30) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c

If you can tell me which RVA is the loading-render thread (or how to make the loader print the game's own thread names), I will run it again and point straight at the five workers. Without the names, this is what the machine can give.

**@⁠danik1222** on GitHub · 2026-11-25 13:21 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7163655919) **Intro path on 2735cb0 (with ba95b5): 34.800 presents at 34 ms, and the story load never finishes.** Eight captures, all the same uniform frame -- mean rgb (32, 32, 44), 8,270,851 of 8,294,400 pixels not black -- i.e. the story-load screen, for the whole ~23 minutes. Then the watchdog: ERROR FAULT #1 on thread 8136: 0xc0000005 access violation, write to 0x0. **Your new stall line does what you wanted**: it says the loader is innocent now. ``` [hang] 1074.0 s: heartbeat still for 5.1 s; loader waits since the heartbeat last moved, all threads: none; loader waits since the start, all threads: pipeline creation budget 3.0 s; DirectStorage 17 queues: 66771 entries enqueued, 65752 submitted, 64348 requests run (0 failed), 0xe8519d4a bytes delivered; BCPack pages: 1001 exact, 0 approximate, 0 placeholder, 0 failed; 84269 pipelines requested, 84269 created, 427 MB of DXIL held, 84224 stand-in pipelines (82313 built on first use, 0 of them used, 82877 with programs made on demand, 58 built since, 1852 queued, 3 build threads waiting for memory), 0 draws and dispatches skipped, 0 dispatches and ExecuteIndirects skipped after a skipped one of their list,450547 recorded, 0 lists ran work after a skipped one (), 0 small compute pipelines made at first use (0 with programs made inline or found ready,0 not waited for: programs not made, 0 over the first-use budget), 0 waited for by name (0 past the limit), 459037 table binds mirrored in 339 ms, 0 tables mirrored further at draws for programs' reach, programs on demand: 2328 asked for, 2327 translated and compiled, 0 found compiled, DXIL backend 2772, dxc 9 (0 not lowered, 9 rejected by validation), compile host: 1 started, 0 ended, 0 requests not answered in time, 0.2 GB private, ready after 250.1 s on average and 603 s at most, 0 failed (), 1 queued, 0 running, 1 waiting for memory, 564 pairs needed a linked producer, 290 linked, 9 failed, pipeline cache: 65 loaded, 38 stored, 0 refused, 230 pipelines in C:\Games\VictoryData\fs-new\pipeline-cache; 31115 presents, 0 presents waited for the GPU (0 gave up after 5000 ms); section windows: 234 asked for, 52 opened for them, 30 released; GameInput 90943 reading queries, 2 device-callback registrations; audio: Opus 2 created, 2 destroyed, 3325 packets (0 failed, 3191376 samples), 3329 results taken; XMA 0 enables, 0 disables, 0 takes, 0 blocks written, 0 passes out of input, 0 unmapped; XDsp 0 commands; memory: private 17.5 GB (9.9 GB of it write-combined: the driver's mapping of video memory, not RAM), managed heap 1.2 GB, XMem allocations 0.1 GB, physical pages 7.0 GB; machine: 13.0 GB of 14.6 GB in use, 14.8 GB of it this process (RAM-backed), its pages and helpers (0.2 GB), -1.8 GB everything else, GPU system memory 4.8 GB; GPU memory: local 9.15 of 11.04 GiB budget, 5.67 available for reservation, 0.00 reserved; system 4.82 of 6.68 GiB budget, 3.47 available for reservation, 0.00 reserved; memory: 17.5 GB private, 1.6 GB physical free, commit 33.5 of 46.6 GB; write-combined: 9.9 GB in 261 regions, 61 of 32 MiB; commit by category: private 17.5 GB = video memory mirror 9.9 GB (placed texture heaps 4.8 GB, other 5.1 GB) + managed 1.6 GB + game memory 1.8 GB + driver and native 4.2 GB (compile arenas expected 0.0 GB); outside it XMem pages 7.0 GB (section heaps open over 2.3 GB of them), helper processes 0.2 GB; command objects: 450 allocators (+188 spares, 0 of them released idle), 625 lists (+8 for splits, 31115 splits); kept-index buffer views: 6 made raw, 3 null, 7 read-only slots a write could reach ``` **About the Subrender:%02u and loading-render lines: they are not in this log.** Select-String 'Subrender|loading-render|waiting in' returns 0 matches; the game's threads come out unnamed, as addresses and stacks only. So here is the whole [hang] block with the game-stack groups (the full block is 63 lines; these are the 13 with game frames, deduplicated by stack): ``` [hang] 120 threads, 61 distinct stacks [hang] 15 x [3280 wait:UserRequest, 2304 wait:UserRequest, 7804 wait:UserRequest, 10776 wait:UserRequest, 6132 wait:UserRequest, 13436 wait:UserRequest, 12812 wait:UserRequest, 15876 wait:UserRequest, 15496 wait:UserRequest, 14760 wait:UserRequest, 11876 wait:UserRequest, 11896 wait:UserRequest, 1356 wait:UserRequest, 4940 wait:UserRequest, 1776 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x221c3c2 (fn 0x221c1f0) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 5 x [7112 wait:UserRequest, 11548 wait:UserRequest, 5316 wait:UserRequest, 15136 wait:UserRequest, 3764 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x43c421e (fn 0x43c4140) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 4 x [9000 wait:UserRequest, 16104 wait:UserRequest, 15288 wait:UserRequest, 13716 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x22511f (fn 0x225110) <- game_scarlett_master.exe+0x22170d3 (fn 0x2217090) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 4 x [2092 wait:UserRequest, 14904 wait:UserRequest, 14812 wait:UserRequest, 7424 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x22511f (fn 0x225110) <- game_scarlett_master.exe+0x25782e2 (fn 0x2578290) <- game_scarlett_master.exe+0x2578607 (fn 0x25785c0) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 2 x [12164 wait:UserRequest, 12256 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x56a0d (fn 0x569f0) <- game_scarlett_master.exe+0x2218c82 (fn 0x2218c60) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [13688 wait:ExecutionDelay]: "mapped main": ntdll.dll+0x166a67 <- ntdll.dll+0xd3194 <- KERNELBASE.dll+0x8cca1 <- game_scarlett_master.exe+0x23cf729 (fn 0x23cf6a0) <- game_scarlett_master.exe+0x8126a7 (fn 0x812620) <- game_scarlett_master.exe+0x53ec040 (fn 0x53ebfe0) <- game_scarlett_master.exe+0x53ebf3a (fn 0x53ebea0) <- game_scarlett_master.exe+0x661f0 (fn 0x661e0) <- game_scarlett_master.exe+0x1d109c9 (fn 0x1d109b0) <- game_scarlett_master.exe+0x5a91c0d (fn 0x5a91bd0) <- game_scarlett_master.exe+0x56a1e5a (fn 0x56a1d54) <- 0x7ffbbf233db0 [hang] 1 x [7932 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x55e8b2a (fn 0x55e8b00) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [8136 wait:ExecutionDelay]: ntdll.dll+0x166a67 <- ntdll.dll+0xd3194 <- KERNELBASE.dll+0x8cca1 <- game_scarlett_master.exe+0x2215b0b (fn 0x2215a60) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [15520 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x56a0d (fn 0x569f0) <- game_scarlett_master.exe+0x4e7f358 (fn 0x4e7f340) <- game_scarlett_master.exe+0x6259 (fn 0x6180) <- game_scarlett_master.exe+0xa7c3f3 (fn 0xa7c340) <- game_scarlett_master.exe+0x4bd6 (fn 0x4b40) <- game_scarlett_master.exe+0x1b2b4f (fn 0x1b2b30) <- game_scarlett_master.exe+0x1b2b1b (fn 0x1b2b00) <- game_scarlett_master.exe+0x2593254 (fn 0x2592c50) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [6496 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x56a0d (fn 0x569f0) <- game_scarlett_master.exe+0x4e7f358 (fn 0x4e7f340) <- game_scarlett_master.exe+0x6259 (fn 0x6180) <- game_scarlett_master.exe+0x2481f73 (fn 0x2481e90) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [10904 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x22511f (fn 0x225110) <- game_scarlett_master.exe+0x2a8bc5c (fn 0x2a8b840) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [9756 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x19b4eaf (fn 0x19b4e50) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [10028 wait:ExecutionDelay]: ntdll.dll+0x166a67 <- ntdll.dll+0xd3194 <- KERNELBASE.dll+0x8cca1 <- game_scarlett_master.exe+0x3a158bf (fn 0x3a15850) <- game_scarlett_master.exe+0x3a15773 (fn 0x3a15680) <- game_scarlett_master.exe+0x1bc2f47 (fn 0x1bc2de0) <- game_scarlett_master.exe+0x58ab92d (fn 0x58ab900) <- game_scarlett_master.exe+0x442fcae (fn 0x442fa80) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [6396 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x3a1a200 (fn 0x3a1a180) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [4284 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x56a0d (fn 0x569f0) <- game_scarlett_master.exe+0x4e7f358 (fn 0x4e7f340) <- game_scarlett_master.exe+0x6259 (fn 0x6180) <- game_scarlett_master.exe+0x3a1a5ab (fn 0x3a1a500) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [10472 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x56a0d (fn 0x569f0) <- game_scarlett_master.exe+0x1da8776 (fn 0x1da8740) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [1652 wait:ExecutionDelay]: ntdll.dll+0x166a67 <- ntdll.dll+0xd3194 <- KERNELBASE.dll+0x8cca1 <- game_scarlett_master.exe+0x43ae2ad (fn 0x43ae230) <- game_scarlett_master.exe+0x1e95177 (fn 0x1e95040) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [2780 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x43adeda (fn 0x43ade50) <- game_scarlett_master.exe+0x43add8d (fn 0x43adc40) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [8252 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x22511f (fn 0x225110) <- game_scarlett_master.exe+0x41f1949 (fn 0x41f18b0) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [10920 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x41ec1a9 (fn 0x41ec190) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [13300 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x41eb52b (fn 0x41eb4f0) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [14292 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x56a0d (fn 0x569f0) <- game_scarlett_master.exe+0x41ea2f4 (fn 0x41ea2b0) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [4004 wait:ExecutionDelay]: ntdll.dll+0x166a67 <- ntdll.dll+0xd3194 <- KERNELBASE.dll+0x8cca1 <- game_scarlett_master.exe+0x3da3da9 (fn 0x3da3d60) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [1876 wait:ExecutionDelay]: ntdll.dll+0x166a67 <- ntdll.dll+0xd3194 <- KERNELBASE.dll+0x8cca1 <- game_scarlett_master.exe+0x25a595c (fn 0x25a57b0) <- game_scarlett_master.exe+0x25a5764 (fn 0x25a56f0) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c [hang] 1 x [15008 wait:UserRequest]: ntdll.dll+0x166467 <- KERNELBASE.dll+0x1427f <- game_scarlett_master.exe+0x22511f (fn 0x225110) <- game_scarlett_master.exe+0x2a1bc0 (fn 0x2a1b90) <- game_scarlett_master.exe+0x5b6bf7e (fn 0x5b6bf30) <- game_scarlett_master.exe+0x2215eca (fn 0x2215ea0) <- KERNEL32.DLL+0x2dda7 <- ntdll.dll+0xc9c5c ``` If you can tell me which RVA is the loading-render thread (or how to make the loader print the game's own thread names), I will run it again and point straight at the five workers. Without the names, this is what the machine can give.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 14:03 UTC · original

thanks, both runs are super useful.

CLZERO at 0x4e8aab0: you're right, that's the same race as the CLWB one: Bink puts its exception handler in front of ours, and the next AMD-only instruction never reaches our emulator. we're fixing it for every emulated instruction this time, not just one site.

9 GB in 601 heaps: not expected, we're looking into which heaps those are and whether they keep growing.

story load that never finishes: the stall line confirms the loader is idle, so the game is waiting on itself. main now has #31 (7d0393d): with --watch-hang the hang block names the exact event or semaphore each blocked thread waits on and whether anything ever signaled it. one more intro-path run on 7d0393d with --watch-hang, pasting the [hang] block at 15 s and 25 s, should tell us what the story load is stuck on.

**@⁠ThatRecompDev** on GitHub · 2026-11-25 14:03 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7164699865) thanks, both runs are super useful. **CLZERO at 0x4e8aab0:** you're right, that's the same race as the CLWB one: Bink puts its exception handler in front of ours, and the next AMD-only instruction never reaches our emulator. we're fixing it for every emulated instruction this time, not just one site. **9 GB in 601 heaps:** not expected, we're looking into which heaps those are and whether they keep growing. **story load that never finishes:** the stall line confirms the loader is idle, so the game is waiting on itself. main now has #31 (7d0393d): with `--watch-hang` the hang block names the exact event or semaphore each blocked thread waits on and whether anything ever signaled it. one more intro-path run on 7d0393d with `--watch-hang`, pasting the `[hang]` block at 15 s and 25 s, should tell us what the story load is stuck on.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 14:11 UTC · original

one more small ask for the 9 GB of heaps: if you still have that log, could you paste the [memory] heaps: line and the "since the last map" lines from two maps a few minutes apart? that tells us whether it keeps growing or levels off. the next build will also name which heap (the game's, ours or a driver's) owns the segments.

and the CLZERO fix is in: our emulator now has a backstop handler at the end of the chain, so an AMD-only instruction reaches it even when Bink's handler goes first. it lands on main shortly.

**@⁠ThatRecompDev** on GitHub · 2026-11-25 14:11 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7164901538) one more small ask for the 9 GB of heaps: if you still have that log, could you paste the `[memory] heaps:` line and the "since the last map" lines from two maps a few minutes apart? that tells us whether it keeps growing or levels off. the next build will also name which heap (the game's, ours or a driver's) owns the segments. and the CLZERO fix is in: our emulator now has a backstop handler at the end of the chain, so an AMD-only instruction reaches it even when Bink's handler goes first. it lands on main shortly.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 14:39 UTC · original

Intro path on 7d0393d with --watch-hang: the hang block names the events. 25.200 presents, then the watchdog (␀xc0000005, thread 8136) at ~1400 s. Captures are the same uniform story-load frame, mean rgb (32, 32, 44).

The stall line (note: this time the loader was in it, for 6.2 s of small compute pipeline):

[hang] 616.2 s: heartbeat still for 5.2 s; loader waits since the heartbeat last moved, all threads: small compute pipeline at first use 6.2 s, small compute programs made inline 5.3 s; loader waits since the start, all threads: small compute pipeline at first use 13.7 s, small compute programs made inline 10.6 s, pipeline creation budget 2.6 s, driver compile memory budget 0.0 s; DirectStorage 17 queues: 80072 entries enqueued, 80072 submitted, 78627 requests run (0 failed), 0x116c7ca35 bytes delivered; BCPack pages: 1752 exact, 0 approximate, 0 placeholder, 0 failed; 85124 pipelines requested, 85124 created, 97 MB of DXIL held, 85109 stand-in pipelines (83133 built on first use, 64 of them used, 84171 with programs made on demand, 33 built since, 1067 queued, 4 build threads waiting for memory), 1553839 draws and dispatches skipped, 0 dispatches and ExecuteIndirects skipped after a skipped one of their list,219032 recorded, 16581 lists ran work after a skipped one (sgd2_1042914b_t32_FText_a4ab6e63_Wrapped + sgd2_102f2093_t32_VText_a4ab6e63_Wrapped x8930, sgd1_0c3d9198_t3c_meshlet_culling~CS_BatchCullPreSkinnedMeshlets_b589f3cd_Wrapped x3292, sgd1_0c3dae74_t3c_meshlet_culling~CS_BatchCullPreSkinnedMeshlets_ParaboloidShadows_b589f3cd_Wrapped x2671, sgd2_103aeb01_t32_FVertexCxformEAlphaGradientMask_21424a89_Wrapped + sgd2_102c7e3e_t32_VBatchVertexCxformEAlphaGradientMask_21424a89_Wrapped x426), 0 small compute pipelines made at first use (4 with programs made inline or found ready,0 not waited for: programs not made, 736 over the first-use budget), 0 waited for by name (0 past the limit), 3591083 table binds mirrored in 1955 ms, 0 tables mirrored further at draws for programs' reach, programs on demand: 2337 asked for, 1000 translated and compiled, 0 found compiled, DXIL backend 1041, dxc 0 (0 not lowered, 0 rejected by validation), compile host: 1 started, 0 ended, 0 requests not answered in time, 0.9 GB private, ready after 217.5 s on average and 611 s at most, 0 failed (), 2530 queued, 1 running, 1 waiting for memory, 207 pairs needed a linked producer, 22 linked, 0 failed, pipeline cache: 0 loaded, 48 stored, 0 refused, 279 pipelines in C:\Games\VictoryData\fs-new\pipeline-cache; 16431 presents, 0 presents waited for the GPU (0 gave up after 5000 ms); section windows: 801 asked for, 94 opened for them, 73 released; GameInput 44723 reading queries, 2 device-callback registrations; audio: Opus 84 created, 84 destroyed, 3938 packets (0 failed, 3754272 samples), 4106 results taken; XMA 44 enables, 44 disables, 80 takes, 2826 blocks written, 3 passes out of input, 0 unmapped; XDsp 0 commands; memory: private 17.9 GB (10.3 GB of it write-combined: the driver's mapping of video memory, not RAM), managed heap 0.7 GB, XMem allocations 0.1 GB, physical pages 7.0 GB; machine: 14.1 GB of 14.6 GB in use, 15.4 GB of it this process (RAM-backed), its pages and helpers (0.9 GB), -1.3 GB everything else, GPU system memory 4.9 GB; GPU memory: local 9.60 of 11.02 GiB budget, 5.67 available for reservation, 0.00 reserved; system 4.89 of 6.68 GiB budget, 3.47 available for reservation, 0.00 reserved; memory: 17.9 GB private, 0.5 GB physical free, commit 33.6 of 46.6 GB; write-combined: 10.3 GB in 263 regions, 62 of 32 MiB; commit by category: private 17.9 GB = video memory mirror 10.3 GB (placed texture heaps 5.2 GB, other 5.1 GB) + managed 1.0 GB + game memory 1.9 GB + driver and native 4.6 GB (compile arenas expected 0.0 GB); outside it XMem pages 7.0 GB (section heaps open over 2.2 GB of them), helper processes 0.9 GB; command objects: 450 allocators (+2030 spares, 0 of them released idle), 625 lists (+141 for splits, 17493 splits); kept-index buffer views: 6 made raw, 3 null (0 read-only and 0 writable off 16 bytes, 0 without an element size, 2 without a buffer, 1 constant-buffer), 7 read-only slots a write could reach

And the new section, whole:

[hang] threads blocked on the game's events and semaphores:
[hang]   thread 16380 waits 615.6 s (no timeout) on handle 0x6bc: not created through the shims
[hang]   thread 2992 waits 604.8 s (no timeout) on handle 0xc88: semaphore (initial 0, maximum 32767) made by thread 15908 at 0.1 s from ; signaled 14241 times, last 604.8 s ago by thread 8360
[hang]   thread 10020 waits 604.0 s (no timeout) on handle 0x2328: auto-reset event made by thread 2704 at 11.7 s from ; never signaled
[hang]   thread 8596 waits 604.0 s (no timeout) on handle 0xa5c: auto-reset event made by thread 15696 at 0.0 s from ; never signaled
[hang]   thread 1776 waits 604.0 s (no timeout) on handle 0x2338: semaphore (initial 0, maximum 32767) made by thread 2704 at 11.7 s from ; signaled 1 times, last 604.0 s ago by thread 2704
[hang]   thread 5224 waits 604.0 s (no timeout) on handle 0x24f0: semaphore (initial 0, maximum 32767) made by thread 6456 at 11.8 s from ; never signaled
[hang]   thread 9024 waits 586.4 s (no timeout) on handle 0xf14: semaphore (initial 0, maximum 32767) made by thread 15696 at 0.2 s from ; signaled 7 times, last 586.4 s ago by thread 15696
[hang]   thread 7468 waits 323.5 s (no timeout) on handle 0x2240: semaphore (initial 0, maximum 32767) made by thread 8360 at 11.1 s from ; signaled 1 times, last 323.6 s ago by thread 1220
[hang]   thread 3764 waits 111.6 s (no timeout) on handle 0x1b6c: auto-reset event made by thread 3828 at 8.5 s from ; signaled 89 times, last 111.6 s ago by thread 9768
[hang]   thread 6036 waits 3.9 s (timeout 60000 ms) on handle 0x2164: semaphore (initial 0, maximum 32767) made by thread 2704 at 11.7 s from ; never signaled

Three things stand out:

  1. ** hread 16380 waits 615.6 s ... on handle 0x6bc: not created through the shims** -- a wait on a handle the loader never saw created. That one cannot be explained by our event bookkeeping.
  2. Four threads wait 604 s on events/semaphores that were never signaled (␀x2328 and ␀xa5c auto-reset events, ␀x24f0 and ␀x2164 semaphores), and two more wait on semaphores last signaled 604 s and 586 s earlier. So the story load is waiting on signals that never come, not on a slow worker.
  3. The one 604 s semaphore that was signaled 14,241 times (␀x6bc... no, ␀xc88, by thread 8360) stopped being signaled at exactly the same moment as the others (604.8 s ago), which looks like one thread stopping and taking the whole chain with it.

If the handle numbers are enough to map them back to the game's own waits, this should say which step of the load stalls. I can also run it again with a longer timeout if you want the block at 15 s and 25 s of a longer stall -- here the report came at a 5.2 s stall and the watchdog ended the run before a 15 s one.

**@⁠danik1222** on GitHub · 2026-11-25 14:39 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7165613947) **Intro path on 7d0393d with --watch-hang: the hang block names the events.** 25.200 presents, then the watchdog (␀xc0000005, thread 8136) at ~1400 s. Captures are the same uniform story-load frame, mean rgb (32, 32, 44). The stall line (note: this time the loader *was* in it, for 6.2 s of small compute pipeline): ``` [hang] 616.2 s: heartbeat still for 5.2 s; loader waits since the heartbeat last moved, all threads: small compute pipeline at first use 6.2 s, small compute programs made inline 5.3 s; loader waits since the start, all threads: small compute pipeline at first use 13.7 s, small compute programs made inline 10.6 s, pipeline creation budget 2.6 s, driver compile memory budget 0.0 s; DirectStorage 17 queues: 80072 entries enqueued, 80072 submitted, 78627 requests run (0 failed), 0x116c7ca35 bytes delivered; BCPack pages: 1752 exact, 0 approximate, 0 placeholder, 0 failed; 85124 pipelines requested, 85124 created, 97 MB of DXIL held, 85109 stand-in pipelines (83133 built on first use, 64 of them used, 84171 with programs made on demand, 33 built since, 1067 queued, 4 build threads waiting for memory), 1553839 draws and dispatches skipped, 0 dispatches and ExecuteIndirects skipped after a skipped one of their list,219032 recorded, 16581 lists ran work after a skipped one (sgd2_1042914b_t32_FText_a4ab6e63_Wrapped + sgd2_102f2093_t32_VText_a4ab6e63_Wrapped x8930, sgd1_0c3d9198_t3c_meshlet_culling~CS_BatchCullPreSkinnedMeshlets_b589f3cd_Wrapped x3292, sgd1_0c3dae74_t3c_meshlet_culling~CS_BatchCullPreSkinnedMeshlets_ParaboloidShadows_b589f3cd_Wrapped x2671, sgd2_103aeb01_t32_FVertexCxformEAlphaGradientMask_21424a89_Wrapped + sgd2_102c7e3e_t32_VBatchVertexCxformEAlphaGradientMask_21424a89_Wrapped x426), 0 small compute pipelines made at first use (4 with programs made inline or found ready,0 not waited for: programs not made, 736 over the first-use budget), 0 waited for by name (0 past the limit), 3591083 table binds mirrored in 1955 ms, 0 tables mirrored further at draws for programs' reach, programs on demand: 2337 asked for, 1000 translated and compiled, 0 found compiled, DXIL backend 1041, dxc 0 (0 not lowered, 0 rejected by validation), compile host: 1 started, 0 ended, 0 requests not answered in time, 0.9 GB private, ready after 217.5 s on average and 611 s at most, 0 failed (), 2530 queued, 1 running, 1 waiting for memory, 207 pairs needed a linked producer, 22 linked, 0 failed, pipeline cache: 0 loaded, 48 stored, 0 refused, 279 pipelines in C:\Games\VictoryData\fs-new\pipeline-cache; 16431 presents, 0 presents waited for the GPU (0 gave up after 5000 ms); section windows: 801 asked for, 94 opened for them, 73 released; GameInput 44723 reading queries, 2 device-callback registrations; audio: Opus 84 created, 84 destroyed, 3938 packets (0 failed, 3754272 samples), 4106 results taken; XMA 44 enables, 44 disables, 80 takes, 2826 blocks written, 3 passes out of input, 0 unmapped; XDsp 0 commands; memory: private 17.9 GB (10.3 GB of it write-combined: the driver's mapping of video memory, not RAM), managed heap 0.7 GB, XMem allocations 0.1 GB, physical pages 7.0 GB; machine: 14.1 GB of 14.6 GB in use, 15.4 GB of it this process (RAM-backed), its pages and helpers (0.9 GB), -1.3 GB everything else, GPU system memory 4.9 GB; GPU memory: local 9.60 of 11.02 GiB budget, 5.67 available for reservation, 0.00 reserved; system 4.89 of 6.68 GiB budget, 3.47 available for reservation, 0.00 reserved; memory: 17.9 GB private, 0.5 GB physical free, commit 33.6 of 46.6 GB; write-combined: 10.3 GB in 263 regions, 62 of 32 MiB; commit by category: private 17.9 GB = video memory mirror 10.3 GB (placed texture heaps 5.2 GB, other 5.1 GB) + managed 1.0 GB + game memory 1.9 GB + driver and native 4.6 GB (compile arenas expected 0.0 GB); outside it XMem pages 7.0 GB (section heaps open over 2.2 GB of them), helper processes 0.9 GB; command objects: 450 allocators (+2030 spares, 0 of them released idle), 625 lists (+141 for splits, 17493 splits); kept-index buffer views: 6 made raw, 3 null (0 read-only and 0 writable off 16 bytes, 0 without an element size, 2 without a buffer, 1 constant-buffer), 7 read-only slots a write could reach ``` And the new section, whole: ``` [hang] threads blocked on the game's events and semaphores: [hang] thread 16380 waits 615.6 s (no timeout) on handle 0x6bc: not created through the shims [hang] thread 2992 waits 604.8 s (no timeout) on handle 0xc88: semaphore (initial 0, maximum 32767) made by thread 15908 at 0.1 s from ; signaled 14241 times, last 604.8 s ago by thread 8360 [hang] thread 10020 waits 604.0 s (no timeout) on handle 0x2328: auto-reset event made by thread 2704 at 11.7 s from ; never signaled [hang] thread 8596 waits 604.0 s (no timeout) on handle 0xa5c: auto-reset event made by thread 15696 at 0.0 s from ; never signaled [hang] thread 1776 waits 604.0 s (no timeout) on handle 0x2338: semaphore (initial 0, maximum 32767) made by thread 2704 at 11.7 s from ; signaled 1 times, last 604.0 s ago by thread 2704 [hang] thread 5224 waits 604.0 s (no timeout) on handle 0x24f0: semaphore (initial 0, maximum 32767) made by thread 6456 at 11.8 s from ; never signaled [hang] thread 9024 waits 586.4 s (no timeout) on handle 0xf14: semaphore (initial 0, maximum 32767) made by thread 15696 at 0.2 s from ; signaled 7 times, last 586.4 s ago by thread 15696 [hang] thread 7468 waits 323.5 s (no timeout) on handle 0x2240: semaphore (initial 0, maximum 32767) made by thread 8360 at 11.1 s from ; signaled 1 times, last 323.6 s ago by thread 1220 [hang] thread 3764 waits 111.6 s (no timeout) on handle 0x1b6c: auto-reset event made by thread 3828 at 8.5 s from ; signaled 89 times, last 111.6 s ago by thread 9768 [hang] thread 6036 waits 3.9 s (timeout 60000 ms) on handle 0x2164: semaphore (initial 0, maximum 32767) made by thread 2704 at 11.7 s from ; never signaled ``` Three things stand out: 1. ** hread 16380 waits 615.6 s ... on handle 0x6bc: not created through the shims** -- a wait on a handle the loader never saw created. That one cannot be explained by our event bookkeeping. 2. **Four threads wait 604 s on events/semaphores that were *never signaled*** (␀x2328 and ␀xa5c auto-reset events, ␀x24f0 and ␀x2164 semaphores), and two more wait on semaphores last signaled 604 s and 586 s earlier. So the story load is waiting on signals that never come, not on a slow worker. 3. The one 604 s semaphore that *was* signaled 14,241 times (␀x6bc... no, ␀xc88, by thread 8360) stopped being signaled at exactly the same moment as the others (604.8 s ago), which looks like one thread stopping and taking the whole chain with it. If the handle numbers are enough to map them back to the game's own waits, this should say which step of the load stalls. I can also run it again with a longer timeout if you want the block at 15 s and 25 s of a *longer* stall -- here the report came at a 5.2 s stall and the watchdog ended the run before a 15 s one.
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 15:40 UTC · original

** 7e682b works: no ␀xC000001D in a 430 s run.** Intro path on d7b8b13, --watch-hang --memory-map 300:

  • 10.200 presents, ~87 ms mean, then the watchdog again (␀xc0000005 at ␀x23cf683, thread 11220) at 430 s.
  • Zero ␀xC000001D in the whole log (the previous run died of one at ␀x4e8aab0 after 18 minutes). So the last-vectored-handler registration does what you wanted.

The heap map (d8e867a) in this run was clean -- no 601 heaps:

[memory] heaps: 10 heaps commit 0.52 GB (0.48 GB allocated)
[memory] heap segments by heap: 0x27e76000000 (the process heap (malloc of every CRT, the loader's native memory)) 0.36 GB in 28,
         0x27e75e00000 (made by a system or driver DLL) 0.00 GB in 2, ... (four more at 0.00 GB)

So the 9.02 GB / 601 heaps from the 18-minute run is not there in this 7-minute one: it either grows with time (the long run reached it) or it came from the run that had the autosave dialog. The per-heap names are exactly what was needed to tell -- I will catch it on the next long run.

GPU memory at that moment (new line, useful on this machine):

[memory] gpu memory: adapter 0: local 8.92 GB of 11.03 GB budget, non-local 4.82 GB of 6.68 GB

8.92 of 11.03 GB local with the world still not drawing -- that is mostly the placed textures and the 4K targets. Worth knowing for the "will it fit" question later.

One small thing on the input side: with docs/first-run.input plus an F8 watcher the run now learns subtitles, legal and legal-next and goes on, so the screens are not the problem here either.

**@⁠danik1222** on GitHub · 2026-11-25 15:40 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7167205480) ** 7e682b works: no ␀xC000001D in a 430 s run.** Intro path on d7b8b13, --watch-hang --memory-map 300: - 10.200 presents, ~87 ms mean, then the watchdog again (␀xc0000005 at ␀x23cf683, thread 11220) at 430 s. - **Zero ␀xC000001D** in the whole log (the previous run died of one at ␀x4e8aab0 after 18 minutes). So the last-vectored-handler registration does what you wanted. **The heap map (d8e867a) in this run was clean -- no 601 heaps:** ``` [memory] heaps: 10 heaps commit 0.52 GB (0.48 GB allocated) [memory] heap segments by heap: 0x27e76000000 (the process heap (malloc of every CRT, the loader's native memory)) 0.36 GB in 28, 0x27e75e00000 (made by a system or driver DLL) 0.00 GB in 2, ... (four more at 0.00 GB) ``` So the 9.02 GB / 601 heaps from the 18-minute run is not there in this 7-minute one: it either grows with time (the long run reached it) or it came from the run that had the autosave dialog. The per-heap names are exactly what was needed to tell -- I will catch it on the next long run. **GPU memory at that moment** (new line, useful on this machine): ``` [memory] gpu memory: adapter 0: local 8.92 GB of 11.03 GB budget, non-local 4.82 GB of 6.68 GB ``` 8.92 of 11.03 GB local with the world still not drawing -- that is mostly the placed textures and the 4K targets. Worth knowing for the "will it fit" question later. One small thing on the input side: with docs/first-run.input plus an F8 watcher the run now learns subtitles, legal and legal-next and goes on, so the screens are not the problem here either.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 15:49 UTC · original

thanks, this is really useful. two things came out of it.

the 6 s the loader was in: that was the first use of small compute pipelines making their shaders right on the game's thread. on a 16 GB box that gets slow. it now does that in the background and the game thread only waits its normal short budget, then moves on.

on the wait list: careful with the numbers, they're "how long ago" from the 616 s report. so "waits 604 s" means those threads went to sleep about 11 s into the run. most of them are just idle worker pools that have been parked since startup, not the story load giving up. the one that actually started during the stall is thread 6036 (0x2164, 60 s timeout), so that's the one to watch.

the bad news is the "from ;" part, it was supposed to show where each one was made, but the stack walk died in our own shim code. fixed now. the next --watch-hang run prints the game address for both the code that made each object and the code that's waiting on it, and 0x6bc gets named if it's a thread handle.

so yes, a longer run on current main (b97be31) would be great, ideally with the full thread stacks from the hang block too (especially 6036 and 16380)

**@⁠ThatRecompDev** on GitHub · 2026-11-25 15:49 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7167341890) thanks, this is really useful. two things came out of it. the 6 s the loader was in: that was the first use of small compute pipelines making their shaders right on the game's thread. on a 16 GB box that gets slow. it now does that in the background and the game thread only waits its normal short budget, then moves on. on the wait list: careful with the numbers, they're "how long ago" from the 616 s report. so "waits 604 s" means those threads went to sleep about 11 s into the run. most of them are just idle worker pools that have been parked since startup, not the story load giving up. the one that actually started during the stall is thread 6036 (0x2164, 60 s timeout), so that's the one to watch. the bad news is the "from ;" part, it was supposed to show where each one was made, but the stack walk died in our own shim code. fixed now. the next --watch-hang run prints the game address for both the code that made each object and the code that's waiting on it, and 0x6bc gets named if it's a thread handle. so yes, a longer run on current main (b97be31) would be great, ideally with the full thread stacks from the hang block too (especially 6036 and 16380)
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 16:21 UTC · original

Save-load path on d7b8b13: the autosave dialog is gone, the story plays, and the game reaches the prologue. Same 15.6 GB machine.

[gdk] XGameSaveSubmitUpdateAsync(block ...) -> 0x00000000
[gdk] XGameSave update "Player": 2 op(s) -> ...\GdkData\7952987A\saves\0009000000000001\...\Player
[gdk] XAsyncComplete(XGameSaveSubmitUpdateAsync) -> 0x00000000, result size 0

No failed line and no "no se ha podido guardar" dialog this time -- your retry-once change did it.

Then: 40.800 presents, 0 faults, no 0xC000001D, and the captures show the cutscene art (mean rgb 138-145, 107-112, 126-131) up to present 7200. After that the prologue loads: the screen shows "PRÓLOGO", the hint "Acércate a una compañera de celda para interactuar con ella" and "DESCARTAR", and an NPC talks with its audio. So the game is in the prologue, standing in the cell, and the 3D image is the only thing missing -- which matches your roadmap line exactly:

WARN work of pipeline sgd1_06d9436f_t32_PS_DeferredPedTexturedNC + sgd1_0184d13e_t41_MS_VS_PedTransformPreSkinD skipped: it is a stand-in until the driver is done
WARN work of pipeline sgd1_05c103da_t32_PS_DeferredPedTexturedNC + sgd1_00dda73b_t41_MS_VS_PedTransformPreSkinD skipped: stand-in

The character pipelines are stand-ins, so the world does not draw; everything else (UI, audio, input, saves, 30 fps cadence) works. Frame times during the load: 118-168 ms.

Two notes:

  • The heap map in this run shows the process heap at 1.48 GB in 100 segments and placed textures at 14.187 live in 17 heaps (4.2 GB) -- still nothing like the 9 GB / 601 heaps of the longer run; I will keep an eye on it as the run goes past the 20-minute mark.
  • The save it wrote went to 7952987A (my copy of the old save is 7952987A.new-run); if the game rewrites it every autosave, that is expected, not a failure.

So from this side: story load, cutscene, save/load and the prologue all work on 16 GB of RAM. What is left for the picture is the character/stand-in side.

**@⁠danik1222** on GitHub · 2026-11-25 16:21 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7167832522) **Save-load path on d7b8b13: the autosave dialog is gone, the story plays, and the game reaches the prologue.** Same 15.6 GB machine. ``` [gdk] XGameSaveSubmitUpdateAsync(block ...) -> 0x00000000 [gdk] XGameSave update "Player": 2 op(s) -> ...\GdkData\7952987A\saves\0009000000000001\...\Player [gdk] XAsyncComplete(XGameSaveSubmitUpdateAsync) -> 0x00000000, result size 0 ``` No `failed` line and no "no se ha podido guardar" dialog this time -- your retry-once change did it. Then: 40.800 presents, **0 faults, no `0xC000001D`**, and the captures show the cutscene art (mean rgb 138-145, 107-112, 126-131) up to present 7200. After that the **prologue loads**: the screen shows "PRÓLOGO", the hint "Acércate a una compañera de celda para interactuar con ella" and "DESCARTAR", and an NPC talks with its audio. So the game is *in* the prologue, standing in the cell, and the 3D image is the only thing missing -- which matches your roadmap line exactly: ``` WARN work of pipeline sgd1_06d9436f_t32_PS_DeferredPedTexturedNC + sgd1_0184d13e_t41_MS_VS_PedTransformPreSkinD skipped: it is a stand-in until the driver is done WARN work of pipeline sgd1_05c103da_t32_PS_DeferredPedTexturedNC + sgd1_00dda73b_t41_MS_VS_PedTransformPreSkinD skipped: stand-in ``` The character pipelines are stand-ins, so the world does not draw; everything else (UI, audio, input, saves, 30 fps cadence) works. Frame times during the load: 118-168 ms. Two notes: - The heap map in this run shows the process heap at **1.48 GB in 100 segments** and placed textures at **14.187 live in 17 heaps (4.2 GB)** -- still nothing like the 9 GB / 601 heaps of the longer run; I will keep an eye on it as the run goes past the 20-minute mark. - The save it wrote went to 7952987A (my copy of the old save is 7952987A.new-run); if the game rewrites it every autosave, that is expected, not a failure. So from this side: story load, cutscene, save/load and the prologue all work on 16 GB of RAM. What is left for the picture is the character/stand-in side.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 16:43 UTC · original

this is great news, thanks! the prologue loading with UI, audio and saves working is a big milestone on a 16 GB box.

the missing 3D is expected right now: those ped pipelines are still being built in the background. on current main (a2ce328), fivestar run --warm once (about an hour on 16 GB, Ctrl+C resumes) builds the pipelines earlier boots used, so the next run should draw a lot more. main also fixes a class of game crashes at world load: the game rebuilds addresses in its big memory reservations as "high dword | offset", so those now start on 4 GB boundaries like on the console.

and yes, please keep an eye on that heap number past 20 min if you can

**@⁠ThatRecompDev** on GitHub · 2026-11-25 16:43 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7168445695) this is great news, thanks! the prologue loading with UI, audio and saves working is a big milestone on a 16 GB box. the missing 3D is expected right now: those ped pipelines are still being built in the background. on current main (a2ce328), `fivestar run --warm` once (about an hour on 16 GB, Ctrl+C resumes) builds the pipelines earlier boots used, so the next run should draw a lot more. main also fixes a class of game crashes at world load: the game rebuilds addresses in its big memory reservations as "high dword | offset", so those now start on 4 GB boundaries like on the console. and yes, please keep an eye on that heap number past 20 min if you can
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 17:14 UTC · original

Answer to the heap question, and this run got further than any before. 1930d7b, intro path, --watch-hang --memory-map 120, 1.616 s (27 min), 36.600 presents, exit 0xc0000005 at RVA 0x23cf683 (your own 30 s watchdog again). Zero 0xC000001D.

1. The heaps: it keeps growing, and it is never 601 heaps

The new map ran every 2 minutes, 13 times. Extracted verbatim:

#1  at  120.0 s  private 11.76 GB   heaps 0.37 GB   process heap 0.25 GB in  22
#2  at  243.0 s  private 12.18 GB   heaps 0.38 GB   process heap 0.25 GB in  22
#3  at  365.7 s  private 12.57 GB   heaps 0.38 GB   process heap 0.25 GB in  22
#4  at  488.4 s  private 12.67 GB   heaps 0.38 GB   process heap 0.25 GB in  22
#5  at  610.7 s  private 12.52 GB   heaps 0.38 GB   process heap 0.25 GB in  22
#6  at  733.3 s  private 12.57 GB   heaps 0.41 GB   process heap 0.29 GB in  23
#7  at  855.9 s  private 14.10 GB   heaps 0.50 GB   process heap 0.35 GB in  27
#8  at  979.1 s  private 15.41 GB   heaps 1.01 GB   process heap 0.86 GB in  60
#9  at 1115.4 s  private 18.13 GB   heaps 1.55 GB   process heap 1.40 GB in  95
#10 at 1241.3 s  private 18.98 GB   heaps 1.76 GB   process heap 1.61 GB in 109
#11 at 1366.5 s  private 19.24 GB   heaps 1.98 GB   process heap 1.83 GB in 123
#12 at 1491.8 s  private 19.76 GB   heaps 2.12 GB   process heap 1.96 GB in 131
#13 at 1616.4 s  private 20.12 GB   heaps 2.12 GB   process heap 1.96 GB in 131

Two things that should settle it:

  • It is always 10 heaps, in all 13 maps. Not 601. The whole growth is the process heap (malloc of every CRT, your native memory), from 0.25 GB in 22 segments to 1.96 GB in 131 segments, and it levels off at ~1.96 GB in the last two maps.
  • The machine total keeps climbing: private 11.76 -> 20.12 GB, anonymous 6.74 -> 13.39 GB (468 -> 502 regions), while XMemVirtualAlloc stays at 4.51 GB (9 regions) and heap at 1.96 GB. So the anonymous side is the one that grows with time. Earlier "9.02 GB in 601 heaps" came from a different build/run and does not reproduce here.

GPU at the last map: local 10.63 GB of 11.08 GB, non-local 4.84 GB of 6.68 GB.

The stack walk fix works. First block of the run:

[hang]   thread 15556 waits 15.5 s (no timeout) on handle 0xb60: semaphore (initial 0, maximum 1)
         made by thread 364 at 0.1 s from game_scarlett_master.exe+0x55e8880 <- game_scarlett_master.exe+0x4fac3d7 <- game_scarlett_master.exe+0x55e867
[hang]   thread 8016 waits 6.4 s (no timeout) on handle 0x1b88: auto-reset event
         made by thread 13544 at 9.2 s from game_scarlett_master.exe+0x4fac3d7 <- game_scarlett_master.exe+0x57d77e1 <- game_scarlett_master.exe+0x2a8b6ca; never signaled
[hang]   thread 8016 ... waiting at game_scarlett_master.exe+0x19b4eaf <- game_scarlett_master.exe+0x2a8b718

Maker address, maker thread, maker time and waiter stack, all game addresses now -- no more "not created through the shims".

2. New: the story load finished and the game reached the prologue credits

After the load, the frames keep coming (36.600 presents, 33-72 ms) and the screen is the opening title card -- "VICE CITY HACE DOS AÑOS" with the cast names -- then the window goes "(No responde)" and your watchdog takes it. So on this machine the intro path is no longer stuck at the blue story load: it gets to the credits and dies there, and there is no [hang] block for that final stall (only the ones in the first 17 s, all idle pools).

The credits text is the broken-glyph problem (letters half-missing), same as the legal screens.

Also, a note on the terms screen from docs/first-run.input: on this build the literal terms sequence did not get past it. It needed the two check boxes marked and then the "Continuar" row; the first Space press had the focus on the copyright item, as your own comment says, and the Down presses moved the panel, not the focus. Hand-driven, it worked. Might be worth a longer look at that block for empty-save runs.

Nothing else new: saves, cutscene and 30 fps cadence all still fine at this build.

**@⁠danik1222** on GitHub · 2026-11-25 17:14 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7169203834) **Answer to the heap question, and this run got further than any before.** `1930d7b`, intro path, `--watch-hang --memory-map 120`, 1.616 s (27 min), 36.600 presents, exit `0xc0000005` at RVA `0x23cf683` (your own 30 s watchdog again). **Zero `0xC000001D`.** ## 1. The heaps: it keeps growing, and it is never 601 heaps The new map ran every 2 minutes, 13 times. Extracted verbatim: ``` #1 at 120.0 s private 11.76 GB heaps 0.37 GB process heap 0.25 GB in 22 #2 at 243.0 s private 12.18 GB heaps 0.38 GB process heap 0.25 GB in 22 #3 at 365.7 s private 12.57 GB heaps 0.38 GB process heap 0.25 GB in 22 #4 at 488.4 s private 12.67 GB heaps 0.38 GB process heap 0.25 GB in 22 #5 at 610.7 s private 12.52 GB heaps 0.38 GB process heap 0.25 GB in 22 #6 at 733.3 s private 12.57 GB heaps 0.41 GB process heap 0.29 GB in 23 #7 at 855.9 s private 14.10 GB heaps 0.50 GB process heap 0.35 GB in 27 #8 at 979.1 s private 15.41 GB heaps 1.01 GB process heap 0.86 GB in 60 #9 at 1115.4 s private 18.13 GB heaps 1.55 GB process heap 1.40 GB in 95 #10 at 1241.3 s private 18.98 GB heaps 1.76 GB process heap 1.61 GB in 109 #11 at 1366.5 s private 19.24 GB heaps 1.98 GB process heap 1.83 GB in 123 #12 at 1491.8 s private 19.76 GB heaps 2.12 GB process heap 1.96 GB in 131 #13 at 1616.4 s private 20.12 GB heaps 2.12 GB process heap 1.96 GB in 131 ``` Two things that should settle it: - **It is always 10 heaps**, in all 13 maps. Not 601. The whole growth is **the process heap** (`malloc` of every CRT, your native memory), from **0.25 GB in 22 segments to 1.96 GB in 131 segments**, and it levels off at ~1.96 GB in the last two maps. - The machine total keeps climbing: **private 11.76 -> 20.12 GB**, anonymous **6.74 -> 13.39 GB (468 -> 502 regions)**, while `XMemVirtualAlloc` stays at 4.51 GB (9 regions) and heap at 1.96 GB. So the anonymous side is the one that grows with time. Earlier "9.02 GB in 601 heaps" came from a different build/run and does not reproduce here. GPU at the last map: **local 10.63 GB of 11.08 GB**, non-local 4.84 GB of 6.68 GB. The stack walk fix works. First block of the run: ``` [hang] thread 15556 waits 15.5 s (no timeout) on handle 0xb60: semaphore (initial 0, maximum 1) made by thread 364 at 0.1 s from game_scarlett_master.exe+0x55e8880 <- game_scarlett_master.exe+0x4fac3d7 <- game_scarlett_master.exe+0x55e867 [hang] thread 8016 waits 6.4 s (no timeout) on handle 0x1b88: auto-reset event made by thread 13544 at 9.2 s from game_scarlett_master.exe+0x4fac3d7 <- game_scarlett_master.exe+0x57d77e1 <- game_scarlett_master.exe+0x2a8b6ca; never signaled [hang] thread 8016 ... waiting at game_scarlett_master.exe+0x19b4eaf <- game_scarlett_master.exe+0x2a8b718 ``` Maker address, maker thread, maker time and waiter stack, all game addresses now -- no more "not created through the shims". ## 2. New: the story load *finished* and the game reached the prologue credits After the load, the frames keep coming (**36.600 presents, 33-72 ms**) and the screen is the opening title card -- "VICE CITY HACE DOS AÑOS" with the cast names -- then the window goes "(No responde)" and your watchdog takes it. So on this machine the intro path is no longer stuck at the blue story load: it gets to the credits and dies there, and there is no `[hang]` block for that final stall (only the ones in the first 17 s, all idle pools). The credits text is the broken-glyph problem (letters half-missing), same as the legal screens. Also, a note on the terms screen from `docs/first-run.input`: on this build the literal `terms` sequence did not get past it. It needed the two check boxes marked and then the "Continuar" row; the first Space press had the focus on the copyright item, as your own comment says, and the Down presses moved the panel, not the focus. Hand-driven, it worked. Might be worth a longer look at that block for empty-save runs. Nothing else new: saves, cutscene and 30 fps cadence all still fine at this build.
Author
Owner

@⁠Solarthis on GitHub · 2026-11-25 20:35 UTC · original

a5e1f25's diagnosis holds on a completely different backend, which is the useful part of this: ours is Vulkan on Metal on Apple Silicon with unified memory, so the budget is not DXGI's non-local segment and there is no VRAM to run short of.

Here the game's 2.2 GiB graphics heap is a hard 2,199 MiB, and at the story load it is full enough that the allocator refuses a 2 MiB buffer inside it. That is past the 46 MiB request a5e1f25 shrinks, so the ceiling is reached rather than approached. Answering XG's size for single-sample render, depth and UAV targets frees 49 MiB of the same heap on this backend too: same mechanism, about 2.5% of the heap, and the difference between reaching the allocator's fatal path and not.

It also backs marquezinii on which segment this comes out of. The heap is opened whole as one allocation and counts in full, so it is the binding constraint long before any section is in play.

The desktop size of a target is a heap-size bug wherever the heap lives, then, not a workaround for one card's compression metadata.

**@⁠Solarthis** on GitHub · 2026-11-25 20:35 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7173886893) a5e1f25's diagnosis holds on a completely different backend, which is the useful part of this: ours is Vulkan on Metal on Apple Silicon with unified memory, so the budget is not DXGI's non-local segment and there is no VRAM to run short of. Here the game's 2.2 GiB graphics heap is a hard 2,199 MiB, and at the story load it is full enough that the allocator refuses a 2 MiB buffer inside it. That is past the 46 MiB request a5e1f25 shrinks, so the ceiling is reached rather than approached. Answering XG's size for single-sample render, depth and UAV targets frees 49 MiB of the same heap on this backend too: same mechanism, about 2.5% of the heap, and the difference between reaching the allocator's fatal path and not. It also backs marquezinii on which segment this comes out of. The heap is opened whole as one allocation and counts in full, so it is the binding constraint long before any section is in play. The desktop size of a target is a heap-size bug wherever the heap lives, then, not a workaround for one card's compression metadata.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 20:40 UTC · original

thanks, that's a really useful cross-check. a completely different backend hitting the same 2,199 MiB ceiling settles it for us: the desktop size of a target eats into the game's own heap no matter where that heap lives, so answering XG's size is the right fix, not a workaround for one card.

good to know the 2 MiB refusal sits past the 46 MiB request too, so we're actually at the ceiling there, not just close to it.

if you see the allocator's fatal path again on the current main, the heap usage line from the sample log right before it would help us see what else is growing in there

**@⁠ThatRecompDev** on GitHub · 2026-11-25 20:40 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7174016792) thanks, that's a really useful cross-check. a completely different backend hitting the same 2,199 MiB ceiling settles it for us: the desktop size of a target eats into the game's own heap no matter where that heap lives, so answering XG's size is the right fix, not a workaround for one card. good to know the 2 MiB refusal sits past the 46 MiB request too, so we're actually at the ceiling there, not just close to it. if you see the allocator's fatal path again on the current main, the heap usage line from the sample log right before it would help us see what else is growing in there
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 22:31 UTC · original

The journal warm-up can stop for good: 0 running, 1 waiting with the CPU idle. Seen twice, on two builds, on a 16 GB / 4-core box:

ec4dac4   warm-up 3784/3785 after 01:59:00   2313 built, 1100 skipped, 371 refused
          driver compiles 0 running (0.0 GB expected), 1 waiting
          one heavy 638, free memory 12941 MB
          -> frozen from 22:05 to 22:30 (25 min), loader at 1 % CPU

7a8f7eb   warm-up 2044/3880 after 00:32:00    729 built, 1306 skipped, 9 refused
          driver compiles 0 running (0.0 GB expected), 1 waiting
          one heavy 604, free memory 3262 MB
          -> frozen from 22:55 (3 min observed), loader at 0-1 % CPU

In both cases the counter stays put to the second, one heavy climbs on every retry, and nothing is compiling. Memory is not the cause: the first case had 12.6 GB free when it froze.

Both were fivestar setup <dump> --work <dir> --only pipeline-warm --jobs 2, and both builds already contained e67c453 and cb20d98.

What I think is happening (CompileBudget.cs)

Enter admits a compile and records it with its Heavy flag:

Compiles.Add(new RunningCompile(estimate, IsHeavy(shaderBytes), Stopwatch.GetTimestamp(), RamBackedBytes()));

Exit removes an entry by estimate only:

long estimate = Estimate(shaderBytes);
_expected -= estimate;
int index = Compiles.FindIndex(compile => compile.Estimate == estimate);
if (index >= 0) Compiles.RemoveAt(index);

Two compiles with the same estimate are common (the estimates are coarse buckets), and the removed entry is not necessarily the one that exited. If the removed entry is a non-heavy one and a heavy entry is left behind, HeavyReserved() keeps counting it:

private static long HeavyReserved() => Reserved(Compiles.Where(compile => compile.Heavy));

and Reservation never reaches zero — it holds at least a quarter of the estimate after SettleSeconds — so HeavyRoom keeps refusing every heavy compile:

if (!heavy || heavyReserved == 0) return true;      // a single leaked heavy entry defeats this shortcut
long pool = ((long)Math.Min(availablePhysical, long.MaxValue) - reserve) / HeavyPoolShare;
return heavyReserved + estimate <= pool;

That matches the signature exactly: driver compiles 0 running, 1 waiting, one heavy growing, no CPU.

Exit also takes shaderBytes from its caller and only touches the record list when shaderBytes >= TinyShaderBytes; if any path calls it with a smaller value than Enter saw, the entry and _runningLarge are left behind the same way.

Suggested fix

Match the exiting entry by more than its estimate — record a token (or the shader bytes and the admission's timestamp) and remove exactly that one, e.g.:

// Enter
var entry = new RunningCompile(estimate, IsHeavy(shaderBytes), Stopwatch.GetTimestamp(), RamBackedBytes());
Compiles.Add(entry);

// Exit(shaderBytes, entry)
Compiles.Remove(entry);   // the record struct is a value type; hold the reference or use an id

or, if the list must stay ordered, remove by Estimate and Heavy and Started.

It is worth doing even if the leak is elsewhere: a reservation that can only decay to a quarter of a multi-GB estimate is enough to refuse every later heavy compile on a 16 GB machine.

I left the setup at 2044/3880 and booted instead (the cache kept 5347 pipelines, so the boot works); if you want the log or a rerun with --jobs 1 to see whether it reproduces on a single thread, say so.

**@⁠danik1222** on GitHub · 2026-11-25 22:31 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7176464680) **The journal warm-up can stop for good: `0 running, 1 waiting` with the CPU idle.** Seen twice, on two builds, on a 16 GB / 4-core box: ``` ec4dac4 warm-up 3784/3785 after 01:59:00 2313 built, 1100 skipped, 371 refused driver compiles 0 running (0.0 GB expected), 1 waiting one heavy 638, free memory 12941 MB -> frozen from 22:05 to 22:30 (25 min), loader at 1 % CPU 7a8f7eb warm-up 2044/3880 after 00:32:00 729 built, 1306 skipped, 9 refused driver compiles 0 running (0.0 GB expected), 1 waiting one heavy 604, free memory 3262 MB -> frozen from 22:55 (3 min observed), loader at 0-1 % CPU ``` In both cases the counter stays put to the second, `one heavy` climbs on every retry, and nothing is compiling. **Memory is not the cause**: the first case had 12.6 GB free when it froze. Both were `fivestar setup <dump> --work <dir> --only pipeline-warm --jobs 2`, and both builds already contained `e67c453` and `cb20d98`. ## What I think is happening (`CompileBudget.cs`) `Enter` admits a compile and records it with its `Heavy` flag: ```csharp Compiles.Add(new RunningCompile(estimate, IsHeavy(shaderBytes), Stopwatch.GetTimestamp(), RamBackedBytes())); ``` `Exit` removes an entry **by estimate only**: ```csharp long estimate = Estimate(shaderBytes); _expected -= estimate; int index = Compiles.FindIndex(compile => compile.Estimate == estimate); if (index >= 0) Compiles.RemoveAt(index); ``` Two compiles with the same estimate are common (the estimates are coarse buckets), and the removed entry is not necessarily the one that exited. If the removed entry is a non-heavy one and a heavy entry is left behind, `HeavyReserved()` keeps counting it: ```csharp private static long HeavyReserved() => Reserved(Compiles.Where(compile => compile.Heavy)); ``` and `Reservation` never reaches zero — it holds at least a quarter of the estimate after `SettleSeconds` — so `HeavyRoom` keeps refusing every heavy compile: ```csharp if (!heavy || heavyReserved == 0) return true; // a single leaked heavy entry defeats this shortcut long pool = ((long)Math.Min(availablePhysical, long.MaxValue) - reserve) / HeavyPoolShare; return heavyReserved + estimate <= pool; ``` That matches the signature exactly: `driver compiles 0 running`, `1 waiting`, `one heavy` growing, no CPU. `Exit` also takes `shaderBytes` from its caller and only touches the record list when `shaderBytes >= TinyShaderBytes`; if any path calls it with a smaller value than `Enter` saw, the entry and `_runningLarge` are left behind the same way. ## Suggested fix Match the exiting entry by more than its estimate — record a token (or the shader bytes and the admission's timestamp) and remove exactly that one, e.g.: ```csharp // Enter var entry = new RunningCompile(estimate, IsHeavy(shaderBytes), Stopwatch.GetTimestamp(), RamBackedBytes()); Compiles.Add(entry); // Exit(shaderBytes, entry) Compiles.Remove(entry); // the record struct is a value type; hold the reference or use an id ``` or, if the list must stay ordered, remove by `Estimate` **and** `Heavy` **and** `Started`. It is worth doing even if the leak is elsewhere: a reservation that can only decay to a quarter of a multi-GB estimate is enough to refuse every later heavy compile on a 16 GB machine. I left the setup at 2044/3880 and booted instead (the cache kept 5347 pipelines, so the boot works); if you want the log or a rerun with `--jobs 1` to see whether it reproduces on a single thread, say so.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 23:23 UTC · original

thanks, that's a real bug and a great write-up. Exit matching only by estimate meant two compiles with the same estimate could remove each other's entry, and the leftover reservation then blocked every heavy compile on a 16 GB box. that explains the stall at 2044/3880.

it's fixed on main now (416fce1 and the merge before it): Enter hands out a ticket, and Exit removes exactly that entry and undoes exactly what its Enter added, the large-compile count and the expected bytes included. whether a compile counts as large is decided once at Enter, so a different byte count at Exit can't leave anything behind.

no need for the --jobs 1 rerun. if you rerun the setup on current main and it still stalls, the budget's refusal counts in the log would tell us which rule is holding it

**@⁠ThatRecompDev** on GitHub · 2026-11-25 23:23 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7177506386) thanks, that's a real bug and a great write-up. Exit matching only by estimate meant two compiles with the same estimate could remove each other's entry, and the leftover reservation then blocked every heavy compile on a 16 GB box. that explains the stall at 2044/3880. it's fixed on main now (416fce1 and the merge before it): Enter hands out a ticket, and Exit removes exactly that entry and undoes exactly what its Enter added, the large-compile count and the expected bytes included. whether a compile counts as large is decided once at Enter, so a different byte count at Exit can't leave anything behind. no need for the --jobs 1 rerun. if you rerun the setup on current main and it still stalls, the budget's refusal counts in the log would tell us which rule is holding it
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 23:28 UTC · original · edited 2026-11-25 23:37 UTC

That matches exactly what we saw: two compiles in the same estimate bucket removing each other's entry, and the leftover reservation refusing every heavy compile afterwards. Enter deciding "large" once and Exit undoing that same ticket is the right shape. Thanks for turning it around in under an hour.

One thing worth knowing from this side, because it shapes how we test: a change in FiveStar.Shaders invalidates the whole translation cache here. TranslationCache.Identity hashes the translator assembly, so c0355a72 and c75f0bc5 (both in main since) mean the 2,885 programs this box is translating right now become unusable the moment we build them. On this 16 GB / 4-core machine shader-translate reports 11 h 30 min on two jobs and about half that on four, so the redo is a few hours of the box's night either way, and a boot that has to translate on demand instead spends it in stand-ins (67k stand-ins, 2.5k programs queued, black screen).

So the plan is: finish the translation on 7a8f7eb, test that boot, then move to current main and pay the translation once more. That also means we cannot test --mesh-launch tonight -- it is not in 7a8f7eb.

If a stall shows up again on current main I will send the budget's refusal counters, as you asked. And if batching translator changes into fewer merges is an option on your side, every 16 GB tester will feel it.

**@⁠danik1222** on GitHub · 2026-11-25 23:28 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7177612952) · edited 2026-11-25 23:37 UTC That matches exactly what we saw: two compiles in the same estimate bucket removing each other's entry, and the leftover reservation refusing every heavy compile afterwards. Enter deciding "large" once and Exit undoing that same ticket is the right shape. Thanks for turning it around in under an hour. One thing worth knowing from this side, because it shapes how we test: **a change in `FiveStar.Shaders` invalidates the whole translation cache here.** `TranslationCache.Identity` hashes the translator assembly, so `c0355a72` and `c75f0bc5` (both in main since) mean the 2,885 programs this box is translating right now become unusable the moment we build them. On this 16 GB / 4-core machine `shader-translate` reports 11 h 30 min on two jobs and about half that on four, so the redo is a few hours of the box's night either way, and a boot that has to translate on demand instead spends it in stand-ins (67k stand-ins, 2.5k programs queued, black screen). So the plan is: finish the translation on `7a8f7eb`, test that boot, then move to current main and pay the translation once more. That also means we cannot test `--mesh-launch` tonight -- it is not in `7a8f7eb`. If a stall shows up again on current main I will send the budget's refusal counters, as you asked. And if batching translator changes into fewer merges is an option on your side, every 16 GB tester will feel it.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 23:36 UTC · original

that's a really useful point, and you're right, we've been merging translator changes several times a night without thinking about what that costs on a 16 GB / 4-core box. 5 hours per change is way too much.

two things on our side:

we'll batch translator changes. they'll land together instead of one by one, and i'll say in the commit when a merge changes translation output, so you can tell which builds are worth moving to.

we're also looking at both halves of the cost. 6 s per program is slow, so we're profiling the translator to find where that time goes. and we're making the translation cache key narrower, so a change that doesn't touch what a program translates to doesn't throw that program away.

finishing on 7a8f7eb first sounds right. --mesh-launch is opt-in and unmeasured anyway, so no rush there

**@⁠ThatRecompDev** on GitHub · 2026-11-25 23:36 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7177801061) that's a really useful point, and you're right, we've been merging translator changes several times a night without thinking about what that costs on a 16 GB / 4-core box. 5 hours per change is way too much. two things on our side: we'll batch translator changes. they'll land together instead of one by one, and i'll say in the commit when a merge changes translation output, so you can tell which builds are worth moving to. we're also looking at both halves of the cost. 6 s per program is slow, so we're profiling the translator to find where that time goes. and we're making the translation cache key narrower, so a change that doesn't touch what a program translates to doesn't throw that program away. finishing on 7a8f7eb first sounds right. --mesh-launch is opt-in and unmeasured anyway, so no rush there
Author
Owner

@⁠danik1222 on GitHub · 2026-11-25 23:38 UTC · original

Batching and labelling the merges that change translation output would help a lot here. Naming the ones worth moving to is the part we cannot infer from the outside.

A number for the profiling, measured on this box (i7-4770, 4 cores, 15.6 GB): with two jobs, 140 programs took 85 minutes of wall clock, so about 36 s per program -- six times your 6 s. The first three were the outliers you already know (2:38, 7:08, 10:44 together), and after them the pace settled. Now running four jobs, which keeps all four cores busy instead of one dxc at a time.

A narrower cache key would be the biggest win of the three: on a machine where a full pass is a night's work, not throwing away a program because an unrelated part of the translator moved is what makes moving between builds practical at all.

**@⁠danik1222** on GitHub · 2026-11-25 23:38 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7177857052) Batching and labelling the merges that change translation output would help a lot here. Naming the ones worth moving to is the part we cannot infer from the outside. A number for the profiling, measured on this box (i7-4770, 4 cores, 15.6 GB): with two jobs, 140 programs took 85 minutes of wall clock, so about 36 s per program -- six times your 6 s. The first three were the outliers you already know (2:38, 7:08, 10:44 together), and after them the pace settled. Now running four jobs, which keeps all four cores busy instead of one dxc at a time. A narrower cache key would be the biggest win of the three: on a machine where a full pass is a night's work, not throwing away a program because an unrelated part of the translator moved is what makes moving between builds practical at all.
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-26 07:30 UTC · original

heads up, three translator batches landed overnight (b4f4527, 436ad7c, c8cfcb7), so your shader cache gets rebuilt in full on the next boot

c8cfcb7 also fixes the compile memory blowup from the middle batch (a few compute shaders needed 12-15 GB each), so build on c8cfcb7 or later rather than 436ad7c

sorry for the churn, the next ones should be further apart

**@⁠ThatRecompDev** on GitHub · 2026-11-26 07:30 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/13#issuecomment-7185526256) heads up, three translator batches landed overnight (b4f4527, 436ad7c, c8cfcb7), so your shader cache gets rebuilt in full on the next boot c8cfcb7 also fixes the compile memory blowup from the middle batch (a few compute shaders needed 12-15 GB each), so build on c8cfcb7 or later rather than 436ad7c sorry for the churn, the next ones should be further apart
This discussion has been locked. Commenting is limited to contributors.
No description provided.