image+0x1330a44 is reached on a 66%-downloaded folder (shaders.rpf reads as zeros), and the "written" test asks a static object #632
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?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T17:45:36Z.
What
The int3 at
image+0x1330a44(the boot shader-database write) is reached on a game folder that is 66% downloaded, and the archives it needs read as zeros. Recording the measurement so the next person does not spend a run on it, plus two facts from the image about who answers "not written".Measured (torrent resume, not file sizes)
piecesin~/Library/Application Support/qBittorrent/BT_backup/<hash>.fastresumeis one byte per piece (non-zero = have); againstinfo.piece length(16 MiB) andinfo.filesin the matching.torrent: 8,829 of 13,345 pieces = 148.1 GB of 223.9 GB.shaders.rpf: pieces 0, 12 and 24 of 25 only — header, one middle piece, last piece (the client's first/last-piece priority).ddat 100 MiB returns zeros. The file is preallocated to its full 411,695,600 bytes, so its size, its header and its last piece all look valid.packs.rpf29/287,levels.rpf2,095/4,540,story000.rpf171/1,195,core_bvh4.rpf188/495,navmeshes.rpf205/401,core_restofworld.rpf12/78.anim,audio,data,common,script,textures,appdata0.From the image, no run
0x1331110isxor eax,eax; cmp cl,3; lea image+0x6dd5b08; cmove rax,rdx; ret, and0x13310f0iskind == 3. So the destination whose+0x30answers false is the singleton atimage+0x6dd5b08in.data, with vtableimage+0x66fdd40in.rdata(a.datafile offset misaligns that dump):+0x30=image+0x1331210,+0x38=image+0x1331100,+0x28=image+0x1331660(a source of the-1/-3sentinels in the notes).Not claimed
That the missing shader pieces are the cause of the missing state. It is a second, independent way to reach "a shader database that references a state the loaded data does not have", and it means no run on this folder can settle what the write needs until the download finishes.
Docs PR follows and only touches the
image+0x1330a44section ofdocs/native-host.md.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T20:04:18Z.
Static read of the writer state's producer and its entry point, on
game_scarlett_master.exe(SHA-256e95020b2…d5a08993, the release's own!File Hash.txtvalue). Analysis only, nothing from the game is in this comment.Command that produced it:
1.
[S+0x38]and[S+0x40]are filled, and by this function:0x1418bc320. It allocates the 0x78-byte state, zeroes all of it, then installs the two lanes:Its caller is
0x1428cd98c(mov [rbx+0x10020], rax, theS = [rsi+0x10020]this repo measures), and it handsSstraight to the writer entry:So the two pointers are not "never set": they are a zero-filled 0x38-byte object and an object taken from singleton slot 0, which is why
0x18171e400reads as zeros and0x18181f0a0reads{0x1478f6a50, 0x47bf, 0}— a request-shaped object, not a table.2.
[S+0x60]is cleared by the writer entry itself, on purpose:0x1413315f0.That reframes the open item: the null destination at the trap is not a step that failed to run.
0x1330d69's[S+0x60] == 0is the state the entry deliberately leaves, and the destination is installed later — inside0x1330cd0, from the record's stream. Which is exactly the stream that measures as closed for this record: flag3at[result+0x10]picks the lane, and that lane's device reads kind0x1b, whose handler at0x55330d6returns0xfffffffdwithout copying (the kind0x16device on the other lane answers0).So the question worth asking next is not "what setup is missing to fill
S+0x60" but "who installs[S+0x60]inside0x1330cd0, and why not for a record whose flag is 3" — with0x1331110(the object[rsp+0x38]that refuses, per the existing note) still the thing to read. Also note0x1331650gives a stable instrument: break at0x133165b/0x1331650and[S+0x60]is known-zero, so any non-zero value observed later in the same state came from the completion test.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T20:04:48Z.
Read off the image with
llvm-objdump -d --no-show-raw-insn -j .text "/Volumes/Anastasis' SSD/GTA VI v1.0.2.1/game_scarlett_master.exe" > /tmp/scarlett.asm(a static read; no run needed), the completion test atimage+0x1330d69is not a pointer test at all — it is a two-bit field in a decoded descriptor, and that field is what sends the writer down the livelock instead of the copy.The whole tail of
0x1330cd0, from the lane choice:So, precisely: the livelock at
0x1330ff9is entered exactly when the descriptor's flag field is3and the destination is null; a flag other than 3 copies even with a null destination, and a non-null destination copies even with flag 3.[S+0x60]is zero by the initialiser's own store (themovq $0,0x60(%rcx)atimage+0x1331650recorded on PR #75), so on this run the deciding term is the flag alone.flagis not a byte of the object and not a "kind":0x14550db40also writes it into the scratch's+0x10, and it is taken from the packed value's high bits, by kind —packed >> 0x3efor kind 2 (0x14550db69),(packed >> 0x3c) & 3for kind 3 (0x14550dbbc),(packed >> 0x38) & 3for kind 4 (via0x14550dbf9→0x14550dbb8), and zero for any other kind, where the whole scratch is zeroed (0x14550dbfb:vxorps+movl $0,0x10(%r8)). So a descriptor whose kind is not 2, 3 or 4 can never reach flag 3, and the writer would copy; something is handing it a kind 2/3/4 descriptor with that field set to all ones.Two things follow for the hunt, and they narrow it a lot:
+0x38/+0x40lane is indexed by the same term, not chosen by[lane+0x10] == 3: index 1 ([S+0x40]) is read only when flag == 3, which is why the failing chunk's lane is[S+0x40]and[S+0x38]reads 0 — consistent with theVICTORY_BREAK_AT=13310b0capture already recorded, and the two are the same fact, not two.(%rax + rbp*8)and its kind bytedl:raxis[S+0x08] + rcx(from0x141330d07/0x141330d13) andrbpis the element index the loop carries. The kind is what selects which bits are the flag, so the question "why flag 3" is "which descriptor did it pick, and what kind is it".This does not touch the earlier conclusion (the id is found;
hasanswers true; the refusal is on the write path); it replaces "the setup that fills[S+0x38]/[S+0x40]/[S+0x60]/[S+0x68]is the missing piece" with a predicate the run can be made to print: read(%rax + rbp*8)anddlat0x141330d1awithVICTORY_BREAK_AT=1330d1aand the two questions become oneVICTORY_DUMP_MEMof that qword.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T20:25:35Z.
A measurement that bears on whether the trap is code or data, taken while the folder is still downloading. Archive check at 22:25, 32 samples per archive, on
"/Volumes/Anastasis' SSD/GTA6.Xbox.v1.0.2.1-CYBERLEEK"(tools/macos/check-game-data.shfrom #635):shaders.rpfis the archive this boot database is written from, it is 90% zeros, and it has not been touched since 12:59 while the downloader works throughpacks/levels/movies. That is exactly the condition this issue's title describes.Two notes on how that sits with
docs/native-host.md:2026-11-26 8c20f83bcomparison) rules out missing archives — the root set is complete and the world's sit underpack/. It does not address holes insideshaders.rpf, which is a different claim and is the one this measurement speaks to.0x13310b0(lane flag3-> kind0x1bdevice ->-3) is consistent with a database being assembled from records that read as zeros, so the two readings are not mutually exclusive either.So the cheap experiment, before any more analysis of
[S+0x60]: let the downloader fillshaders.rpf, re-runcheck-game-data.sh, then run once. If the trap is gone, no code change was needed and this issue can be closed on the data. If it survives a cleanshaders.rpf, the trap is the host or the title state and the addresses in the comment above are the place to continue — in particular0x1330fc4(mov [rsi+0x60], rbx, the store that records the destination, taken only on the success path just beforemov al,1at0x1330fe3) and0x1331110(which returns the singleton at0x146dd5b08only when the lane's flag byte is3, elseNULL).Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T20:28:45Z.
Measured at the writer's own decision point,
VICTORY_BREAK_AT=1330cea(thecmpl %eax,%ebpright after the record and the index are loaded) withVICTORY_PEEK=rcx,rdx+0x5c,rdx+0x50,rdx+0x8,rdx+0x38,rdx+0x40, on the 163 GB partial folder, release build of95d9caa1:Read against the code, that
rcxis the record0x1330cd0(rcx = record, rdx = S)works on, and it is a 0x40-byte object whose qword at+0is0308000100000018=u32 +0x00 = 0x18(the descriptor table's offset from the record),u16 +0x04 = 1(its bound),u8 +0x07 = 3(the kind); its descriptor table at+0x18holds0x30000000fe12fc30and0x30000000ed98b440, and the entry the writer takes is index[S+0x5c] = 0.Three things follow, and two of them correct what is written above the line.
(0x30000000fe12fc30 >> 0x3c) & 3 == 3, and the second descriptor carries 3 in the same bits: every entry of this record decodes to flag 3, so thejne 0x1330ff9path (hand the chunk to the interface,vtable+0x38) is the path this record is supposed to take, not a wrong turn. What makes it look like a dead end is only that the interface's own write then refuses.u16 +0x04 = 1against index0: had the index been 1,0x1330ceawould have taken theje 0x1330fe3success return. It is 0, so the one element this record has goes to the interface — the same conclusion as the kind-3/0x1brefusal, reached from the other side.[S+0x38]/[S+0x40]/[S+0x60]/[S+0x68]is the missing piece" is not supported by this run. Both lanes are non-null here (0x18171d480,0x1817abf70),[S+0x08] = 0x1f0(where the earlier capture had0x10000), and the container is0x181796800. So the state is populated; what fails is further down, in the interface's per-chunk write with the lane's device of kind0x1b. The[S+0x38] == 0of the older capture is a different moment or a different lane count, not a state that was never set.So the boot blocker stands as: this record (kind 3, one element, flag 3) is handed to the interface, whose write for the lane's device of kind
0x1banswers-3, and the caller's completion test then answers false, which is the assert. The next question is the device, not the writer state: where the lane0x1817abf70gets the device it passes at+0x60as0x1842d1cb0with[device] = 0x1b, and whether a complete folder's shader database gives it a kind-0x16device instead (the first chunk's device answers0, per the existingVICTORY_BREAK_AT=13310b0capture).Two caveats on the method, so the numbers are reproducible:
VICTORY_BREAK_ATleaves the run to die (exit 3, the title's own crash reporter), so the log after the break says nothing about the title's progress; and the addresses are stable run to run (the lane is0x1817abf70in two runs), which is why peeking an absolute address works here at all.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T11:18:59Z.
Confirmation of the data-incompleteness thesis, from a run today (2026-11-29):
The SGD5 int3 boot blocker is GONE. Earlier today, with shaders.rpf still filling in, the title died at ~3.4 s on the same image+0x141330a44 int3 as always. After shaders.rpf completed, an identical run sailed straight past it: the title now runs ~56 s, reaches frame 1344 (4,720 recorded draws), streams 15,000+ DirectStorage reads from levels.rpf / anim.rpf / textures.rpf / packs.rpf with WASAPI audio flowing, and dies later on a new, unrelated wall — a first-chance 0xc0000005 (WRITE to 0xe) at image+0x14056edab.
So the int3 was never host code: it was the title tripping over a partially-downloaded pack, exactly as this issue suspected. Anyone still reproducing it should check their data completeness before debugging further (levels.rpf itself is still incomplete here, and the new wall may also move on fuller data).
Run details: headless, release build, log at runs/20261129-131718-XvmCKt/victory.log — first-chance line 'first-chance exception code=0xc0000005 at=0x14056edab'. Will file the new wall as its own issue.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T11:28:52Z.
The lane's flag is a 2-bit class at the top of the element key, which is what the
flag == 3split and the "why is the writer's id different from the submit's" asymmetry actually are. Read off the image:0x14550db40(rcx = the 64-bit element key, dl = the container's width code, r8 = a 0x14-byte result)unpacks the key and writes a flag byte at[r8+0x10]:dl[r8+0x10]key >> 0x3e(key >> 0x3c) & 3(key >> 0x38) & 30(result zeroed)0x1331110then returns the singleton at0x146dd5b08only when that byte is3, elseNULL:Checked against the five keys this repo already carries:
33f70dfaf2c5098973bcb72dce74f11fb7076b6245d35fb5e0c12d7a5d4884c5(the writer's)b6f5bdb2c66da2e9286030a358a789fb(the submit's, not in the table)So the five entries are classes
0,1,2,3,2: the writer's record is the only class-3 element of the five, it therefore takes the singleton path, and the submit's request is class 0 — the two ids are not interchangeable and the asymmetry is a class difference, not a missing lookup.And the destination store, now named:
0x1330fc4(mov [rsi+0x60], rbx), on the success path only, immediately beforemov al,1at0x1330fe3. So[S+0x60] == 0at the trap is simply "no chunk of this element has gone out yet", and the false is the completion test of the first one.Sequence that follows, on this image: key class 3 -> singleton
0x146dd5b08-> its+0x30(0x141331210) copies the request and calls the generic IO write0x145532220per chunk -> the request's device reads kind0x1b->0x55330d6stores0xfffffffdand returns ->blstays 0 ->0x1330e5etakesjeto the failure exit0x13310b0-> the retry. The open question is therefore what built that request's device with kind0x1b, since class-0..2 elements go through the normal path with a device whose kind is0x16.Commands:
llvm-objdump -d --no-show-raw-insn --x86-asm-syntax=intel "<exe>" --start-address=0x14550db40 --stop-address=0x14550dc80, and the same around0x141331110,0x141330fc4,0x141331210.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-29T11:39:04Z.
The dispatch, named — this closes "which lane and which handler" and leaves one question.
0x13310f0maps the flag to a lane index (cmp cl,3 ; sete al), so the lane is[S+0x38 + 8*index]:[S+0x40]when the flag is3,[S+0x38]otherwise.[S+0x40]is the request-shaped object these notes measure as{source, size, 0}— the object the singleton's first slot returns at0x1418bc35a, not a table.The spin condition at
0x1330d69is then exactlySo a class-3 element spins while class 0-2 elements write: same code, different lane and handler, and the difference is the key's top bits, not a missing table entry.
What is left is the device: the request is
[S+0x40]and its+0x60reads kind0x1bat the failure exit, while the class 0-2 path's device reads0x16. Nothing in0x141331210writes the request's+0x60(it fills+0x38,+0x40,+0x48,+0x50,+0x30), so that field is set by whoever builds the request, and the clean way to name it isVICTORY_TRAP_WRITESon that object's page once #75/#78 land — a silent trap is not a negative.