Loader: a title DLL that fails to prepare is named in the error #285
No reviewers
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!285
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/285/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?
@Dufftwt on GitHub · 2026-11-24 02:02 UTC · original
Dufftwt:fix/name-title-dll-that-fails-to-prepare→main· +18 −2 · 2 files · 1 commits · merged 2026-11-24 07:59 UTCWhat's wrong
map_dllinwindows.rsbrings each of the title's DLLs in three steps:Reading and loading add the DLL's path to their errors. Preparing doesn't. When the PE parser or the patcher refuses a DLL, the run ends with an error that doesn't say which file it was, for example:
A title has several DLLs besides the exe (Grand Theft Auto VI has four), and through
LateDllsthe failure is reported under whichever DLL the title asked for, which may not be the dependency that actually failed. A reporter can't tell which file is the problem.What the fix does
The prepare step gets the same context as its neighbours:
preparing <path>.How it behaves after the fix
Nothing changes for DLLs that load.
Tests
The new integration test
tests/title_dlls.rswrites a file namedbroken.dllthat isn't a PE (MZ not a PE) into a temporary title folder. It then checks thatload_title_dllfails with an error namingbroken.dll.I ran
cargo test --workspaceon GitHub'swindows-latestwith Rust 1.98.1 fromrust-toolchain.toml:main: it fails because the error is onlymalformed image: Could not read file magic, with no file name.--test-threads=1. With 4 threads, the shader crate's GPU tests sometimes crash on that runner (#181, #244).Not tested: a real title DLL that fails to prepare.
@jeremygold02 on GitHub · 2026-11-24 04:16 UTC · original
Tested PR #285 at head
5f29f3ae5a92eef900c77cfa0dc824cc4b812e09(state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged at5f29f3ae5a92eef900c77cfa0dc824cc4b812e09.cargo test --locked -p victory-loader --test title_dlls a_title_dll_that_does_not_prepare_is_named— passed (ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s ); cases: a_title_dll_that_does_not_prepare_is_named.Behavior covered: Checks a title DLL preparation failure reports the offending DLL name through the loader integration test.
Code: crates/victory-loader/src/windows.rs, crates/victory-loader/tests/title_dlls.rs