HLE: name the archive whose compressed data does not unpack (#3893) #3938
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3938"
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 Marvisak/VIctory. Originally posted by MannA-001 on 2026-12-01T17:38:14Z.
Refs #3893.
What happens
On #3893 the title stops on its own breakpoint at
+0x22106e0in early boot. That address is a shared "must not be null" check (+0x2a34d0:test rcx,rcx; je +0x22106e0). Here it is reached from a deserializer at+0x247f590. That function reads a 0x90-byte header and a 4-byte count from a stream, allocatescountbytes, and asserts the pointer. A count of 0 (garbage input) gives null, and the title stops with nothing in the log saying why.The same report shows about 454
dstorage: request failed: zlib(0x8007000d) lines before the stop, described as optional content. They are not harmless. On a whole dump no request fails: a 70 s boot ofmainhere (Series 1.0.2.1, i5-12400F, RX 7800 XT) gets to the front end with 0 failed requests. The title doesn't check the request status. It reads what dstorage wrote and fails much later.The change
request failedline now also names the file the request read (file=), using the existingsource_name. That function also gets a null guard, because the "no source" failure path would otherwise dereference a null source.0x8007000d, from zlib or BCPack) also logs one error naming the archive and offset. It says the archive is most likely damaged and should be copied again or the dump verified, and that the title will stop later on one of its own asserts.No behavior changes otherwise: requests fail exactly as before.
Tests
a_failed_request_names_the_file_it_read: a file source is named as opened, memory and null sources are named safely, and zeros in place of a zlib stream fail with0x8007000d.cargo test -p victory-hle dstorage: 17 passed.cargo clippy -p victory-hle --all-targets: clean.I haven't confirmed that the reporter's archive is damaged; this PR makes the next run say which file and offset. Their stop being Zen 1-only may just mean that machine has the bad copy. If the failing file turns out to be whole, the new line shows exactly which request to look at.
🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-12-01T18:09:59Z.
Verification (independent, AI-assisted: Hy4 flash). Windows, Rust 1.100.0 (Scoop rust-msvc), MSVC, commit-scoped shallow worktree.
Base
63bcca43c6a00a758510398fa43096ce7e4f7df0, head34166881d75323ed5139c4a9215a96852232c327.git diff --numstat→ crates/victory-hle/src/modules/dstorage.rs 44/0.The test is new on the base:
→ no match, exit 1.
git diff --check "63bcca43..34166881"→ no output, exit 0.Result:
running 1 test,test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 152 filtered out; finished in 0.01s.What the test pins: with a request reading a file the title opened,
source_nameends withdata.bin(the name a user can act on); aMEMORY_SOURCErequest reads asmemoryand a null source asnothing, so the error text can never walk a bad pointer; and zeros where a zlib stream belongs makeexecutereturnINVALID_DATA, the value that now routes intodamaged.Two limits worth stating: the one-shot
SAIDlatch indamagedis not asserted (it is process-global andAtomicBool, so a second call would not be observed in the same test binary), and the test callssource_nameandexecutedirectly rather than going through the request queue.The fixture writes its own 16 bytes to a temp file; no title archive, no device, GPU/driver N/A. No game data.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.