http://bugs.winehq.org/show_bug.cgi?id=58545
Bug ID: 58545 Summary: Wine preloader always crashes if I run under nix develop shell, no programs work Product: Wine Version: 10.12 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: xvroad@gmail.com Distribution: ---
wine64-preloader always crashes with "Segmentation fault" error at startup if started under nix develop environment, which I created for developing yabridge-based C++ app.
The command, nix develop, is a command of nix package manager. It automatically download tools and libraries needed for developing my C++ app, and creates a temporary shell with all required environment variables set for development. I ran the command on NixOS 25.05.
If I understand correctly, nix develop command just sets environment variables. I have no idea how that lead to a difficult to diagnose crash.
I attached the gdb debugger to debug wine64 and wine64-preloader. It seems that it's crashing somewhere after wld_start, but I'm not sure exactly where the issue is. https://gitlab.winehq.org/wine/wine/-/blob/wine-10.0/loader/preloader.c?ref_...
I uploaded the flake.nix for reproducing the issue to a GitHub repo.
https://github.com/vroad/wine-crash-test
I can't reproduce the issue by
* Sourcing environment variables dumped and running wine outside nix develop shell. * Setting really long environment variables and running wine outside nix develop shell. wine can just handle it fine. * Running wine inside nix develop, but with a different set of packages.
The issue is reproducible on wine built from current latest master commit (https://gitlab.winehq.org/wine/wine/-/commit/5b5f7fa104582c08e860f84c6fb3619...).