GPU diagnostics: VICTORY_CAPTURE saves nothing when its folder doesn't exist yet (fix on a branch) #792
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#792
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?
@JFIREonFIRE on GitHub · 2026-11-24 11:01 UTC · original
AI-assisted (Claude Code). Tested on my own machine.
Pull requests are collaborator-only, so I'm offering this as a branch. A collaborator is welcome to open a PR from it:
https://github.com/JFIREonFIRE/VIctory/tree/fix/capture-creates-folder (one commit,
1e82209onmainffe310e,capture.rsonly)The problem
VICTORY_CAPTUREmust name a folder that already exists. If it doesn't, every frame fails withframe not saved ... The system cannot find the path specified. (os error 3)and the run saves nothing.VICTORY_DUMP_TARGETSwrites into the same folder, so it is affected too.The change
The folder and any missing parents are created when capturing starts. If that fails, a
capture folder not madewarning is logged.Tested
a_missing_capture_folder_is_made.cargo test --workspace --lockedpasses (342).cargo xtask policypasses.VICTORY_CAPTUREset to a nested folder that didn't exist:frame not saved.No game data in the change.
@nopsled0x on GitHub · 2026-11-24 14:58 UTC · original
I checked
fix/capture-creates-folder(1e82209, on top offfe310e) on Windows 10, debug build:cargo test -p victory-gpu --locked --features diagnostics -- capture: 3 passed, 0 failed, includingcapture::tests::a_missing_capture_folder_is_made. Thecapturemodule is only compiled with--features diagnostics, so the test does not run without it.cargo clippy -p victory-gpu --all-targets --locked -- -D warnings, with and without--features diagnostics: clean.maderuns inside theOnceLockinitializer, so thecapture folder not madewarning is logged at most once per process. If the folder cannot be created, the path is still returned, as before, so only the warning is new.VICTORY_DUMP_TARGETStakes its folder from the samefolder(), so it gets the same fix.VICTORY_CAPTURElogs nothing, becausecreate_dir_all("")returnsOk. A relative path is resolved against the game process's working directory.Not verified:
cargo test --workspace,cargo xtask policy,rustfmt, workspace-wide clippy, the capture end to end on a real run (the 10 saved frames in the description), orVICTORY_DUMP_TARGETSin practice.AI-assisted verification (Claude); tests were run locally by me.
@jamesn-xt on GitHub · 2026-11-24 16:13 UTC · original
Independently reproduced this on Windows 11 / RTX 4080: a nonexistent capture directory lost all requested PNGs. After a local directory-creation change and diagnostics rebuild, a previously nonexistent directory was created and frames were saved in a bounded WARP run.
I submitted the minimal alternative as #1146. Its description credits this issue and the existing JFIREonFIRE branch; please prefer whichever implementation fits. This does not claim to fix title rendering. Validation: workspace 342 passed / 6 ignored; diagnostics GPU tests 53 passed / 1 ignored; both workspace CI Clippy configurations and the asset-policy check passed. No retail logs or captures attached.
@Marvisak on GitHub · 2026-11-25 03:53 UTC · original
Automated triage for the maintainers. Fixed in
mainby #1146 ("GPU diagnostics: create missing capture output directories"), which credits this issue. The frame writer incrates/victory-gpu/src/capture.rsnow callscreate_dir_allon the capture folder before it writes each PNG. Proposed for closing as fixed inmain. It will be closed in 48 hours unless the reporter replies or a maintainer removes the label.Generated by Claude Code