Builder: the damaged-texture check uses what the extraction saw (no ~100,000 files reopened) #1885
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1885
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/unpack-zstd-heads"
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?
For #1876 and #1870 (closed into it). This should remove the long stall they hit, but I haven't reproduced their machine, so the issue stays open until a reporter confirms.
Problem: since v2.0.12, the first build after an unpack opens every romfs
.zsfile, about 100,000 of them, to find the few a 23.3 GB dump has damaged (#1002). Under a virus scanner every open is scanned, so the worker sits at 0% CPU for a long time:main: ZBIC -> plain NSO;Players read that as a freeze. v2.0.11, which didn't have the check, built fine. Main's #
6ad9f1cdnow shows the check's progress, but it still opens every file.Fix:
nx2/nup.py's extraction keeps each romfs.zsmember's first 4 bytes as it writes them (HeadSink). When the whole romfs was walked, it leaves the list of the files that don't start as zstd beside it (romfs_zstd_heads.txt). A re-run opens only the files left by the run before.nx2/make_game.pykeeps that list in the game folder under the unpack's stamp (.hookshot_romfs_heads). The stand-in step takes it instead of reopening every file, then removes it.Tests: new
nx2/test_nup_zstd_heads.pychecks that:damaged_game_filespatched to fail) and still puts the stand-in in;The nup and stand-in tests (
test_nup_stand_in,test_damaged_check_progress,test_nup_paths,test_nup_codec,test_nup_read_name,test_missing_nup) pass.test_nup_out_of_spacefails the same way without this change; #1793 fixes it.🤖 Generated with Claude Code