Skip to content

fix(cli): use normalize_virtually for pipe path on windows#761

Merged
garyttierney merged 1 commit intogaryttierney:mainfrom
Sirius902:wine-fix
Apr 15, 2026
Merged

fix(cli): use normalize_virtually for pipe path on windows#761
garyttierney merged 1 commit intogaryttierney:mainfrom
Sirius902:wine-fix

Conversation

@Sirius902
Copy link
Copy Markdown
Contributor

Fixes reaching an unimplemented function in Wine when running the Windows binary of me3. I originally ran into this issue when trying to play the Windows version of Dark Souls III Archipelago v4.0.0 in my custom Wine prefix and it turns out it just needed a one line change to stop crashing on startup!

Here was the original log messages when it was crashing on startup.

 INFO launch: me3::commands::launch: monitor pipe created path="\\\\.\\pipe\\bxV-1I-6omPhnkynIMn2gw=="
 INFO launch: me3::commands::launch: created log file log_file_path="C:\\users\\steamuser\\AppData\\Local\\garyttierney\\me3\\data\\logs\\me3-config\\2026-04-15_02-27-41.log"
ERROR launch: me3::commands::launch: error=Invalid function. (os error 1)

garyttierney
garyttierney previously approved these changes Apr 15, 2026
Copy link
Copy Markdown
Owner

@garyttierney garyttierney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks. I'm surprised it was hitting an unimplemented stub. What version of WINE out of curiosity?

@garyttierney
Copy link
Copy Markdown
Owner

Hm, actually, looking closer at this normalize_virtually() is only supported on Windows, but if you're on Linux you're generally using the Linux executable. We can keep the normalize_virtually(), that's fine (we need to gate it behind a Windows-only cfg check though, see build failure), but it sounds like you want to be running the mod with the Linux build of the me3 CLI instead.

@Sirius902 Sirius902 changed the title fix(cli): use normalize_virtually for pipe path fix(cli): use normalize_virtually for pipe path on windows Apr 15, 2026
This use of `normalize` will end up calling an unimplemented function when run under Wine, resulting in a crash.

Signed-off-by: Sirius902 <10891979+Sirius902@users.noreply.github.com>
@Sirius902
Copy link
Copy Markdown
Contributor Author

Alrighty, I've updated the PR to fix the Linux build failure and the DCO CI check.

LGTM, thanks. I'm surprised it was hitting an unimplemented stub. What version of WINE out of curiosity?

I think this may be something to do with the fact that it's normalizing the path of a pipe specifically but I'm not sure. I'm using the soda-9.0-1 runner (based on Wine 9 with Valve's Proton patches and extras) in Bottles. Running the wine64 --version of this runner gives this specific version string.

wine-experimental.bleeding.edge.9.0.93696.20240429 ( TkG Plain )

Hm, actually, looking closer at this normalize_virtually() is only supported on Windows, but if you're on Linux you're generally using the Linux executable. We can keep the normalize_virtually(), that's fine (we need to gate it behind a Windows-only cfg check though, see build failure), but it sounds like you want to be running the mod with the Linux build of the me3 CLI instead.

For my current setup I had thought to use Bottles with networking disabled so I could be 100% confident my modded setups wouldn't attempt to connect to the game server. I share this setup for DSAP and Dark Souls II Archipelago as well so I naturally thought to run the Windows version of me3 under Wine as well. It seems me3 has a feature to prevent connecting online by default so maybe using the Linux binary could be interesting but one blocker is I'm running on NixOS so I don't think the me3 Linux binary would work out of the box.

I could try to make a Nix package for me3 and possibly upstream to nixpkgs if there's interest, though, I think it is worth supporting both use cases if possible without too much effort. For me right now running the Windows version of me3 in Wine is easier but I think making a Nix package might be worth exploring.

@Sirius902 Sirius902 requested a review from garyttierney April 15, 2026 18:47
@garyttierney
Copy link
Copy Markdown
Owner

Alrighty, I've updated the PR to fix the Linux build failure and the DCO CI check.

Thanks! LGTM. Waiting on CI then will merge.

I could try to make a Nix package for me3 and possibly upstream to nixpkgs if there's interest, though, I think it is worth supporting both use cases if possible without too much effort. For me right now running the Windows version of me3 in Wine is easier but I think making a Nix package might be worth exploring.

FWIW, me3 is in nixpkgs upstream as of about a week ago: NixOS/nixpkgs#498117.

@garyttierney garyttierney enabled auto-merge (squash) April 15, 2026 19:01
@garyttierney garyttierney merged commit e4be580 into garyttierney:main Apr 15, 2026
16 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in me3 Apr 15, 2026
@Sirius902 Sirius902 deleted the wine-fix branch April 15, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants