loader: VICTORY_PATCH_TRAP, to continue past the title's own int3 at +0x1330A44 #719
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!719
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/719/head"
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?
@Key-rs on GitHub · 2026-11-25 05:33 UTC · original
Key-rs:trap-bypass-switch→main· +34 −0 · 2 files · 1 commits · closed without mergingWhat
Adds
VICTORY_PATCH_TRAP=1, an opt-in switch that makes a run continue past the title's ownint3at+0x1330A44during world bootstrap, instead of ending the process with0x80000003.It is a switch rather than a new default: nothing changes unless the variable is set.
Why
On the machine in #535 the title always reaches that assertion about 20 s into boot, after the first-boot screens and before the world, and dies on it. Everything functional was excluded there — same address on MSVC and MinGW builds, cold and warm shader caches, hardware and WARP, the November servicing update removed (
10075→9807,d3d12core10068→9807), with and without a signed-in Xbox stack (Microsoft.GamingServices 39.118.30001.0installed during the investigation), with asettings.xmlwritten by another host and with a freshdata_dir, nocpuidand no AVX-512 anywhere in the trapping function or its callees, and the pipeline stream, view count and asset opens byte-identical to a host that gets through.What did work was ignoring the assertion. With the two jumps that lead into the
int3replaced by nops, the same build on the same host:No crash log, no device loss, sustained 30 fps, and the first frames the world produces are the same "texture picked by index changed after its upload" warnings a working host shows at that point.
So the assertion is a "this state should not be possible" check whose continuation is fine: the helper still runs and its result is still computed, only the branch into the
int3becomes a fall-through. Finding out which platform answer puts the host into that state is still open, and this switch is what makes the machine usable (and comparable to a working one) while that is investigated.How
load_title_imagecallspatch_trap(base)after the image is mapped and before any title code runs, whenVICTORY_PATCH_TRAPis set and the image is the executable (not one of the title's DLLs):+0x13309700f 84 ce 00 00 00(je +0x1330A44)90 × 6+0x1330A3474 14(shortjeto the otherint3)90 90Each site is un-protected with
VirtualProtect, written, and re-protected with the flags the mapping had; a site that cannot be unprotected logs a warning and is left alone. The RVAs are the ones the title's 1.0.2.1 build uses, which is the build the port is written against.README gets one row in the diagnostics table.
Verification
cargo build --release -p victoryon Windows 11 26300.9807, Rust 1.98.1 MSVC: clean.+0x1330A44as before.I can also send the two RVAs as a
VICTORY_WATCH-style table if you would rather have the switch express the sites as data (VICTORY_PATCH=<rva>:<bytes>,…, general-purpose) than as one named trap; say which shape you want and I will rework it.Refs #535.
@Key-rs on GitHub · 2026-11-25 05:39 UTC · original
Rebased onto
310c6eband re-verified on the current mainPushed a rebase so the branch sits on today's
mainrather thanc96b4f2. Re-ran both cases on the new base:So the assertion still fires on the current main on this host, and the bypass still carries a run into the world — your
310c6ebdid not change either side of that (the upload-queue work does show up in the counters, 576 textures uploaded with 7 waiting, and the flicker at the first-boot screens is reduced compared to the earlier builds).Fork
mainalso carries the commit now, so a checkout ofKey-rs/victory-forkbuilds with the switch available without picking a branch.No checks are reported on the branch (there is no workflow that runs for PRs from this fork), so nothing automated is pending on my side: the two sites, the README row and the build are all there, and
cargo clippy -p victory-loaderis clean. Ready for review whenever you get to it.@Key-rs on GitHub · 2026-11-25 12:51 UTC · original
Closing this: the premise was wrong, and I would rather not leave a switch that hides real problems.
The +0x1330A44 assert turned out to be correct: it fires because an asset record's type tag does not match the owner's cached copy, and on my machine that was because the dump was damaged — the last 3.24 GB of
avmeshes.rpf were zero-filled by an extraction that ran out of disk space (194 of its 401 torrent pieces hashed wrong, the file's size unchanged, which is why a size-based check passed).
With that one file rebuilt from a verified source and no switch at all (neither VICTORY_PATCH_TRAP nor VICTORY_TRAP_REPAIR), the same build runs:
30 s 30 fps menus 90 s 2 fps world 180 s 1 fps 9993 draws, still running 240 s no assert, no crash logSo the bypass was hiding a data-integrity report, not working around a false positive. Keeping it in the tree would make the next corrupted dump look like a port bug — which is exactly the trap I fell into for a day.
The analysis in #535 stays (the decoded comparison, the reproduction recipe, the stream-reader stack), and Marvisak/VIctory#2165 — the rebase of the generic VICTORY_TITLE_ASSERTS from #1156 — remains a legitimate diagnostic tool, though not a fix.
Thanks for taking it seriously enough to review it; sorry it turned out to be the wrong tool.
@Key-rs on GitHub · 2026-11-25 12:51 UTC · original
Closing for the reason above: the assert was reporting a damaged asset, not a false positive. #535 has the full write-up.
Pull request closed