mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:00:52 +01:00
[GH-ISSUE #2019] [Windows / Vulkan] Reproducible 0xC0000005 at game_scarlett_master.exe+0x23cf683 ~40 s after two E_DSTORAGE_DECOMPRESSION_ERROR reads #54
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#54
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @azmuricy466-pixel on GitHub (Nov 25, 2026).
Original GitHub issue: https://github.com/ubiquitarianism/leonida/issues/2019
Summary
gta6rt --first-run-uiloads the title, shows the splash and runs the first-run UI, then the titlewrites to
0x0atgame_scarlett_master.exe+0x23cf683(0xC0000005, access=write). It reproduces onevery run, at 145–204 s, always after exactly two DirectStorage decompression failures with
E_DSTORAGE_DECOMPRESSION_ERROR(0x89240030). No world frame is ever presented.Environment
main@71a769d7, built withscripts/build_runtime.ps1,-DLEONIDA_SDL3=ONwith SDL3 3.4.20shared (
SDL_SHARED ON,SDL3::SDL3),-DLEONIDA_REQUIRE_VULKAN=ON, RelWithDebInfomake_game.py --stages check,shaders,runtime→ 26,503 shaders translated,check all files present and hashes match
TdrDelay/TdrDdiDelayraised to 60 s (a 8.9 s pipeline build no longer resets the device;device was losthas not recurred since)Command
Trace (three runs, identical)
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_callevents: none.
int3: none.What I tried
LEONIDA_DSTORAGE_FITTED=0 LEONIDA_DSTORAGE_FAST_BCPACK=0→ worse: 120 decompressionfailures and an earlier, different xmem fault. Reverted.
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=1and sendthe request list for those two ranges, or any diagnostic build you want.
Notes
a1ed7bcb, no SDL3) the run died earlier atgame_scarlett_master.exe+0x104075(read 0xffffffffffffffff); the TLS-slot work fixed that.Player, no crashes up to the pointabove.
@azmuricy466-pixel commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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 commented on GitHub (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.