Heroic-Games-Launcher / HeroicGamesLauncher

A games launcher for GOG, Amazon and Epic Games for Linux, Windows and macOS.
https://heroicgameslauncher.com
GNU General Public License v3.0
8.11k stars 425 forks source link

Add 32Bit option to the wine settings #153

Closed kokoko3k closed 2 years ago

kokoko3k commented 3 years ago

Describe the bug When selecting Lutris to start celeste inside heroic, i get a notepad window opened with the following content:

Monocle Engine Error Log
==========================================

11/02/2021 10:39:36
System.TypeInitializationException: The type initializer for 'Celeste.UserIO' threw an exception. ---> System.DllNotFoundException: SDL2.dll assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) SDL2.SDL.INTERNAL_SDL_GetPlatform()
  at SDL2.SDL.SDL_GetPlatform () [0x00000] in <4aab567ce63d4d3d8764d881a46a5917>:0 
  at Celeste.UserIO.GetSavePath (System.String dir) [0x00000] in <0346aea246134d37b6097e247b022b4e>:0 
  at Celeste.UserIO..cctor () [0x00000] in <0346aea246134d37b6097e247b022b4e>:0 
   --- End of inner exception stack trace ---
  at Celeste.Settings.Initialize () [0x00000] in <0346aea246134d37b6097e247b022b4e>:0 
  at Celeste.Celeste.Main (System.String[] args) [0x00068] in <0346aea246134d37b6097e247b022b4e>:0 

To Reproduce Install celeste set it run with lutris 5.21 set it in a custom prefix start it.

Desktop (please complete the following information):

Additional context The game starts correctly if i run it from the console after setting WINEPREFIX to the same configured in heroic and using the very lutris wine executable. Also, the game runs fine in heroic when using system wine.

flavioislima commented 3 years ago

Game support is complicated, I prefer not to do it here since normally is not related with heroic itself.

But, have you tried looking at the log to see what's js happening? On the game page go to the 3 dots and click latest log.

With heroic, have you tried other wine versions or proton?

kokoko3k commented 3 years ago

I don't think it is game specific, but involves somehow the way Heroic interacts with Lutris wine in a way i can't understand, sorry. This is the log you mentioned, i can't see anything useful:

