luxtorpeda-dev / luxtorpeda

Steam Play compatibility tool to run games using native Linux engines
GNU General Public License v2.0
716 stars 19 forks source link

Crashing After Wayland Switch #124

Closed JoshuaFern closed 2 years ago

JoshuaFern commented 2 years ago

Linux Distribution

Flatpak/NixOS

Luxtorpeda Version

45-48

Bug description

Luxtorpeda will crash on the engine selection screen.

Steps To Reproduce

  1. Start Luxtorpeda
  2. The engine selector appears.
  3. Wait a second.
  4. Luxtorpeda crashes.

Expected Behavior

Luxtorpeda should not crash.

Additional Context

I have changed my display server from x11 to Wayland recently.

Version 40 does not crash.

Relevant log output

No cached sticky mapping in ActivateActionSet.GameAction [AppID 1358830, ActionID 94] : LaunchApp changed task to ProcessingInstallScript with ""
/nix/store/671llhi2hrpy3s4hqb5zap32km8iizcb-glib-networking-2.70.0/lib/gio/modules/libgiognomeproxy.so: undefined symbol: g_task_new
Failed to load module: /nix/store/671llhi2hrpy3s4hqb5zap32km8iizcb-glib-networking-2.70.0/lib/gio/modules/libgiognomeproxy.so
/nix/store/671llhi2hrpy3s4hqb5zap32km8iizcb-glib-networking-2.70.0/lib/gio/modules/libgiognutls.so: undefined symbol: g_byte_array_steal
Failed to load module: /nix/store/671llhi2hrpy3s4hqb5zap32km8iizcb-glib-networking-2.70.0/lib/gio/modules/libgiognutls.so
/nix/store/671llhi2hrpy3s4hqb5zap32km8iizcb-glib-networking-2.70.0/lib/gio/modules/libgiolibproxy.so: undefined symbol: g_task_set_task_data
Failed to load module: /nix/store/671llhi2hrpy3s4hqb5zap32km8iizcb-glib-networking-2.70.0/lib/gio/modules/libgiolibproxy.so
/nix/store/ninddc018d5iijpd3rxy0ahr83xmzv9n-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so: undefined symbol: g_type_ensure
Failed to load module: /nix/store/ninddc018d5iijpd3rxy0ahr83xmzv9n-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so
/nix/store/h3b1f8jflndb7lhkx4bcmx68w5xjphv8-gvfs-1.48.1/lib/gvfs/libgvfscommon.so: undefined symbol: g_task_new
Failed to load module: /nix/store/h3b1f8jflndb7lhkx4bcmx68w5xjphv8-gvfs-1.48.1/lib/gio/modules/libgioremote-volume-monitor.so
/nix/store/h3b1f8jflndb7lhkx4bcmx68w5xjphv8-gvfs-1.48.1/lib/gvfs/libgvfscommon.so: undefined symbol: g_task_new
Failed to load module: /nix/store/h3b1f8jflndb7lhkx4bcmx68w5xjphv8-gvfs-1.48.1/lib/gio/modules/libgvfsdbus.so
/bin/bash: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libtinfo.so.6: no version information available (required by /bin/bash)
Error: Custom { kind: Other, error: "iscriptevaluator ignorning" }
GameAction [AppID 1358830, ActionID 94] : LaunchApp changed task to SynchronizingControllerConfig with ""
GameAction [AppID 1358830, ActionID 94] : LaunchApp changed task to SiteLicenseSeatCheckout with ""
GameAction [AppID 1358830, ActionID 94] : LaunchApp changed task to CreatingProcess with ""
GameAction [AppID 1358830, ActionID 94] : LaunchApp waiting for user response to CreatingProcess ""
GameAction [AppID 1358830, ActionID 94] : LaunchApp continues with user response "CreatingProcess"
/bin/sh\0-c\0/home/jdf/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=1358830 -- '/home/jdf/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/home/jdf/.local/share/Steam/compatibilitytools.d/luxtorpeda'/luxtorpeda.sh waitforexitandrun  '/home/jdf/.local/share/Steam/steamapps/common/Operator/Operator.exe'\0
Game process added : AppID 1358830 "/home/jdf/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=1358830 -- '/home/jdf/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/home/jdf/.local/share/Steam/compatibilitytools.d/luxtorpeda'/luxtorpeda.sh waitforexitandrun  '/home/jdf/.local/share/Steam/steamapps/common/Operator/Operator.exe'", ProcID 29748, IP 0.0.0.0:0
chdir /home/jdf/.local/share/Steam/steamapps/common/Operator
ERROR: ld.so: object '/home/jdf/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
GameAction [AppID 1358830, ActionID 94] : LaunchApp changed task to WaitingGameWindow with ""
ERROR: ld.so: object '/home/jdf/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/jdf/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/jdf/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/jdf/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pid 29752 != 29749, skipping destruction (fork without exec?)
/nix/store/671llhi2hrpy3s4hqb5zap32km8iizcb-glib-networking-2.70.0/lib/gio/modules/libgiognomeproxy.so: undefined symbol: g_task_new
Failed to load module: /nix/store/671llhi2hrpy3s4hqb5zap32km8iizcb-glib-networking-2.70.0/lib/gio/modules/libgiognomeproxy.so
/nix/store/671llhi2hrpy3s4hqb5zap32km8iizcb-glib-networking-2.70.0/lib/gio/modules/libgiognutls.so: undefined symbol: g_byte_array_steal
Failed to load module: /nix/store/671llhi2hrpy3s4hqb5zap32km8iizcb-glib-networking-2.70.0/lib/gio/modules/libgiognutls.so
/nix/store/671llhi2hrpy3s4hqb5zap32km8iizcb-glib-networking-2.70.0/lib/gio/modules/libgiolibproxy.so: undefined symbol: g_task_set_task_data
Failed to load module: /nix/store/671llhi2hrpy3s4hqb5zap32km8iizcb-glib-networking-2.70.0/lib/gio/modules/libgiolibproxy.so
/nix/store/ninddc018d5iijpd3rxy0ahr83xmzv9n-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so: undefined symbol: g_type_ensure
Failed to load module: /nix/store/ninddc018d5iijpd3rxy0ahr83xmzv9n-dconf-0.40.0-lib/lib/gio/modules/libdconfsettings.so
/nix/store/h3b1f8jflndb7lhkx4bcmx68w5xjphv8-gvfs-1.48.1/lib/gvfs/libgvfscommon.so: undefined symbol: g_task_new
Failed to load module: /nix/store/h3b1f8jflndb7lhkx4bcmx68w5xjphv8-gvfs-1.48.1/lib/gio/modules/libgioremote-volume-monitor.so
/nix/store/h3b1f8jflndb7lhkx4bcmx68w5xjphv8-gvfs-1.48.1/lib/gvfs/libgvfscommon.so: undefined symbol: g_task_new
Failed to load module: /nix/store/h3b1f8jflndb7lhkx4bcmx68w5xjphv8-gvfs-1.48.1/lib/gio/modules/libgvfsdbus.so
GameAction [AppID 1358830, ActionID 94] : LaunchApp changed task to Completed with ""
/bin/bash: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/libtinfo.so.6: no version information available (required by /bin/bash)
LD_PRELOAD found with /tmp/pressure-vessel-libs-ANP7D1/${PLATFORM}/gameoverlayrenderer.so
pid 29899 != 29898, skipping destruction (fork without exec?)
turning virtual gamepad off
SDL_IGNORE_DEVICES not found: environment variable not found
update_packages_json. found hash: babc70f0b8716cad93a81170fae1549756a39bad
update_packages_json. found hash and remote hash: babc70f0b8716cad93a81170fae1549756a39bad babc70f0b8716cad93a81170fae1549756a39bad
creating: "/run/user/1000/luxtorpeda/1358830.pid"
luxtorpeda version: 46.0.0
steam_app_id: "1358830"
original command: ["/home/jdf/.local/share/Steam/steamapps/common/Operator/Operator.exe"]
working dir: Ok("/home/jdf/.local/share/Steam/steamapps/common/Operator")
tool dir: "/home/jdf/.local/share/Steam/compatibilitytools.d/luxtorpeda"
"/home/jdf/.var/app/com.valvesoftware.Steam/config/luxtorpeda/user-packages.json"
game info using default
"/home/jdf/.var/app/com.valvesoftware.Steam/config/luxtorpeda/user-packages.json"
game info using default
showing engine choices
0 joysticks available
/home/jdf/.local/share/Steam/compatibilitytools.d/luxtorpeda/luxtorpeda.sh: line 11: 29901 Aborted                 (core dumped) "$DIR/luxtorpeda" "$@"
Game process removed: AppID 1358830 "/home/jdf/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=1358830 -- '/home/jdf/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/home/jdf/.local/share/Steam/compatibilitytools.d/luxtorpeda'/luxtorpeda.sh waitforexitandrun  '/home/jdf/.local/share/Steam/steamapps/common/Operator/Operator.exe'", ProcID 29748 
Uploaded AppInterfaceStats to Steam
d10sfan commented 2 years ago

