You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Windows / Vulkan] Reproducible 0xC0000005 at game_scarlett_master.exe+0x23cf683 ~40 s after two E_DSTORAGE_DECOMPRESSION_ERROR reads #2019
gta6rt --first-run-ui loads the title, shows the splash and runs the first-run UI, then the title
writes to 0x0 at game_scarlett_master.exe+0x23cf683 (0xC0000005, access=write). It reproduces on
every run, at 145–204 s, always after exactly two DirectStorage decompression failures with E_DSTORAGE_DECOMPRESSION_ERROR (0x89240030). No world frame is ever presented.
main @ 71a769d7, built with scripts/build_runtime.ps1, -DLEONIDA_SDL3=ON with SDL3 3.4.20
shared (SDL_SHARED ON, SDL3::SDL3), -DLEONIDA_REQUIRE_VULKAN=ON, RelWithDebInfo
Own 1.0.2.1 package, make_game.py --stages check,shaders,runtime → 26,503 shaders translated,
check all files present and hashes match
TdrDelay/TdrDdiDelay raised to 60 s (a 8.9 s pipeline build no longer resets the device; device was lost has not recurred since)
Other runs: failures at t=135.9/136.1, crash at t=203.85; failures at t=113.5/113.6, crash at t=157.85.
The two failing reads are always the same file ranges and the same sizes. unimplemented_call
events: none. int3: none.
What I tried
LEONIDA_DSTORAGE_FITTED=0 LEONIDA_DSTORAGE_FAST_BCPACK=0 → worse: 120 decompression
failures and an earlier, different xmem fault. Reverted.
Default flags → back to exactly 2 failures + the same crash offset.
Guess
The two failed decompressions leave a destination buffer in a state the title does not test; the
title later writes through a pointer derived from it. If those two reads can be made to succeed (or
return a well-formed block), the crash may move on. Happy to run LEONIDA_DSTORAGE_TRACE=1 and send
the request list for those two ranges, or any diagnostic build you want.
Notes
Before this, with an older main (a1ed7bcb, no SDL3) the run died earlier at game_scarlett_master.exe+0x104075 (read 0xffffffffffffffff); the TLS-slot work fixed that.
Splash + first-run UI work: 26 fps, 8.9 GB VRAM, XUser offline Player, no crashes up to the point
above.
data/ttdb/props/octa_imposters.ttpf is 35,286,784 bytes and matches the size and SHA-256 in game/xbox-1.0.2.1.json, so the archive is not the problem. LEONIDA_SKIP_INT3=1 changes nothing
(no int3 is logged); the crash is still game_scarlett_master.exe+0x23cf683 write to 0x0, this
time at t=199.87 s, ~48 s after the two failures.
Also note: with LEONIDA_DSTORAGE_FITTED=0 LEONIDA_DSTORAGE_FAST_BCPACK=0 the same file produces 120 decompression failures instead of 2 and the run dies earlier with an xmem read fault, so the
fitted-predictor path is doing the right thing for the other blocks here.
Two separate things, as far as I can tell. Counts, offsets and addresses only.
The crash at +0x23cf683 is the title's hang watchdog, not the decompression. I have a run with the same stop and no DirectStorage failure at all (RTX 5060 Ti, NVIDIA 621.01, Windows 10): write to 0x0 at t=173.8 s, stack +0x23cf683, +0x2215c35, +0x2215eca. +0x2215c35 is the watchdog's own trap: runtime/src/main.cpp:36-43 describes it (function at RVA 0x2215a60, 30 one-second ticks without a kick from the main loop, then a crash callback and the write to address 0). DadaCap recorded the same stop and the same two callers in the body of #1537. A main loop stalled for 30 s by pipeline builds or by a wait is enough.
To check it: compare the stack of your exception event (seq 205) with those three addresses, and run once with LEONIDA_TITLE_WATCHDOG=0 (runtime/README.md, it only acts when the trap bytes are where this build has them). If the stop disappears or the stack matches, it is the watchdog, and the question is what stalls the main loop for 30 s in your run (your log's last submit phases lines show where the submit thread was). I have not tested whether it keeps your run going.
The two 0x89240030 reads are known:#1715 lists exactly your two BC7 requests of data/ttdb/props/octa_imposters.ttpf, at 455285504 (768 blocks) and 76014336 (1,536 blocks), each with one endpoint entry the reconstructed profile does not know, and decodes both with a lost-block limit of 1/32 (LEONIDA_DSTORAGE_LOST_DIVISOR). Its description says it was checked against the package, not in a boot, so whether it changes your run is open. LEONIDA_DSTORAGE_FITTED=0 making it worse is expected (docs/directstorage.md: it needs confirmed entries).
so we agree it is the title's own hang watchdog, not the decompression.
2. With LEONIDA_TITLE_WATCHDOG=0 the game gets past the old dead point, and then the machine blue-screens.
RTX 5090, 32 GB, Windows 11, TdrDelay=60 for the test (reverted to default afterwards).
t=59 s 25.85 fps, 1735 submissions
t=119 s 23.54 fps, 5229 submissions <- past the 145-200 s window where we used to die
then at ~t=3 min, before any world frame, the box bugchecked:
So disabling the watchdog does not get us into the world — it converts "title kills itself in 30 s" into "the main loop never comes back and takes a critical system process with it". Not asking you to support that config; it just tells us the stall is real and long, and it happens right around the compute pipeline builds:
compute pipeline library/lib_cs_01552 took 5.1 s to build (624776 B SPIR-V)
compute pipeline library/lib_cs_01395 took 2.4 s to build
Question: is the pipeline build on the main thread by design right now (so a slow build is indistinguishable from a hang), and is kicking the watchdog from inside the build loop — or moving these builds off the tick — something you would accept a PR for? If you already have a branch or a preference for how it should look, point me at it and we can try a patch on our side to confirm the diagnosis before anything else.
Second Windows/NVIDIA data point: i7-12700KF (Intel, no SSE4a/CLZERO/MONITORX), RTX 5070, 32 GB, Windows 11 26200, main 73516a2 + #2195 (the TLS atexit fix — without it the title's CRT aborts at startup).
First-run UI reached and driven with the keyboard pad (brightness page, choices saved in the overlay).
Library warm-up: ~1,040 compute pipelines at startup, then ~25 frames/s on the UI; the NVIDIA shader cache and pipeline_cache.session.bin make the next boots much faster.
Then the title ends itself with a write to address 0, during the story load, ~2-4 min in, the same way on three runs. It also happens with LEONIDA_RT_AS=off and every library program of 1 MiB or more in LEONIDA_SKIP_COMPUTE, with no build pending, so it is not only the compile stalls.
The stored value written at address 0 is not 0, so it may not match the trap pattern main.cpp checks for the watchdog KICK. Can someone who measured the KICK values confirm it is the same trap?
Data point, no action request — this fills two of the TBDs in docs/running.md → Windows, NVIDIA.
Setup.ubiquitarianism/leonida main 56bdd7e, scripts/build_runtime.ps1 (SDL3 static, RelWithDebInfo), RTX 5090 32 GB, driver 616.92, Windows 11. TdrDelay/TdrDdiDelay were deleted from the registry after the bugcheck, but the running boot still came up with 60 s (the keys are read when the driver initialises), so the two runs below ran with 60 s; a re-test with the stock 2 s is still pending. shaders+runtime built by make_game.py --stages check,shaders,runtime; package check passes (108 files).
The pipeline stall is gone without the KICK values. With
the title watchdog never fires and compile-gate never reports a wait. Previous runs with the default pipeline settings (and with a warm pipeline_cache.session.bin) stalled 32.1 s on one compute create — compute library/lib_cs_01261, 692564 B SPIR-V — and the watchdog exited the process at t≈48.9 s. So Pipeline pre-compile: can be written as "not needed for the first-run UI: LEONIDA_FAST_PIPELINES=compute keeps the main loop alive".
What is behind the watchdog. Two consecutive runs, identical command line, both died on a title-side AV at different sites — this looks like the next stop, not the watchdog:
Run A (61.8 s): 12–26 frames/s until t≈32 s, then the submission rate fell from ~50/s to ~2.8/s (per-submission shadows 342 ms of 696 ms) and the frame rate settled at 1.2–1.4 frames/s. At t=61.1 s: 0xc0000005write at game_scarlett_master.exe+0x7456da, address in a MEM_COMMIT/PAGE_NOACCESS run with allocation_base=0x0. dstorage_failure count this run: 0.
Run B (29.8 s, same environment): 0xc0000005read at +0x507b2f4 on address 0x8, then +0x18bae6f reading 0xffffffffffffffff. The runtime's own line right before it: xmem: title read fault at t+0x507b2f4 on 0x8 state 0x10000 protect 0x1 type 0x0 allocation 0x0, outside stream CPU window, unmaps 90531, no recent ma….
Both are reads/writes into pages the title believes it owns (manually mapped, allocation_base=0x0), so I read them as title-memory-map state rather than as a new class. I searched issues and PRs for 0x7456da, 0x507b2f4 and "title read fault": no report names these offsets. The neighbouring work I found is #2163 (slot-133 shadow keeps the GPU's writes), #1897 (a page kept read-only by another tracker is copied once) and the closed #2240 / #1972 — so I am not filing a separate issue and will re-test once #2163 and #1897 land. If those two sites survive that re-test I will open a report with the traces.
No payload, shader, texture or name list is included here; only RVAs, counters and frame rates.
Follow-up from the Windows 10 / RX 6750 GRE (RDNA2) machine: the hang watchdog's two RVAs, measured here, and one Windows-AMD number that matters for it.
The crash site is the watchdog's callback, not its own trap. The dialog Windows shows is 0x00000001423CF683 ... written, i.e. game+0x23cf683. Disassembling game_scarlett_master.exe at that RVA:
A write to address 0 with a non-zero immediate. The watchdog thread itself (RVA 0x2215a60, the function Snooozs named) has its own fallback write at RVA 0x2215c35:
That one matches the runtime's kWatchdogTrap byte pattern; 0x23cf683 does not. Before those lines the thread reads its "main loop alive" flags at 0x471b6340 (bit 0), 0x471b6331, 0x471b6330, and the last-kick timestamp at 0x471b6338; a counter of 0x1e (30) one-second ticks runs down, then it calls the callback pointer at 0x471b6348 (the write above) and then does its own movl $0,0x0.
What I tried. With LEONIDA_TITLE_WATCHDOG=0 LEONIDA_TITLE_WATCHDOG_KICK=2215c35,471b6331 on commit d442851, the loader printed no "keeping the title's hang watchdog kicked" line and the run still ended at +0x23cf683. I did not try 0x471b6330 as the kick byte. Questions for whoever measured these: is the kick byte 0x471b6331, 0x471b6330, or something else this disassembly does not show; and should the trap check also accept the callback site (0x23cf683, pattern with the 0x4d8bd421 immediate) so a run whose only write-to-0 site reached is the callback can still be defused?
Why it matters here: the 30 s is shorter than this driver's pipeline creates. On this machine the main thread stalls in compute creates:
[rt] d3d12: compute pipeline library/lib_cs_01047 took 56.8 s to build (421844 B SPIR-V)
[rt] d3d12: compute pipeline library/lib_cs_01056 took 72.2 s to build (1651484 B SPIR-V)
so the watchdog fires on any run that meets one of them. On RADV the same programs are seconds (docs/linux_proton.md, step 2), which is why the world frame was reached there and not here.
One more Windows data point: the runtime built from 6dfca64 (SDL3, scripts/build_runtime.ps1) crashes at startup on this machine before the title's first draw — 0xc0000005 read 0x0 at host:gta6rt.exe+0xbb13a, right after the title's TLS callbacks. The d442851 binary starts and reaches the first-run pages. The assets here were built from the d442851-era make_game.py; I have not re-run the assets stage (2.5 h) to test whether that is the cause.
Logs and traces stay on this machine; no game files attached.
Activity
azmuricy466-pixel commentedon Nov 25, 2026
Update with
LEONIDA_DSTORAGE_TRACE=1(same build, same command, plusLEONIDA_SKIP_INT3=1):Both failing reads are in the same file, both BC7 page destinations:
data/ttdb/props/octa_imposters.ttpfis 35,286,784 bytes and matches the size and SHA-256 ingame/xbox-1.0.2.1.json, so the archive is not the problem.LEONIDA_SKIP_INT3=1changes nothing(no
int3is logged); the crash is stillgame_scarlett_master.exe+0x23cf683write to0x0, thistime at t=199.87 s, ~48 s after the two failures.
Also note: with
LEONIDA_DSTORAGE_FITTED=0 LEONIDA_DSTORAGE_FAST_BCPACK=0the same file produces120 decompression failures instead of 2 and the run dies earlier with an xmem read fault, so the
fitted-predictor path is doing the right thing for the other blocks here.
Snooozs commentedon Nov 25, 2026
Two separate things, as far as I can tell. Counts, offsets and addresses only.
The crash at
+0x23cf683is the title's hang watchdog, not the decompression. I have a run with the same stop and no DirectStorage failure at all (RTX 5060 Ti, NVIDIA 621.01, Windows 10): write to 0x0 at t=173.8 s, stack+0x23cf683,+0x2215c35,+0x2215eca.+0x2215c35is the watchdog's own trap:runtime/src/main.cpp:36-43describes it (function at RVA 0x2215a60, 30 one-second ticks without a kick from the main loop, then a crash callback and the write to address 0). DadaCap recorded the same stop and the same two callers in the body of #1537. A main loop stalled for 30 s by pipeline builds or by a wait is enough.To check it: compare the
stackof yourexceptionevent (seq 205) with those three addresses, and run once withLEONIDA_TITLE_WATCHDOG=0(runtime/README.md, it only acts when the trap bytes are where this build has them). If the stop disappears or the stack matches, it is the watchdog, and the question is what stalls the main loop for 30 s in your run (your log's lastsubmit phaseslines show where the submit thread was). I have not tested whether it keeps your run going.The two
0x89240030reads are known: #1715 lists exactly your two BC7 requests ofdata/ttdb/props/octa_imposters.ttpf, at 455285504 (768 blocks) and 76014336 (1,536 blocks), each with one endpoint entry the reconstructed profile does not know, and decodes both with a lost-block limit of 1/32 (LEONIDA_DSTORAGE_LOST_DIVISOR). Its description says it was checked against the package, not in a boot, so whether it changes your run is open.LEONIDA_DSTORAGE_FITTED=0making it worse is expected (docs/directstorage.md: it needs confirmed entries).AI-assisted (Claude Code, Claude Opus 5.5).
azmuricy466-pixel commentedon Nov 26, 2026
Thanks — that reframed it completely. Two data points now.
0xC0000005, write to 0x0, t=199.87 s) hasso we agree it is the title's own hang watchdog, not the decompression.
2. With
LEONIDA_TITLE_WATCHDOG=0the game gets past the old dead point, and then the machine blue-screens.RTX 5090, 32 GB, Windows 11,
TdrDelay=60for the test (reverted to default afterwards).then at ~t=3 min, before any world frame, the box bugchecked:
So disabling the watchdog does not get us into the world — it converts "title kills itself in 30 s" into "the main loop never comes back and takes a critical system process with it". Not asking you to support that config; it just tells us the stall is real and long, and it happens right around the compute pipeline builds:
Question: is the pipeline build on the main thread by design right now (so a slow build is indistinguishable from a hang), and is kicking the watchdog from inside the build loop — or moving these builds off the tick — something you would accept a PR for? If you already have a branch or a preference for how it should look, point me at it and we can try a patch on our side to confirm the diagnosis before anything else.
nicoco23 commentedon Nov 26, 2026
Second Windows/NVIDIA data point: i7-12700KF (Intel, no SSE4a/CLZERO/MONITORX), RTX 5070, 32 GB, Windows 11 26200, main 73516a2 + #2195 (the TLS atexit fix — without it the title's CRT aborts at startup).
azmuricy466-pixel commentedon Nov 26, 2026
Data point, no action request — this fills two of the TBDs in
docs/running.md→ Windows, NVIDIA.Setup.
ubiquitarianism/leonidamain56bdd7e,scripts/build_runtime.ps1(SDL3 static, RelWithDebInfo), RTX 5090 32 GB, driver 616.92, Windows 11.TdrDelay/TdrDdiDelaywere deleted from the registry after the bugcheck, but the running boot still came up with 60 s (the keys are read when the driver initialises), so the two runs below ran with 60 s; a re-test with the stock 2 s is still pending. shaders+runtime built bymake_game.py --stages check,shaders,runtime; package check passes (108 files).The pipeline stall is gone without the KICK values. With
the title watchdog never fires and
compile-gatenever reports a wait. Previous runs with the default pipeline settings (and with a warmpipeline_cache.session.bin) stalled 32.1 s on one compute create —compute library/lib_cs_01261, 692564 B SPIR-V— and the watchdog exited the process at t≈48.9 s. SoPipeline pre-compile:can be written as "not needed for the first-run UI:LEONIDA_FAST_PIPELINES=computekeeps the main loop alive".What is behind the watchdog. Two consecutive runs, identical command line, both died on a title-side AV at different sites — this looks like the next stop, not the watchdog:
shadows342 ms of 696 ms) and the frame rate settled at 1.2–1.4 frames/s. At t=61.1 s:0xc0000005write atgame_scarlett_master.exe+0x7456da, address in aMEM_COMMIT/PAGE_NOACCESSrun withallocation_base=0x0.dstorage_failurecount this run: 0.0xc0000005read at+0x507b2f4on address0x8, then+0x18bae6freading0xffffffffffffffff. The runtime's own line right before it:xmem: title read fault at t+0x507b2f4 on 0x8 state 0x10000 protect 0x1 type 0x0 allocation 0x0, outside stream CPU window, unmaps 90531, no recent ma….Both are reads/writes into pages the title believes it owns (manually mapped,
allocation_base=0x0), so I read them as title-memory-map state rather than as a new class. I searched issues and PRs for0x7456da,0x507b2f4and"title read fault": no report names these offsets. The neighbouring work I found is #2163 (slot-133 shadow keeps the GPU's writes), #1897 (a page kept read-only by another tracker is copied once) and the closed #2240 / #1972 — so I am not filing a separate issue and will re-test once #2163 and #1897 land. If those two sites survive that re-test I will open a report with the traces.No payload, shader, texture or name list is included here; only RVAs, counters and frame rates.
LGlong1 commentedon Nov 28, 2026
Follow-up from the Windows 10 / RX 6750 GRE (RDNA2) machine: the hang watchdog's two RVAs, measured here, and one Windows-AMD number that matters for it.
The crash site is the watchdog's callback, not its own trap. The dialog Windows shows is
0x00000001423CF683 ... written, i.e.game+0x23cf683. Disassemblinggame_scarlett_master.exeat that RVA:A write to address 0 with a non-zero immediate. The watchdog thread itself (RVA
0x2215a60, the function Snooozs named) has its own fallback write at RVA0x2215c35:That one matches the runtime's
kWatchdogTrapbyte pattern;0x23cf683does not. Before those lines the thread reads its "main loop alive" flags at0x471b6340(bit 0),0x471b6331,0x471b6330, and the last-kick timestamp at0x471b6338; a counter of0x1e(30) one-second ticks runs down, then it calls the callback pointer at0x471b6348(the write above) and then does its ownmovl $0,0x0.What I tried. With
LEONIDA_TITLE_WATCHDOG=0 LEONIDA_TITLE_WATCHDOG_KICK=2215c35,471b6331on commitd442851, the loader printed no "keeping the title's hang watchdog kicked" line and the run still ended at+0x23cf683. I did not try0x471b6330as the kick byte. Questions for whoever measured these: is the kick byte0x471b6331,0x471b6330, or something else this disassembly does not show; and should the trap check also accept the callback site (0x23cf683, pattern with the0x4d8bd421immediate) so a run whose only write-to-0 site reached is the callback can still be defused?Why it matters here: the 30 s is shorter than this driver's pipeline creates. On this machine the main thread stalls in compute creates:
so the watchdog fires on any run that meets one of them. On RADV the same programs are seconds (docs/linux_proton.md, step 2), which is why the world frame was reached there and not here.
One more Windows data point: the runtime built from
6dfca64(SDL3,scripts/build_runtime.ps1) crashes at startup on this machine before the title's first draw —0xc0000005read0x0athost:gta6rt.exe+0xbb13a, right after the title's TLS callbacks. Thed442851binary starts and reaches the first-run pages. The assets here were built from thed442851-eramake_game.py; I have not re-run the assets stage (2.5 h) to test whether that is the cause.Logs and traces stay on this machine; no game files attached.