startup-runtime: package opens fail when the console drive letter is another volume #1158
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows#1158
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?
@rasptum on GitHub · 2026-11-24 02:04 UTC · original
Problem
A console executable opens its package at a fixed drive letter.
tools/startup/run.ps1only sets the working directory (-DataDir), so the run works when the package sits at that drive's root and fails when the letter is another volume on the PC (or does not exist).Measured on #1135 at
e658fe24, Windows 10 22H2 (19045.6466), with the package in a folder on another drive: the first package open at the fixed letter returns "not found", no archive is mounted, and the run stops after 0.51 s on an access violation in a C runtime fill called by the executable (a table sized from data that was never loaded).substcannot help when the letter is already a real volume.Proposal
A launcher option (
--map-drive G=<folder>[;S=<folder>],-MapDriveinrun.ps1) that rewrites the path of file opens on those letters in the debugger's existing file hook. With it the same run mounts the package (185 opens redirected in 75 s) and the persistent-storage root can be a mapped letter too, asruntime_proxy.cppexpects.Done when
The option exists, is documented in
docs/startup-runtime.md, and a source-built consumer opens a file through a mapped letter under the launcher (plus a negative control without the option).Context:
docs/startup-runtime.md(#1135). Do not attach game files, dumps or logs that contain addresses or names from an executable; describe results in terms of the component tested.AI-assisted (Claude Code).
@rasptum on GitHub · 2026-11-24 02:04 UTC · original
Claiming this. I have the launcher option working locally (path rewrite in the debugger's file hook,
-MapDriveinrun.ps1); what is left is the source-built consumer check, the negative control and the doc row. Will open it against the #1135 branch or after it merges.AI-assisted (Claude Code).
@triggered02 on GitHub · 2026-11-24 05:32 UTC · original
Implemented as PR #1251.
Shape: debug_launch.py --map-drive LETTER=FOLDER[;...], exposed as
un.ps1 -MapDrive. The rewrite happens inside the file hooks the launcher already installs, so it works whether or not the letter exists, and a real volume on that letter is untouched.
Two details the proposal did not cover that the implementation had to:
Covered by startup_map_drive with a source-built consumer: the rewrite makes an open on a letter that is not a volume succeed and read its content (trace shows the MAP line), the same open fails without the option, and an open on a letter that is not mapped is left alone. Documented in docs/startup-runtime.md under the run instructions, including the limit that only opens passing through the installed hooks are rewritten.
@rasptum on GitHub · 2026-11-24 06:16 UTC · original
Releasing my claim: #1251 implements this.
My local version (a path rewrite in the launcher's file hook, plus
-MapDriveinrun.ps1) has the same shape, so I won't open a competing PR. It has been in daily use for the runs reported on #1150 and #870, withG,D,SandTmapped to folders.AI-assisted (Claude Code).