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
Retail 1.0.2.1: queue-capacity assert at title+0x4dcbc9d on a complete package (VIctory reproduces it identically) #723
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
Windows 11 Pro 26300, RTX 3080 Ti 12 GB (driver 610.60 / 32.0.16.1060), i7-12700KF.
Package <game folder>, all 111 files SHA-256-verified against the reference (an earlier corrupted copy caused a different assert at +0x1330a44; that is resolved).
xcl built at 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
+0x4dcbc40 is 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 is 0x4e52a40; its only caller is 0x4e529bf (no strings anywhere in the chain).
Cross-runtime evidence
VIctory 97c78d1 (main) and its PR Docs: measured compile-time effects of memory windows and DXC version #346 head both die at the same +0x4dcbc9d on 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.
So the question is what the port must provide for that queue: which allocation backs the destination (XMem/heap/PLS), what its console size is, and whether the emulator's consumer should drain it.
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).
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). At title+0x4dcbc9d, rcx is a 40-byte stream slot, not a GPU command buffer:
slot offset
field
+0x00
descriptor pointer
+0x08
data buffer base
+0x10
capacity (dword)
+0x14
flag
+0x18
cursor (dword)
+0x1c
watermark (dword)
+0x20
stream id (dword)
+0x24
state
Values at the failing enqueue (r8 = 0x6c0 = 1728 bytes):
Structure, in case it is useful to you: registry array @ 0x9AE9950 (u16 count/capacity beside it); registrar 0x1D1B800(id, bytes) allocates a 0xD8 object with id @ +0xC0 holding two 40-byte slots selected by obj+0xC8; the ~297 packet writers go 0x4E52AA0 (reserve) → fill → 0x4E529A0 → 0x4E52A40 → 0x4DCAE80 (16-byte alignment record) → 0x4DCBC40 (this assert) → memcpy to slot->data + cursor. Publisher 0x3E14E0 stamps the descriptor, mfences, sets ready, then flips the half. The per-frame consumer 0x43A6B40 walks the registry, picks the older-seq half, and processes it only when ready & 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 .data cluster 0xAA31C4D…0xAA31C56), and a config-driven id read from host+0x1128 (host global @ 0x9F13F20), capacity 0x10000.
A RIP-targeted skip of only this breakpoint unblocks the title. Comparing rip & 0xFFF == 0xC9D is ASLR-proof; advancing Rip by one lands on 0x4DCBC9E (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.
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_logger in crates/xcl/src/eh.rs on 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):
// XCL_SKIP_QUEUE_ASSERT: the title's packet-stream capacity assert at title+0x4dcbc9d. Skipping the// int3 lands on `jmp 0x4dcbc8a`, the enqueue's "packet dropped" path. The page offset is ASLR-proof.if rec.ExceptionCodeasu32 == 0x8000_0003 && std::env::var_os("XCL_SKIP_QUEUE_ASSERT").is_some(){let ctx = &mut*(*info).ContextRecord;if ctx.Ripasusize&0xfff == 0xc9d{
ctx.Rip += 1;return -1;// EXCEPTION_CONTINUE_EXECUTION}}
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:
xcl: D3D12.X: 4500 frames presented, 30.0 fps over the last 300
xcl: activity (2 s): 60 presents, 240 submits, 1260 draws, 60 dispatches,
120 frame-event waits (0 timed out), 60 frame statistics (0 not flipped)
xcl: present: frame 1993 (3840x2160, format 28) written to ...\frame_1993.bmp
– 517542 of 518400 samples not black
raw texels (most common): 0xff2c2020×515565 0xfff9f9f9×1318 0xff000000×798 ...
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:
The packets are dropped, not consumed. The real fix is still whatever should be draining that stream (the host+0x1548 vs desc->0x2c + 3 gate above, and the ready-half selection in 0x43A6B40).
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).
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_logger in crates/xcl/src/eh.rs on 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):
// XCL_SKIP_QUEUE_ASSERT: the title's packet-stream capacity assert at title+0x4dcbc9d. Skipping the// int3 lands on `jmp 0x4dcbc8a`, the enqueue's "packet dropped" path. The page offset is ASLR-proof.if rec.ExceptionCodeasu32 == 0x8000_0003 && std::env::var_os("XCL_SKIP_QUEUE_ASSERT").is_some(){let ctx = &mut*(*info).ContextRecord;if ctx.Ripasusize&0xfff == 0xc9d{
ctx.Rip += 1;return -1;// EXCEPTION_CONTINUE_EXECUTION}}
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:
xcl: D3D12.X: 4500 frames presented, 30.0 fps over the last 300
xcl: activity (2 s): 60 presents, 240 submits, 1260 draws, 60 dispatches,
120 frame-event waits (0 timed out), 60 frame statistics (0 not flipped)
xcl: present: frame 1993 (3840x2160, format 28) written to ...\frame_1993.bmp
– 517542 of 518400 samples not black
raw texels (most common): 0xff2c2020×515565 0xfff9f9f9×1318 0xff000000×798 ...
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:
The packets are dropped, not consumed. The real fix is still whatever should be draining that stream (the host+0x1548 vs desc->0x2c + 3 gate above, and the ready-half selection in 0x43A6B40).
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-namehash resolves the ids exactly:
id
name
registered size
0xF0A244EF
GameThread
0x18000 (the stream that fills and asserts)
0xC0520AEA
AudioThread
0x48000 (per-thread default, index kept in TLS +0x10DC)
0x7585D45D
Unspecified
—
0xE0122065
not in the dictionary
0x10000, id read from host+0x1128
So 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.
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:
// XCL_GROW_THREAD_STREAM: rcx is the 40-byte slot; +0x08 dataBase, +0x10 capacity, +0x18 cursor.if rec.ExceptionCodeasu32 == 0x8000_0003 && std::env::var_os("XCL_GROW_THREAD_STREAM").is_some(){let ctx = &mut*(*info).ContextRecord;if ctx.Ripasusize&0xfff == 0xc9d{// VirtualAlloc(8 x capacity, min 1 MiB); copy the used bytes; write back base and capacity;// then re-run the capacity check at title+0x4dcbc47 so the memcpy happens normally.// (Full snippet in our bench log; ~20 lines, no per-packet exception afterwards.)
...}}
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.)
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: main47efa2e traps at 27.6 s, the #887 head runs on with spatial audio: using XCL's silent renderer. Details in #887 (comment). 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.
Activity
vladbondarenko97 commentedon Nov 24, 2026
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 commentedon Nov 24, 2026
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 DirectStorage: BCPack entropy stage for all modes, not yet called #208/DirectStorage: BCPack BC1 requests are unpacked, tables from bcpack-rs #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 commentedon Nov 24, 2026
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 DirectStorage: BCPack entropy stage for all modes, not yet called #208/DirectStorage: BCPack BC1 requests are unpacked, tables from bcpack-rs #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 commentedon Nov 24, 2026
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 commentedon Nov 24, 2026
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 #887 (comment). 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.