[Core] INFO: Trying to re-use existing login session...
[cli] INFO: Checking for updates...
[Core] INFO: Getting authentication token...
[cli] INFO: Launching Salt...
000b:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
000b:fixme:winediag:start_process Wine Staging 4.17 is a testing version containing experimental patches.
000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
000f:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
0012:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
000d:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
0019:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
0016:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\NDIS": 00000001
000f:fixme:service:scmdatabase_autostart_services Auto-start service L"NDIS" failed to start: 731
001c:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
0021:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
0026:fixme:plugplay:pnp_manager_device_pnp Unhandled PnP request 0x7.
0023:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\wineusb": c0000142
000f:fixme:service:scmdatabase_autostart_services Auto-start service L"wineusb" failed to start: 1114
002c:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
0026:fixme:plugplay:pnp_manager_device_pnp Unhandled PnP request 0x7.
0033:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
Could not parse file "/home/koko/.local/share/applications/solid_mtp.desktop": Key file does not have group ?Desktop Entry?
Error in file "/home/koko/.local/share/applications/xdg-open.desktop": "all/all" is an invalid MIME type ("all" is an unregistered media type)
Could not parse file "/home/koko/.local/share/applications/test-predicate-openinwindow.desktop": Key file does not have group ?Desktop Entry?
0035:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
0035:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
0035:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
0035:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
0033:fixme:dwmapi:DwmIsCompositionEnabled 000000006DBD1518
0037:fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0x69ebd3de, context 0x317320, init_notify 0, handle 0x9acf9d0): stub
0046:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
004b:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
004b:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
004b:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 1)
0049:fixme:dwmapi:DwmIsCompositionEnabled 6D5D3018
004d:fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0x6a0cb608, context 0x4d2068, init_notify 0, handle 0x12afce8): stub
wine: configuration in '/mnt/big/Giochi/eroic_EGS/Celeste.prefix' has been updated.
0009:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.
0009:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\\windows\\system32\\tzres.dll", (null), 0x22e740, 0xd8d60, 0x22e748, 0x22e738
0009:fixme:nls:GetFileMUIPath stub: 0x10, L"C:\\windows\\system32\\tzres.dll", (null), 0x22e740, 0xd8d60, 0x22e748, 0x22e738
0009:fixme:exec:SHELL_execute flags ignored: 0x00004100
0060:fixme:thread:create_user_shared_data_thread Creating user shared data update thread.```

And as said, yes, i tried other wine versions. with proton it starts without controller working with system wine it works flawlessly. with lutris it does not.

what puzzles me, is that with lutris it works if i start it manually from the console. It is stated in the first post.

flavioislima commented 3 years ago

Heroic doesn't interact with Lutris. It uses Lutris wine only. If it works with Wine and proton, it is not a heroic issue like I said. Heroic is just a GUI, it's logic is basically to call the command to launch the game.

So if you have lutris installed, the only thing heroic is doing is giving you an option to launch that game with Wine from Lutris. Nothing else.

kokoko3k commented 3 years ago

Yes, i know Heroic is just a gui, that's why i can't figure out why if i start celeste using lutris wine and the same prefix from a terminal it works, while using heroic it does not. I thought that maybe the working directory was wrong, so i even inspected /proc/$pid/pwd from the notepad process showing the error and it resides in the celeste.exe folder, where there is SDL.DLL too, but still it is unable to find it. Does heroic set some extra environment variable maybe?

2021-02-11 13:46 GMT+01:00, Flavio F Lima notifications@github.com:

Heroic doesn't interact with Lutris. It uses Lutris wine only. If it works with Wine and proton, it is not a heroic issue like I said. Heroic is just a GUI, it's logic is basically to call the command to launch the game.

So if you have lutris installed, the only thing heroic is doing is giving you an option to launch that game with Wine from Lutris. Nothing else.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/flavioislima/HeroicGamesLauncher/issues/153#issuecomment-777429365

kokoko3k commented 3 years ago

Ok, understood, Heroic is trying to use wine64 to starts Celeste, which is a 32bit app. SDL.DLL is a 32bit library and it fails.

Heroic starts: /opt/heroic/resources/app.asar.unpacked/build/bin/legendary launch Salt --wine '/home/koko/.local/share/lutris/runners/wine/lutris-5.21-x86_64/bin/wine64' --wine-prefix '/mnt/big/Giochi/eroic_EGS/Celeste.prefix' Using wine in place of wine64 makes it run.

I think this is something to address in Heroic, since nor wine or lutris itself fails.

From: https://wiki.winehq.org/FAQ#Is_there_a_64_bit_Wine.3F


32 bit Wine runs on both 32-bit and 64-bit Linux/Unix installations. 16-bit and 32-bit Windows applications will run on it.
64-bit Wine runs only on 64 bit installations, and so far has only been extensively tested on Linux. It requires the installation of 32 bit libraries in order to run 32 bit Windows applications. Both 32-bit and 64-bit Windows applications (should) work with it; however, there are still many bugs.```
flavioislima commented 3 years ago

This is one more of the peculiarities I think I'll need to deal with I guess.

In your case, it worked with the default wine because your wine installation came with the 32 bit libraries. Lutris for some reason will only work that way if you run it with the 32bit binary instead of the wine64.

This is an edge case that to deal with I would need to add another option to choose to run the 32bit wine instead of the 64 bit one. Or find an internal way to handle it.

I don't know, to be honest, most 32bit games will work fine with wine staging since it will support both architectures. So unless I have more cases like this, I won't add another option on Heroic for now since the game is working.

kokoko3k commented 3 years ago

Since wine devs suggest to use wine instead of wine64, because they claim wine64 is bugged and wine is able to run 64-bit, i don't see/understand the problem here in just switching to wine from wine64:

(EDIT) I think i misread, isn't wine capable of run 64bit windows programs?

Maybe the simpler thing is to duplicate the dropdown list of lutris wine versions like:

flavioislima commented 3 years ago

I'll think about it. I'm just worried that the list could be polluted. So maybe an option called: Run with 32bits wine could be better.

kokoko3k commented 3 years ago

Thanks

2021-02-12 11:09 GMT+01:00, Flavio F Lima notifications@github.com:

I'll think about it. I'm just worried that the list could be polluted. So maybe an option called: Run with 32bits wine could be better.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/flavioislima/HeroicGamesLauncher/issues/153#issuecomment-778102660

radgeRayden commented 3 years ago

unless I have more cases like this

Just discovered Alien Isolation has the same issue. You need to copy the launch command and both prepend WINEARCH=win32 and use the wine executable for it to launch.

False alarm, it didn't have anything to do with it being a 32-bit game. Sorry!