tools: check a game folder's archives for the holes a preallocating downloader leaves, before spending a run #638
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS#638
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?
@AnastasisKon on GitHub · 2026-11-28 17:49 UTC · original
What
A game folder that is still downloading looks complete. A preallocating client leaves every archive at its full length with the parts it has not downloaded reading as zeros, so
GetFileSizeEx, theRPF9header and the tail piece all look right and the shader data in the middle is absent.#632measured exactly that on a folder that looked valid:shaders.rpfheld 3 of its 25 pieces while being 411,695,600 bytes long.Nothing in the repository says so before a run is spent, and the run it costs is not obviously a data problem: the title ends in the int3 at
image+0x1330a44.Fix
tools/macos/check-game-data.sh [--samples N] <game folder>: samples 4 KiB blocks spread over every.rpf, reports per archive how many samples were holes, names the archives that are missing data, and exits 1 when any is. 4 KiB blocks come from a sparse read, so a 142 GB folder takes about a second.tools/macos/tests/check-game-data.shcovers it with fixtures (complete, holey, header-and-tail only, small archive, sample count, no archive, missing folder, bad arguments, several folders,--help), and CI runs that test beside the other script regressions.One sentence in
README.md's "Run the game" points at it.Not claimed
That holes are the only reason a folder fails to boot, and nothing about the host: the check reads the game folder and never writes to it.