Skip to content

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

Backlog

Description

@danik1222

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.

Activity

  1. danik1222 commented on Nov 24, 2026

    @danik1222
    Author

    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.

  2. danik1222 commented on Nov 24, 2026

    @danik1222
    Author

    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.

  3. danik1222 commented on Nov 24, 2026

    @danik1222
    Author

    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).

  4. marquezinii commented on Nov 24, 2026

    @marquezinii
    Contributor

    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.

  5. danik1222 commented on Nov 24, 2026

    @danik1222
    Author

    #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.

  6. marquezinii commented on Nov 24, 2026

    @marquezinii
    Contributor

    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.

  7. danik1222 commented on Nov 24, 2026

    @danik1222
    Author

    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).

  8. danik1222 commented on Nov 24, 2026

    @danik1222
    Author

    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.

  9. danik1222 commented on Nov 24, 2026

    @danik1222
    Author

    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.

  10. ThatRecompDev commented on Nov 24, 2026

    @ThatRecompDev
    Owner

    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

  11. danik1222 commented on Nov 24, 2026

    @danik1222
    Author

    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.

  12. danik1222 commented on Nov 24, 2026

    @danik1222
    Author

    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.

  13. 16 remaining items

  14. ThatRecompDev commented on Nov 25, 2026

    @ThatRecompDev
    Owner

    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

  15. danik1222 commented on Nov 25, 2026

    @danik1222
    Author

    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.

  16. ThatRecompDev commented on Nov 25, 2026

    @ThatRecompDev
    Owner

    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.

  17. danik1222 commented on Nov 25, 2026

    @danik1222
    Author

    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.

  18. danik1222 commented on Nov 25, 2026

    @danik1222
    Author

    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.

  19. ThatRecompDev commented on Nov 25, 2026

    @ThatRecompDev
    Owner

    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.

  20. ThatRecompDev commented on Nov 25, 2026

    @ThatRecompDev
    Owner

    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.

  21. danik1222 commented on Nov 25, 2026

    @danik1222
    Author

    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.

  22. danik1222 commented on Nov 25, 2026

    @danik1222
    Author

    ** 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.

  23. ThatRecompDev commented on Nov 25, 2026

    @ThatRecompDev
    Owner

    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)

  24. danik1222 commented on Nov 25, 2026

    @danik1222
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions