Closed zainin closed 2 years ago
I can reproduce a crash when the game is already running and another EXE is launched at the same point, at which point it will crash with a floating point exception.
I was able to fix this at least to some degree by searching the system for an existing Proton process, checking what environment variables it has, and using the same values for WINEESYNC
and WINEFSYNC
to better replicate its runtime configuration. My guess is that otherwise communication with wineserver fails and causes the process to crash.
As a workaround, could you try whether the following works?
$ protontricks -c bash <appid>
$ # cd to the directory with the executable
$ WINEFSYNC=1 WINEESYNC=1 wine <exe path>
You might have to adjust both values depending on what your system uses. Here's how I searched for the environment variables:
$ ps aux | grep wineserver
$ # Get the PID for Proton's wineserver process, the second column in the output
$ xargs -0 -L1 -a /proc/<pid>/environ
You should be able to find WINEESYNC
and WINEFSYNC
on the list.
One solution would probably be for Protontricks to do automatically, but that might take some time to develop and have some problems of its own.
Well, that seems a bit obvious in hindsight - I used to run this with WINEESYNC=1
before and it stopped working after the system upgrade, which, surprise, brings fsync support. The latest Proton enables fsync automatically from what I've seen.
The workaround with running bash works fine.
In the end, on the latest kernel with fsync patches this command works as expected:
$ WINEFSYNC=1 protontricks --no-bwrap -c 'wine tweak.exe' <appid>
Before adding an automatic solution it might be a good idea to document these two variables, maybe even enable WINEFSYNC
by default on the latest kernel?
And just in case someone else stumbles on this reports and wonders about the --no-bwrap
option - in my experience it's required to use this option if the tweak you're using depends on modifying your game's memory.
Sorry for taking up your time with this report, I should've tested it properly first.
Thanks for the report, there is an actual issue here that I hadn't found myself before this: Wine processes launched by Protontricks may crash due to not using the same configuration options as Steam. This also applies when the user has set custom launch options, as that is the usual place for disabling esync/fsync. Ideally, the user wouldn't need to apply the configuration in two different places.
The variables are not documented directly, but are instead set by the Proton launch script. In Proton 6.3 they're automatically set to 1, meaning either esync or fsync is always used if supported unless explicitly disabled. Protontricks could do the same, but the defaults might depend on the Proton version and be a headache to maintain, so I'll have to look into that first.
Copying a few environment variables from a running wineserver is a fairly generic solution by comparison, so I'll start with that. I've already done some work in the replicate_runtime branch, and I'll close this issue once I've merged that into master.
Describe the bug While running the game try to run another exe (for modding, tweaking the game etc). The command fails without any useful errors.
To Reproduce Steps to reproduce the behavior:
The exe doesn't start and Protontricks fails without any errors.
Expected behavior Additional exe starts without any issues.
System (please complete the following information):
protontricks (1.7.1.dev2+g9689efb)
Additional context
This used to work with the previous Proton version - I can't remember the exact version.
If I'm trying to run the exe without Protontricks it fails with this error on the current Proton version:
With
STEAM_COMPAT_CLIENT_INSTALL_PATH=~/.steam
set the exe starts as expected if I start it directly with Proton:If I pass this variable to Protontricks it doesn't seem to make any difference.