@JoshuaFern Do games that do not need the launcher work as expected?

Also, if you go into the area where the compatibility tool is installed and run ./luxtorpeda mgmt, what happens? That should launch a management tool listing all of the games you've run in the past.

d10sfan commented 2 years ago

@JoshuaFern Also it works on the same system but with x11 instead of wayland?

d10sfan commented 2 years ago

@JoshuaFern I just tried on my laptop with amd/intel with wayland and it worked fine, this was with arch linux.

JoshuaFern commented 2 years ago

Hi, thanks for the quick response. I'm using Nvidia drivers, which recently added GBM support. I have been using Sway full time for a little over a week now with good success. Luxtorpeda was previously working fine on the same system with X11.

Testing games that launch directly, Blake Stone: Planet Strike works fine.

Running mgmt seems to have the exact same behavior:

[📦 com.valvesoftware.Steam luxtorpeda]$ ./luxtorpeda mgmt
update_packages_json. found hash: babc70f0b8716cad93a81170fae1549756a39bad
update_packages_json. found hash and remote hash: babc70f0b8716cad93a81170fae1549756a39bad babc70f0b8716cad93a81170fae1549756a39bad
0 joysticks available
window is on display_index: 0
found dpi: (81.18885, 81.28, 80.68235)
using dpi scaling of 1.0571465
Aborted (core dumped)

A solution to the crashing seems to be launching mgmt with SDL_VIDEODRIVER=wayland, I have this set globally however I don't think it's getting passed to applications running in the flatpak environment. I could manually tweak this for my system but that would only fix the issue for myself.

d10sfan commented 2 years ago

@JoshuaFern I think I have a fix with this: https://github.com/luxtorpeda-dev/luxtorpeda/commit/a0a95bdb5007d3fb335493e28045cb7fcfe24c9a

Version 49 has this fix in it. It looks like the painter, part of the window system was being freed after the window was closed and freed, causing a crash. Moving the painter to the top of the object seems to have caused it to be freed first, fixing the issue.

Let me know if you continue to have issues.