VICTORY_RECORD: the title aborts about 30 s into a capture (+0x2215c35, write 0x0), so the capture is never completed #441
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/lobomfz--VIctory-xmem#441
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?
@abomalocaris on GitHub · 2026-12-04 04:14 UTC · original
With
VICTORY_RECORD=<folder>and agofile as the trigger, onmainat842767awith #216, #262 and #274 merged (diagnostics build), the capture starts and the title stops about 31 seconds later:present.binis left at 0 bytes. The thread starts inkernel32and goes straight to that site, so it looks like the title's own watchdog giving up on a frame that stands still: writing "what the CPU changed" took 266 s here (23.5 GB of 28 GB).A local workaround that let the capture finish: in the vectored handler in
crates/victory-loader/src/crash.rs, when an access violation is a write to address 0 at a chosen offset of the title's image (I passed23cf683in an environment variable), the thread sleeps for good instead of the exception being passed on. With that the capture completed and the title carried on afterwards:I can open a PR with that as an opt-in diagnostics switch if it is wanted in this form; a cleaner fix may be to keep the title's clock or that thread still while a capture runs. Separately: is 23.5 GB of CPU-side changes for one frame expected with
VICTORY_PAGES=0? At that size the capture cannot be replayed on a 32 GB machine.Setup: RX 9070 XT 16 GB, Ryzen 7 9800X3D, 32 GB RAM, CachyOS, Series X profile, 2560x1440 with FSR 4 quality,
VICTORY_PAGES=0.Written with AI assistance (Claude Code); the runs and observations are from my own machine.
@Widget9337 on GitHub · 2026-12-04 15:31 UTC · original
Same here, and your workaround works. RX 9070 XT 16 GB, Ryzen 9 7950X3D, 64 GB RAM, CachyOS (kernel 7.2), this repo's Mesa and vkd3d-proton, Series X, 1080p with FSR 4 Balanced, ray tracing on, paging on (not
VICTORY_PAGES=0). Build:8585cd4with #216, #344 and #428 picked on top, diagnostics build.The abort. Two captures ended the same way, 31 s after the capture began: a write to 0 at
victory-image+0x23cf683, called from+0x2215c35. With your workaround as a local switch (VICTORY_PARK_FAULT=23cf683: in the vectored handler, a write to 0 at that offset of the title's image sleeps that thread for good), a third capture finished and the title carried on afterwards. A switch like that, off by default, would be useful upstream.A second way a capture dies. In one try the game ended 11 s in, and not from the title: VIctory's own hang watch crashed while dumping every thread's stack (read of 0 in
ntdll, fromcrash::unwind_into←stacks::frames_of←run::hang_watch). WithVICTORY_HANG_WATCH_S=0it didn't happen again. The hang watch could stay quiet while a capture runs.What the finished capture cost. Two frames, triggered at a flash:
The first frame wrote about 26.7 GB of changes and the second about 1.4 GB, but each took about 4¾ minutes, so reading is the limit, not writing: it ran at the same rate to a compressed btrfs drive and to a plain ext4 one.
Replaying it doesn't fit in 64 GB. I watched one with a guard that reads
MemAvailableevery 0.1 s and kills the replay under 12 GB:The guard killed it at 4.8 s, still in setup. The heaps were made in system memory through GTT, which filled to its limit (half of RAM by default) in about a second while VRAM never moved, and it was still taking about 6 GB a second beyond that. A warning for anyone trying this: before the guard, one uncontained replay ran the whole PC out of memory and the OOM killer took down the desktop session, and a second one inside a systemd scope with
MemoryMax=44Ghard locked the PC. The cap never fired, because GTT pages aren't charged to the cgroup.So to your question: 23.5 GB (here 26.8 GB) of CPU side changes for one frame looks like whole buffers of title memory, not what the frame reads. Recording only the pages a frame's commands touch, or letting the replay place those heaps on the card or read them from disk as needed, would probably be what makes a capture replayable on 32 or 64 GB.
One more thing that may help others: I had the pop watch start the recorder at the first frame with two or more blips, but the recorder only took the frame about 7 frames after the flash (judged one frame late, then three presents to arm), and the flash was over. A capture of a one frame flash may need the recorder kept armed so it can take the very next frame.