WIP: fix(fs): name game files bigger than their size-table entry, and listed files not found #2173
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2173
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/fs-size-table-check"
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?
Summary
The game closes when an actor fails to be created. That happens when a file the actor needs doesn't load: the file is
missing, damaged, or bigger than its entry in the game's resource size table, which sets the size of the buffer the game
loads it into. Neither the game nor the builder said which file it was, so players and we were left guessing from a
crash (#1499, #1761).
This change names those files:
host/fs_sizes.c, called fromOpenFileinhost/nn_fs.c). When the game opens its size table,the table it was served is read once: the RomFS's own, the button prompts' with the font's entry raised (#2092), or
the mods' merged one. After that, listed
content:files are checked against their entries, except.mcfiles. A.zsfile's size is theone its zstd frame states, from its header as the game reads it; files whose headers are never read in full may not be
checked. Any other file's size is its own. Up to 64 distinct files bigger than their entries are logged once, as warnings:
fs: <path> is N bytes, its size-table entry M: the game drops it (a damaged or mismatched dump?).The first 20 distinct listed
.zsfiles that aren't found are logged too:fs: <path> not found, and the size table lists it: the game drops it (an incomplete dump?).Only a real not-found open counts (ERROR_FILE_NOT_FOUND / ERROR_PATH_NOT_FOUND, ENOENT / ENOTDIR on Linux): a file
in use or refused isn't called missing. Past the 20th, one line says more are missing. This doesn't need
HOS_FS_TRACE.nup.size_table_check,make_game.check_size_tables). Once the RomFS is unpacked or chosen, its files are checked against each readableResourceSizeTable.*in it. Unreadable tables are reported. The build log names up to 50 file comparisons that exceed an entry, then gives a count; these comparisons are inconclusive unless the game uses that table. When the RomFS has more than one table (a base dump with an update overit), the build warns that the game reads only its own version's. This is a warning, not a stop: a mod can raise an
entry.
Missing files are limited to listed
.zsfiles because normal play asks for many files that aren't there. An earlierHOS_FS_TRACErun on this PC (a good dump, Castle Town) logged 744content:opens as not found: textures and settingsthe game looks for in turn. 345 distinct paths aren't in the size table at all. The 4 that are listed aren't
.zsfiles (uncompressed settings the game goes on without). A check of this PC's good dump
found 0 of its 186,583 files bigger than their entries.
Read first:
host/fs_sizes.c, the hook inhost/nn_fs.cOpenFile, thennx2/nup.pysize_table_checkandnx2/make_game.pycheck_size_tables.See #1499, #1761
Testing
Tested: Linux, RTX 3090, NVIDIA 620.70.06, this PR @
635af081as a pack (106 s, the lifted C unchanged) over main's base, through the job queue:kokiri-startthrough the Market, Hyrule Castle, Hyrule Field and Kokiri Forest: in play, clean quit, and nofs:line withsize-table entry,the size table lists itorcannot be read as a resource size table.Tex/Gradation_Ramp_05_Fi.bntx.zs, its frame stating 4096 bytes past its entry) throughHOS_FS_OVERLAY, Market then Hyrule Castle: the log hasfs: Tex/Gradation_Ramp_05_Fi.bntx.zs is 33160 bytes, its size-table entry 29064: the game drops it (a damaged or mismatched dump?)exactly once. The oversized file stayed on this PC and was deleted after.Game-free checks:
tests/test_fs_size_check.pybuilds the actualhost/fs_sizes.c,host/zs.candhost/restbl.cwithzstd's decoder over a made-up RomFS. It covers the served table being read rather than the RomFS's own, the table read
once when opened twice, and a bigger
.zsfile named once with its stated size. A file that fits, one that isn'tlisted, a
.mcfile, one opened before the table and one on another mount aren't named. A file that isn't.zsisheld to a named entry by its own size. Of the listed
.zsfiles not found, the first 20 are named. Listed files thataren't
.zsand unlisted files aren't. A table that can't be read is reported.tests/test_builder_size_table.pycovers
nup.size_table_check: bigger files named, and damaged, size-less,.mcand unlisted files skipped. It alsocovers a table made with a ZsDic dictionary, two tables (the warning, each file against each), and
check_size_tables: named in the log, checked again when files or tables change, unreadable tables reported, and nothing written without a table. The two existing harnesses that compileOpenFile(
tests/test_vcore_fs_open.py,tests/test_damaged_rom_files.py) got stubs for the two new calls. No test was runon this PC (its rule: CI on the forge runs them). Both new tests fail on
main, where neither function exists.Still to test:
fs:warnings. This checks the table read with anOVERLAPPEDoffset on the game's handle (@Beanstalk start the game and play a minute in Kokiri Forest; the log musthave no line containing "size-table entry" or "the size table lists it")
Measurements
The game-side check adds no file reads:
hos_fs_sizes_readkeeps the bytes of a.zsfile's first 18 that the gameitself reads, in whatever parts and order, and checks the stated size once they're held from byte 0. The game reads the table once, when it opens it (about 220,000 entries, about 1.7 MB kept). After
that, checks use a CRC-32 lookup (a binary search, plus 10 named entries). For
.zsfiles, the check uses header bytesfrom the game's reads. The builder does one 18-byte header read for each listed
.zsfile (about 186,000) on each build, with nomarker. Still to measure: a clean build's time against main's, cold and warm, and loading in play, before this
leaves WIP. The Linux runs in Tested were on the earlier head (an extra read per open); they're redone with those.
Risks
.zsfile that normal play asks for and that isn't there on a good dump would log up to 20 false lines. TheCastle Town trace had none; the memtour above checks Kokiri Forest and the areas it visits.
OpenFilereturns; the read is positional, so the game's reads aren't affected. Compressed file checks use the game's reads..longshot_sizes_checkednote is removed on the next check.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (no tests run on this PC; CI runs them)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here. (fails onmain: neither function exists; passinghere is up to CI)
tests/that reads changed source is updated, not weakened.build is to run)
Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Tested in game: Linux, RTX 3090, NVIDIA 620.70.06, through the job queue: memory tour Market/Hyrule Castle/Field/Kokiri, in play, clean quit, no new fs: lines; with one oversized listed texture through HOS_FS_OVERLAY the 'is N bytes, its size-table entry M' line appeared exactly once. Pack 106 s. Windows ReadFile path needs the Test Farm.
Possibly related, for context:
@rebase
I rebased this pull request onto
main(8dce60edcd): the new head isdf0971b3d2.Conflicts resolved
tests/test_damaged_rom_files.py,tests/test_fs_save_commit.pyNothing was built or run: read the resolution before merging.
Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
635af08102df0971b3d2Recommendation: Request changes. The new diagnostics can fail on supported Windows paths, miss changed or unreadable files, and stop a build on a damaged dictionary archive. They can also report files against a table the game does not use.
The change names oversized and missing resources in the game and scans the RomFS during builds. The Linux game run demonstrates one oversized-file warning, but the added scan and runtime checks have correctness and measurement gaps.
@fixwill do (11)host/fs_sizes.c:59: The table is reopened through hos_zs_read's narrow fopen, although OpenFile successfully opened it with UTF-8 to wide conversion and extended-length paths. (more on the line)host/fs_sizes.c:59: This new runtime caller can enter hos_zs_decode concurrently with the mod or prompt readers. (more on the line)nx2/nup.py:797: The dictionary archive parser unpacks SFAT nodes without checking that the node array is present. (more on the line)nx2/make_game.py:793: The clean-check marker tracks the folder and tables but not the files checked. (more on the line)nx2/nup.py:845: Unreadable or invalid tables are silently discarded, after which an empty result is treated as a clean scan and cached. (more on the line)nx2/make_game.py:801: The scan compares each file with every table but this message says the game drops every reported file. (more on the line)host/fs_sizes.c:119: The limit counts failed opens rather than distinct missing paths. (more on the line)host/fs_sizes.c:95: restbl_key silently truncates paths to this 512-byte buffer, while guest paths can be longer. (more on the line)tests/test_fs_size_check.py:29: The suite forces gcc and skips Windows, so a Linux setup with only Clang or an explicit CC fails or tests the wrong compiler, and the Windows implementation has no game-free coverage. (more on the line)host/nn_fs.c:1174: Avoid or batch the extra per-open read, or move table initialization off the first-use path.nx2/make_game.py:799: Combine the size check with the existing damaged-file scan to avoid a second traversal and set of opens.Before merging: testing (3) (runs on the systems it can change; it doesn't hold the recommendation)
host/nn_fs.c:1174: Measure loading and frame pacing against the base on representative Windows and Linux systems, including Steam Deck: every listed compressed open now adds a read, and table initialization adds work on first use. (more on the line)nx2/make_game.py:799: Compare clean build times against the base on representative storage, including a cold scan: the new pass opens approximately 186,000 files, but the reported 106-second pack is not a comparable clean build. (more on the line)host/fs_sizes.c:80: Run the game on Windows with a clean dump and an oversized listed resource to verify the real synchronous handle read and warning; the only reported game run is Linux. (more on the line)Checks: Still running:
PR description / Description follows the template (pull_request_target).More: does it help, other systems, switches, what was read
Does it help: Unproven overall. The reported Linux run produced the expected warning exactly once for one oversized texture, but the missing-file and builder paths have no reported passing run on this head. The claimed costs have no before-and-after timings.
Other systems: The hook runs on content file opens on Windows and Linux, including mod and overlay paths; the builder scans both unpacked and in-place RomFS folders. Windows handle and path behavior, concurrent dictionary initialization, build time, and loading or frame-pacing costs remain insufficiently verified.
Switches: None added, changed, or removed.
Reviewed:
df0971b3d2against8dce60edcd: Read AGENTS.md, CONTRIBUTING.md, the PR template, standards, the complete diff, the new host checker, its table parser and decoder, the changed builder functions and new tests, and the OpenFile and platform file-handling code around the hook. Rechecked every changed file's diff. Skimmed surrounding build orchestration and existing test harnesses. docs/review-checklist.md and the adjacent Tooling checkout were absent; the full unchanged portions of the large changed files were not read.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no builds, scripts, or tests were run. The author reports a Linux game tour and one oversized overlay warning; Windows remains untested.
Overlaps and merge order: Not checked; the network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.
@ -0,0 +56,4 @@for (char *p = path; *p; p++) if (*p == '\\') *p = '/'; /* (OpenFile's paths have '\', which fopen on Linux does not take) */#endifsize_t n = 0;uint8_t *raw = hos_zs_read(path, &n, 64u << 20);L1: The table is reopened through hos_zs_read's narrow fopen, although OpenFile successfully opened it with UTF-8 to wide conversion and extended-length paths. On Windows, a game folder containing characters outside the active code page or a long path can therefore disable all size diagnostics. Decode the already opened handle, and use the same UTF-8 and long-path handling for dictionary reads.
L2: This new runtime caller can enter hos_zs_decode concurrently with the mod or prompt readers. In host/zs.c, the first thread sets the once flag before read_dicts writes ndicts and dicts; another thread reads those plain values without waiting, causing a data race and potentially failing to decode a valid dictionary-compressed table. Make dictionary initialization wait for completion and publish the finished data safely to every caller.
@ -0,0 +77,4 @@uint8_t head[18];OVERLAPPED ov = {0}; /* (at 0, whatever the handle's position: reads are positional) */DWORD got = 0;if (!ReadFile(h, head, sizeof head, &got, &ov) || !got) return 0;L12 (minor): Run the game on Windows with a clean dump and an oversized listed resource to verify the real synchronous handle read and warning; the only reported game run is Linux.
@ -0,0 +92,4 @@}if (!table_read() || ends_with(rel, ".mc")) return; /* (.mc: another compression, whose size its start does not say) */char key[512];uint32_t entry;L8 (minor): restbl_key silently truncates paths to this 512-byte buffer, while guest paths can be longer. A long listed path can be missed or matched against a different truncated key, producing an incorrect warning. Size the buffer for the supported guest path or reject truncation explicitly.
@ -0,0 +116,4 @@uint32_t entry;if (!rel || !table_read() ||!ends_with(rel, ".zs") || !restbl_get(table, restbl_key(rel, key, sizeof key), &entry))return;const LONG n = InterlockedIncrement(&missing);L7 (minor): The limit counts failed opens rather than distinct missing paths. If the same listed missing resource is requested 20 times, it consumes the entire allowance and a different missing file responsible for a later crash is never named. Deduplicate missing paths before consuming the limit.
@ -1170,0 +1171,4 @@the log (fs_sizes.c): the game drops it. Before the core is back, as the open: it reads the file's first 18 bytes */{ void hos_fs_sizes_opened(const char *guest, const char *host, HANDLE h); /* fs_sizes.c */void hos_fs_sizes_missing(const char *guest);if (!want_write && h != INVALID_HANDLE_VALUE) hos_fs_sizes_opened(g, path, h);L10 (minor): Measure loading and frame pacing against the base on representative Windows and Linux systems, including Steam Deck: every listed compressed open now adds a read, and table initialization adds work on first use. The reported game tour establishes behavior but provides no comparison of these costs.
@ -768,0 +790,4 @@key.append("%s %d %d" % (name, st.st_size, st.st_mtime_ns))key = "\n".join(key) + "\n"if os.path.isfile(marker) and read_stamp(marker) == key:returnL4: The clean-check marker tracks the folder and tables but not the files checked. If an in-place RomFS file is later replaced with an oversized version while the table remains unchanged, the next build skips the scan and gives no warning. Invalidate the marker when checked files change, or rescan mutable RomFS folders.
@ -768,0 +796,4 @@print("Your game files have %d resource size tables (%s): the game reads only its own version's. Game files of another ""version unpacked over these (a base dump and an update) can be bigger than the game allows, and the game then stops ""when it needs one." % (len(tables), ", ".join(tables)), flush=True)_, bigger = nup.size_table_check(romfs, file_progress("checked"))L11 (minor): Compare clean build times against the base on representative storage, including a cold scan: the new pass opens approximately 186,000 files, but the reported 106-second pack is not a comparable clean build.
@ -768,0 +798,4 @@"when it needs one." % (len(tables), ", ".join(tables)), flush=True)_, bigger = nup.size_table_check(romfs, file_progress("checked"))if bigger:print("%d game file%s bigger than %s entr%s in the game's resource size table: the game leaves %s out, and stops when it "L6: The scan compares each file with every table but this message says the game drops every reported file. With an old base table and the current update table, a file can exceed the old entry while fitting the table the game actually opens, leading players to redump a valid installation. Select the game's active table for definitive warnings, or clearly label comparisons against other tables as inconclusive.
@ -767,0 +794,4 @@return {}size, count = struct.unpack_from("<HH", p, head + 4)found = {}for i in range(count):L3: The dictionary archive parser unpacks SFAT nodes without checking that the node array is present. A valid zstd frame containing a truncated SARC with an SFAT header and nonzero node count raises struct.error and aborts the build, although this check is meant to be a warning. Validate the header, node and data bounds and handle malformed dictionaries without stopping the build.
@ -767,0 +842,4 @@return [], []dictionaries = zs_dictionaries(romfs)read = [(name, read_size_table(os.path.join(romfs, *SIZE_TABLES, name), dictionaries)) for name in tables]read = [(name, t) for name, t in read if t]L5: Unreadable or invalid tables are silently discarded, after which an empty result is treated as a clean scan and cached. For example, a table needing a missing dictionary produces no file warnings and writes the success marker. Report the failed table and do not cache the scan as clean unless every intended table was read.
@ -0,0 +26,4 @@import zlibfrom pathlib import PathRUN_ALL_ARGS = ["--cc", "gcc"]L9: The suite forces gcc and skips Windows, so a Linux setup with only Clang or an explicit CC fails or tests the wrong compiler, and the Windows implementation has no game-free coverage. Use the runner's {cc} and provide a Windows fixture that exercises the real handle and path behavior.
@fix
df0971b3d2a4dfda1822Recommendation: Approve. The code is ready: only testing is left. The Linux run shows the oversized-resource warning working, but the runtime and builder costs remain unmeasured, and the Windows path has not been verified in game. Recommend approval; not approved on the forge.
What
@fixchangedI changed this pull request: the new head is
a4dfda1822. I rebased it ontomain(a2dc538590). I edited its description to match the change.Changed
Changed in part (the rest is for the author)
Not done
Nothing was built or run: the checks run again on the new head.
The change names missing and oversized game resources to make crashes easier to diagnose. It adds table initialization and file-checking work at runtime, plus a scan of the RomFS during builds.
Before merging: testing (3) (runs on the systems it can change; it doesn't hold the recommendation)
host/nn_fs.c:1174: Measure loading and frame pacing against the base on representative Windows and Linux systems, including Steam Deck: every listed compressed open now adds a read, and table initialization adds work on first use. The reported game tour establishes behavior but provides no comparison of these costs.nx2/make_game.py:799: Compare clean build times against the base on representative storage, including a cold scan: the new pass opens approximately 186,000 files, but the reported 106-second pack is not a comparable clean build.host/fs_sizes.c:80: Run the game on Windows with a clean dump and an oversized listed resource to verify the real synchronous handle read and warning; the only reported game run is Linux.Checks: they run again on this head (
Guide screenshots / Guide images and local UI source review (pull_request),CI / Website build and checks (pull_request)failed on the last one); a failure shows on the pull request.Also noticed (2; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven overall. The reported Linux run found one injected oversized texture and logged it exactly once; a clean tour produced no new warnings. Comparable runtime and clean-build cost measurements are missing.
Other systems: The runtime check affects Windows and Linux file reads, including Steam Deck; the builder scan affects storage on both platforms. Linux gameplay was reported, but Windows behavior and comparative costs remain unverified.
Switches: None added, changed or removed.
Reviewed:
a4dfda1822againsta2dc538590: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, host/fs_sizes.c and host/zs.c; inspected the relevant portions of host/nn_fs.c, nx2/nup.py and nx2/make_game.py and the main code diff. The remaining changed files and tests were not read in full.; nothing run (a code review).Checked and fine:
Testing: No tests were run during this read-only review. CI has not yet run on this head; the reported Windows game run and comparative measurements remain outstanding.
Overlaps and merge order: none found
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
Read of
a4dfda18(onmain's head, WIP; game-free checks only, no game run from me). The gate, the host comparison and the not-found path hold up. One builder test fails on this head, and the cause is a real gap in the check.1.
tests/test_builder_size_table.pyfails ona4dfda18: the builder skips any.zsframe shorter than 18 bytes.nx2/nup.py:44(frame_content_size) returnsNoneforlen(head) < 18, but the test'szs(bytes(90))is a 17-byte frame (single-segment, one-byte FCS at offset 5), andsize_table_checkreads exactly 18 bytes (nup.py:879) and treatsNoneas "states no size". So a listed.zswhose whole frame is 17 bytes or less is never checked, and the test's 90-vs-50 case is silently skipped. The comparison itself is fine (size > entry); the gate is the off-by-one. A file under 18 bytes read whole is a complete frame, not a truncated header: requiring only the bytes the header uses (len(head) >= 5andat + n <= len(head)) instead of>= 18makes all six tests pass here (I tried that two-line change in a scratch checkout; nothing pushed). If the helper's< 18must stay for its two other callers (nup.py:302,733), the new caller needs its own parse. The host is not affected:stated_sizeasks zstd'sZSTD_getFrameContentSizefor the game's read, so the game would name exactly the file the builder misses.CI will not catch this on the PR:
.forgejo/workflows/ci.ymlrunsPython source checksonly onworkflow_dispatch(if: github.event_name == 'workflow_dispatch'), and the run fora4dfda18shows them skipped. The body's "passing here is up to CI" needs a localmise run test, or at least these two files.2. The not-found path is right; two small wording nits.
hos_fs_sizes_missing(fs_sizes.c:130) runs before the existingR_PATH_NOT_FOUNDreturn (nn_fs.c:1176), so the error code is unchanged: only read-only opens, only listed.zs, distinct by key, capped at 20. (a) AnyCreateFileAfailure is logged as "not found", including a sharing violation or access denied, where the file is there; the old line with those words was trace-only, this one is a WARN. (b) With exactly 20 distinct missing files, the 20th still says "(more are not named)" and there are none more.3. No off-by-one or overflow in either comparison.
Host:
size <= entry(fs_sizes.c:101) is "a file exactly the entry's size fits";sizeisuint64_tandentryuint32_t; a frame that states no size (error/unknown) and a zero-length non-.zsbecome 0, so they don't fire;.mcis out.restbl_parsevalidates the exact table length in 64-bit arithmetic (restbl.c:49), so a malformed table is rejected rather than misread. The builder'ssize > entrymatches. The test's ownframe()and zstandard 0.25.0 (the pinned version) agree on the 90-byte case.4. Behavior for valid files: no change I can find.
The table is read once from the handle
OpenFilealready opened, at open time, at offset 0; every game read goes throughread_atwith its ownOVERLAPPEDoffset, so the handle's position cannot matter, and only warnings are added. The new read hook (nn_fs.c:1279-1292) takeshandle_lockfor the head and never the save lock for acontent:handle;content_relrejectssave:and other mounts, so #607's save staging and #2154's delete path are untouched — no textual or lock interaction, and #2154'stest_fs_delete_dir.pydoes not collide with this PR's tests. Thezs.cdictionary lock (it replaces theonceCAS, and setsdicts_readafter a read that can fail) and the long-path_wfopenare fixes, not changes for ordinary paths.test_fs_size_check.py,test_vcore_fs_open.pyandtest_damaged_rom_files.pypass here. (test_fs_save_commit.pydoes not compile on this machine on main either —hos.h'smemset/memcpywithout<string.h>with this GCC — so I could not use it; not this PR's doing.)5. Test gap: the
read_athead assembly is covered only in-game.tests/test_fs_size_check.pycallshos_fs_sizes_opened/hos_fs_sizes_readitself over the realfs_sizes.c/zs.c/restbl.c, and the other harnesses stub those calls, sonn_fs.c's newsize_head/size_head_maskcode — partial reads,off < 18, the contiguous-prefix loop — has no game-free test. It reads right to me (bytes atsize_head + off, mask, prefix until a gap), but it is the most intricate new host code and the body's Linux run only exercises the one-shot 18-byte read. A fixture driving the realread_atwith two reads (10 + 8) would settle it.6. Build cost. With the marker removed, every build re-walks the RomFS and opens about 186,000
.zsfiles; the 106 s pack is not a clean build, and the Measurements has no before/after. The earlier review asked and the head answered with the cost, not a number; one cold build time on a slow disk would let the PR say "about N s".The "fails on
main" claim is true only in the trivial sense the body gives (neither function exists there); the meaningful half — passing here — is what the builder test does not do yet. No approval and no claim; the Windows game run in Still to test is the hardware box I cannot settle.a4dfda1822491eb6b8d8Thanks, all six read and acted on; new head
491eb6b8(two commits, test9832521dand fix; BeanBot'sa4dfda18folded into the fix). Code only, nothing run yet.frame_content_size(nx2/nup.py:42) now needs only the bytes the frame's descriptor uses (len(head) >= 5,at + n <= len(head)), so a whole file under 18 bytes is checked.is_packedandstill_in_nup_frameare fine with it (a short head there is a complete header too). Newtest_a_file_shorter_than_a_header_read; the 90-vs-50 build case is covered by it.nn_fs.ctakesGetLastError()afterCreateFileA; only ERROR_FILE_NOT_FOUND / ERROR_PATH_NOT_FOUND (ENOENT / ENOTDIR through host/posix) callhos_fs_sizes_missing; the trace line says "could not be opened (error N)" otherwise. The game still getsR_PATH_NOT_FOUND. (b) The 20th line has no suffix; a 21st distinct missing file logsfs: more files the size table lists are not found: only the first 20 are named, once. Tests cover exactly 20 (no line) and more.hos_fs_sizes_readinhost/fs_sizes.c;read_atis one call. The fixture drives the real code with split, out-of-order and gapped reads (10+8, 6+12 then 0+6, a gap filled last, a byte never read, a repeat, reads past 18 only) and a 15-byte whole file.--romfs/--romfs-in-place. So the per-build cost is the size check's own walk. I'll time a clean build, cold and warm, against main and put the numbers in Measurements; if it's noticeable, the fix is a once-per-unpack marker for builder-unpacked RomFS keyed on the unpack stamp and the tables' size and mtime.The Linux game runs will be redone on this head, with the Windows run through the Test Farm.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.