run: stop with a clear message when the title's own DLLs are missing #1610

Merged
AgneyaK merged 1 commit from upstream-pr/1611 into main 2026-11-25 00:09:38 +00:00
AgneyaK commented 2026-11-24 19:45:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by AgneyaK on 2026-11-24T19:45:13Z.


A package copied without the DLLs that ship beside the executable leaves every import from them unbound, and the title stops at its first call into one: Grand Theft Auto VI 1.0.2.1 at +0x2237178 during System Init (#930, #1553, and one of the causes in #8), with nothing saying why. #12 covers the other known cause of that stop (a missing appdata0.rpf).

Change (apps/victory/src/run.rs, +81)

  • After the title DLLs are mapped, absent_title_dlls names the main image's static imports that must come from the title's folder (title_dll: neither the host policy nor our runtime serves them) but were not mapped from it. Each is named once, case ignored.
  • The list is printed (missing dlls …). When executing with the default trap policy, run stops before any title code with:
    Error: the title's own DLLs are missing: XboxBvhBuilder.dll, amd_fidelityfx_loader_xbox.dll, libHttpClient.GDK.dll, Bink2Scarlett.dll not in <dir>, and neither the host nor VIctory provides them: the package is incomplete; copy every file of the package next to the executable (`--unimplemented zero` runs it anyway)
    
  • With --unimplemented zero the title still runs: stubs were asked for.
  • Two unit tests for the helper.

Tested (Windows 11 26300, retail 1.0.2.1 executable, release build)

case result
folder with only game_scarlett_master.exe, no --execute prints the four DLLs, exit 0
same, --execute the error above, exit 1, no title code run
same, --execute --unimplemented zero prints them and starts the title (which then stops, as before)
complete package, no --execute no message; 88 hle, 427 host, 72 title, 0 missing as on main

cargo clippy --workspace --all-targets --locked -- -D warnings and the --all-features run are clean. cargo test -p victory -p victory-loader passes, cargo xtask policy passes (154 files), and rustfmt --check is clean on the file.

No game data. AI use: Claude Code (Claude Opus 5.5) wrote the change and tests, ran the checks and the title, and drafted this description.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6590008295 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1611). Originally posted by [AgneyaK](https://github.com/AgneyaK) on 2026-11-24T19:45:13Z. --- A package copied without the DLLs that ship beside the executable leaves every import from them unbound, and the title stops at its first call into one: Grand Theft Auto VI 1.0.2.1 at `+0x2237178` during System Init (#930, #1553, and one of the causes in #8), with nothing saying why. #12 covers the other known cause of that stop (a missing `appdata0.rpf`). ## Change (`apps/victory/src/run.rs`, +81) - After the title DLLs are mapped, `absent_title_dlls` names the main image's static imports that must come from the title's folder (`title_dll`: neither the host policy nor our runtime serves them) but were not mapped from it. Each is named once, case ignored. - The list is printed (`missing dlls …`). When executing with the default trap policy, `run` stops before any title code with: ``` Error: the title's own DLLs are missing: XboxBvhBuilder.dll, amd_fidelityfx_loader_xbox.dll, libHttpClient.GDK.dll, Bink2Scarlett.dll not in <dir>, and neither the host nor VIctory provides them: the package is incomplete; copy every file of the package next to the executable (`--unimplemented zero` runs it anyway) ``` - With `--unimplemented zero` the title still runs: stubs were asked for. - Two unit tests for the helper. ## Tested (Windows 11 26300, retail 1.0.2.1 executable, release build) | case | result | |---|---| | folder with only `game_scarlett_master.exe`, no `--execute` | prints the four DLLs, exit 0 | | same, `--execute` | the error above, exit 1, no title code run | | same, `--execute --unimplemented zero` | prints them and starts the title (which then stops, as before) | | complete package, no `--execute` | no message; `88 hle, 427 host, 72 title, 0 missing` as on `main` | `cargo clippy --workspace --all-targets --locked -- -D warnings` and the `--all-features` run are clean. `cargo test -p victory -p victory-loader` passes, `cargo xtask policy` passes (154 files), and `rustfmt --check` is clean on the file. No game data. AI use: Claude Code (Claude Opus 5.5) wrote the change and tests, ran the checks and the title, and drafted this description.
DenRakEiw commented 2026-11-24 20:02:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T19:56:50Z.

Review: APPROVED


Verified locally merged onto origin/main (Windows 11 x64, Rust 1.98.1 MSVC):

  • cargo test -p victory — 3 passed, 0 failed (including title_dlls_missing_from_the_folder_are_named_once and a_complete_package_has_nothing_absent)
  • cargo clippy -p victory --all-targets — 0 warnings
  • cargo xtask policy — ok

Clean preflight check for missing title DLLs with clear deduplicated error messaging and unit test coverage. Looks good.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6046367594 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1611#pullrequestreview-6046367594). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-24T19:56:50Z. **Review:** APPROVED --- Verified locally merged onto `origin/main` (Windows 11 x64, Rust 1.98.1 MSVC): - `cargo test -p victory` — 3 passed, 0 failed (including `title_dlls_missing_from_the_folder_are_named_once` and `a_complete_package_has_nothing_absent`) - `cargo clippy -p victory --all-targets` — 0 warnings - `cargo xtask policy` — ok Clean preflight check for missing title DLLs with clear deduplicated error messaging and unit test coverage. Looks good. AI-assisted (Gemini 4 Neon).
catminou4 commented 2026-11-24 21:02:48 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T20:06:18Z.

Review: COMMENTED


Static review only: victory-gpu/victory-hle/apps are Windows-only (D3D12/windows_sys), so nothing here compiles or runs on macOS — please rely on the Windows CI leg.

When the title's own DLLs are missing, run now names them once (case-insensitive, deduped) and — only with --execute and the default trap policy — bails with a clear message instead of letting the title die at its first call into a missing DLL (#930). --unimplemented zero still runs. The absent_title_dlls helper is #[cfg(any(windows, test))] with two unit tests, but apps/victory is Windows-only so they can't run on macOS. Logic is sound: wanted excludes host/runtime-provided DLLs, mapped comes from the loader, static imports only.

<!-- greyfinch-sync:Marvisak/VIctory:review:6046506928 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1611#pullrequestreview-6046506928). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T20:06:18Z. **Review:** COMMENTED --- Static review only: victory-gpu/victory-hle/apps are Windows-only (D3D12/windows_sys), so nothing here compiles or runs on macOS — please rely on the Windows CI leg. When the title's own DLLs are missing, `run` now names them once (case-insensitive, deduped) and — only with `--execute` and the default trap policy — bails with a clear message instead of letting the title die at its first call into a missing DLL (#930). `--unimplemented zero` still runs. The `absent_title_dlls` helper is `#[cfg(any(windows, test))]` with two unit tests, but `apps/victory` is Windows-only so they can't run on macOS. Logic is sound: `wanted` excludes host/runtime-provided DLLs, `mapped` comes from the loader, static imports only.
upstream-sync closed this pull request 2026-11-25 01:06:56 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!1610
No description provided.