Retail 1.0.2.1: queue-capacity assert at title+0x4dcbc9d on a complete package (VIctory reproduces it identically) #723
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#723
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?
@vladbondarenko97 on GitHub · 2026-11-24 04:06 UTC · original
Summary
Retail title (Series 1.0.2.1, complete package) reaches the menus and then dies on a queue-capacity assert inside the title at
game_scarlett_master.exe+0x4dcbc9d. Marvisak/VIctory reproduces the identical assert on the same package, so this is a title expectation the port has to satisfy rather than one emulator's bug — and it blocks world entry in both.Setup
32.0.16.1060), i7-12700KF.<game folder>, all 111 files SHA-256-verified against the reference (an earlier corrupted copy caused a different assert at+0x1330a44; that is resolved).4017f8f,XCL_NETWORK=0,XCL_ACTIVITY=1,XCL_FRAME_DUMP=2, run in the interactive console session (presents need it).Result
The run gets to the menus: 28 presents, 19 draws, 3 dispatches, 6 background pipelines (
report.json), frame dumps written. Then:r8 = rsi = 0x6c0— the call is trying to enqueue 1728 bytes.What the site is
+0x4dcbc40is a queue enqueue under a lock (0x140004b40): it copies[src+0x18]bytes from[src+8]into a destination object and asserts when[dest+0x10] - [dest+0x18] < len(capacity − size < requested). The only caller is0x4e52a40; its only caller is0x4e529bf(no strings anywhere in the chain).Cross-runtime evidence
97c78d1(main) and its PR #346 head both die at the same+0x4dcbc9don this package; with a diagnostic that skips breakpoints, the title retries the same RIP ~8×/s for minutes (2,106 skips in 4 min, no progress), i.e. the destination queue is genuinely full and skipping cannot help.Happy to instrument whatever you want (traces, dumps of the destination object at the assert, per-call sizes).
AI-assisted (Claude Code CLI via a model proxy; logs and addresses only, no game data).
github-bot referenced this issue2026-11-26 04:47:57 +00:00
@vladbondarenko97 on GitHub · 2026-11-24 07:10 UTC · original
Update — full RE of the assert, and a RIP-targeted skip that unblocks the title
Follow-up to the registers/disassembly above, same title build (
game_scarlett_master.exe, 1.0.2.1). Attitle+0x4dcbc9d,rcxis a 40-byte stream slot, not a GPU command buffer:+0x00+0x08+0x10+0x14+0x18+0x1c+0x20+0x24Values at the failing enqueue (
r8 = 0x6c0= 1728 bytes):0x18000(98304), cursor = watermark =0x17fb0(98224) → 80 bytes left0xF0A244EF; the same stream's other half sits at cursor0x114c0(70848)ready = 1,arg = 0,seq = 0x50Structure, in case it is useful to you: registry
array @ 0x9AE9950(u16 count/capacity beside it); registrar0x1D1B800(id, bytes)allocates a0xD8object withid @ +0xC0holding two 40-byte slots selected byobj+0xC8; the ~297 packet writers go0x4E52AA0(reserve) → fill →0x4E529A0→0x4E52A40→0x4DCAE80(16-byte alignment record) →0x4DCBC40(this assert) → memcpy toslot->data + cursor. Publisher0x3E14E0stamps the descriptor,mfences, sets ready, then flips the half. The per-frame consumer0x43A6B40walks the registry, picks the older-seqhalf, and processes it only whenready & 1andhost+0x1548 >= desc->arg + 3.Three streams register on this title:
0xC0520AEA(0x48000, per-thread default, index kept in TLS+0x10DC),0xF0A244EF(0x18000, gated on a flag byte in the.datacluster0xAA31C4D…0xAA31C56), and a config-driven id read fromhost+0x1128(host global@ 0x9F13F20), capacity 0x10000.A RIP-targeted skip of only this breakpoint unblocks the title. Comparing
rip & 0xFFF == 0xC9Dis ASLR-proof; advancingRipby one lands on0x4DCBC9E(jmp 0x4DCBC8A), i.e. the "enqueue failed / packet dropped" path. With that, a session-1 run on an RTX 3080 Ti holds 30.0 fps, 46 draws/frame, GPU 1.9–9.4 ms, zero WARN/ERROR lines, and renders the whole first-run flow (key art, Brightness calibration, Legal Notices) — previously it died at this breakpoint within a minute, before any of that. The dropped packets are(id, type, float)records (0.55, 0.2, 1000.0, 2000.0 …), i.e. parameter/telemetry-style data, and dropping them has shown no cost so far.Question: the consumer's gate reads
host+0x1548, which is 0 in our runs, so nothing drains and both halves fill. Does xcl advance that counter (and from where), or is the intended port behaviour to treat the channel as unavailable and reset the slot? We would much rather fix the drain than keep skipping the assert.@vladbondarenko97 on GitHub · 2026-11-24 08:02 UTC · original
Update: with this assert skipped, xcl renders a non-black UI — and here is the exact patch
Following the RE above, I put the skip into
cpp_exception_loggerincrates/xcl/src/eh.rson PR #273's head (ce8839b9), rebuilt, and ran it in an interactive session on an RTX 3080 Ti against the retail 1.0.2.1 package (XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=2):The log then shows
queue assert at game_scarlett_master.exe+0x4dcbc9d skipped (packet dropped), and instead of ending at ~28 presents the title keeps running:That frame is the title screen — "ACCOUNT PICKER (Y) / SCREEN NARRATION (OFF) (X) / PLAYER (A)" over a dark background with white text, i.e. the same screen VIctory shows at this stage. Before this patch xcl's first menu was a black image and the process ended at the breakpoint about a minute in, so this assert was masking the whole UI path.
Two caveats stay true:
host+0x1548vsdesc->0x2c + 3gate above, and the ready-half selection in0x43A6B40).options 0x1(zlib), so #208/#273 are not exercised by it. In our runs the title only starts requesting BCPack once it gets further (its first-run flow stalls here on a static screen even with key injection reaching the window).Happy to hand the patch over in whatever form is useful (snippet above, or a human-authored PR — AI-assisted investigation, Claude Code; all values come from our own retail runs).
@vladbondarenko97 on GitHub · 2026-11-24 08:26 UTC · original
Update: with this assert skipped, xcl renders a non-black UI — and here is the exact patch
Following the RE above, I put the skip into
cpp_exception_loggerincrates/xcl/src/eh.rson PR #273's head (ce8839b9), rebuilt, and ran it in an interactive session on an RTX 3080 Ti against the retail 1.0.2.1 package (XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_FRAME_DUMP=2):The log then shows
queue assert at game_scarlett_master.exe+0x4dcbc9d skipped (packet dropped), and instead of ending at ~28 presents the title keeps running:That frame is the title screen — "ACCOUNT PICKER (Y) / SCREEN NARRATION (OFF) (X) / PLAYER (A)" over a dark background with white text, i.e. the same screen VIctory shows at this stage. Before this patch xcl's first menu was a black image and the process ended at the breakpoint about a minute in, so this assert was masking the whole UI path.
Two caveats stay true:
host+0x1548vsdesc->0x2c + 3gate above, and the ready-half selection in0x43A6B40).options 0x1(zlib), so #208/#273 are not exercised by it. In our runs the title only starts requesting BCPack once it gets further (its first-run flow stalls here on a static screen even with key injection reaching the window).Happy to hand the patch over in whatever form is useful (snippet above, or a human-authored PR — AI-assisted investigation, Claude Code; all values come from our own retail runs).
Follow-up — the stream ids are per-thread names (joaat), and the stream we drop is the game thread's
tarekmania/gta6-namehashresolves the ids exactly:0xF0A244EFGameThread0x18000(the stream that fills and asserts)0xC0520AEAAudioThread0x48000(per-thread default, index kept in TLS+0x10DC)0x7585D45DUnspecified0xE01220650x10000, id read fromhost+0x1128So these are per-thread record streams (the id is the joaat of the thread's name), each with its own capacity and a 32 KB stack staging buffer per packet, and the one that fills is the game thread's. With the packets being
(id, type, float)records (0.55, 0.2, 1000.0, 2000.0 …), a per-thread recorder whose consumer never runs reads like profiling/parameter tracing rather than a graphics queue — which is consistent with the title running normally here for 11,000+ frames with those packets dropped.Either way the open question stands, and it is sharper now: why does the game thread's stream have no consumer in our runs? If it is a recorder, the port may simply want to treat it as unavailable (reset the slot); if the records carry per-frame state someone downstream reads, then dropping them is wrong and the drain has to be fixed.
@vladbondarenko97 on GitHub · 2026-11-24 08:43 UTC · original
Better than dropping: grow the stream on the assert (validated, ~20 lines)
Follow-up to the workaround above. Instead of skipping the int3 and losing the packet, the VEH can grow the slot's buffer and then let the enqueue succeed:
On the retail title it fires exactly twice — once per half — and then never again:
and the rest of an 11,000-frame run has zero asserts and zero dropped packets. That is strictly better than the skip: nothing is silently discarded (so if anything downstream does read these records we are not corrupting it), and there is no exception per packet.
Combined with the naming result (
0xF0A244EF=GameThread,0xC0520AEA=AudioThread), the open question is unchanged and now very concrete: what should consume the game thread's records? Growing the buffer is a safe placeholder until that is answered; resetting the slot on "full" would also work if the records are pure tracing.Outcome of the A/B test: with growing (zero drops, zero asserts) the title walks the same first-run flow — title screen → loading artwork → "ROCKSTAR GAMES LEGAL TERMS & POLICIES — Confirm setup and start the game" — and then sits there, exactly as it does with the skip. So dropping the game thread's records is not what stalls the frontend; the stall is downstream of this stream, which supports treating these records as tracing rather than as data something consumes.
(For completeness, a third party has also now reported BCPack BC1 requests filling in xcl#878 — 2,096 requests / 149,528,576 bytes — so the texture side is moving on several machines.)
@vladbondarenko97 on GitHub · 2026-11-24 13:03 UTC · original
Root cause found elsewhere, closing as a duplicate of #695. This PC has no active audio playback device (every render endpoint is
Unknown). As @Placebola showed in #695, the title's audio setup then returns with a lock still held, and the audio thread never drains the per-thread 96 KiB command streams. The "GameThread stream" I named above is one of them. The skip/grow VEH workarounds above only hide that.#887 (silent spatial endpoint) removes the trap on this machine on the retail title:
main47efa2etraps at 27.6 s, the #887 head runs on withspatial audio: using XCL's silent renderer. Details in https://github.com/ivall/xcl/pull/887#issuecomment-7132280693. Workaround without #887: turn on any playback device before starting the title.AI use: Claude Code (Claude Opus 5.5) did the test runs and drafted this; I reviewed it.