flathub / com.valvesoftware.Steam

https://flathub.org/apps/details/com.valvesoftware.Steam
339 stars 69 forks source link

XCOM2 War of the Choosen crashing after new game intro #891

Open k4ffee opened 2 years ago

k4ffee commented 2 years ago

Game information

XCOM2 War of the Choosen AppId: 268500

Distribution name and version where applicable

Gentoo

Flatpak info

Flatpak 1.12.3 flatpak --gl-drivers: default host

Problem description

The game starts fine. If you start a new game, the game crashes immediately after the intro movie/cutscence. The game also crashes if you skip the intro. Message in DialogWindow: Game crashed with signal 6

Console output:

libgcc_s.so.1 must be installed for pthread_cancel to work
XCOM2WotC: dumped to "/home/home/.var/app/com.valvesoftware.Steam/.local/share/feral-interactive/XCOM 2 WotC/crashes/185adb67-07c0-596d-7eae7fde-4466d7f1.dmp"
XCOM2WotC: crash reporter "/mnt/games/Steam/Libary/steamapps/common/XCOM 2/XCOM2WotC/bin/feral_linux_crash_reporter" launching
ERROR: ld.so: object '$ORIGIN/../lib/private_symbol_hack.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '$ORIGIN/../lib/private_symbol_hack.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '$ORIGIN/../lib/private_symbol_hack.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '$ORIGIN/../lib/private_symbol_hack.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Game crashed with signal 6
Game crashed with signal SIGABRT(6): Program Aborted.

Following FAQ - suggestion :

entries:
  - basedir: "*(/*|/.*)/XCOM 2/XCOM2WotC"
    blocklists:
      - binaries:
          - path: bin/XCOM2WotC
        libraries:
          - path: lib/private_symbol_hack.so

But I do not know where to place it

Does this issue reproduce with native Steam

Have not tested

Any ideas? Thank you!

nanonyme commented 2 years ago

Add a new file here https://github.com/flathub/com.valvesoftware.Steam/tree/beta/resources/blocklist, create a PR and Flathub creates a test build.

k4ffee commented 2 years ago

Ok. Thank you. The error persists in the test build. But i am not sure about the path, because I can not see a message about blocked libs. XCOM2 War of the Choosen is a dlc installed into the original game folder, in an own subfolder. Looks like that:

common/
- XCOM 2/
- - XCOM2Wotc/
- - - bin/
- - - - XCOM2Wotc
- - - lib/
- - - - private_symbol_hack.so

So my yml file seems correct to me, but as it does not work, i certainly missed something ...

JulianGro commented 2 years ago

Same issue here on Debian testing. Trying to load a savegame immediately crashes the game when run inside the Steam Flatpak. Native Steam does not have the game crash.

JulianGro commented 2 years ago

Looking at it closer, the problem seems to be it not being able to find private_symbol_hack.so. Apparently this library is needed to run the game:

# We used some private glibc symbols which were removed in glibc 2.34.
# Preload a library that defines them as stubs to avoid failing to find them.

Personally I don't know how it works outside of flatpak, but the problem seems to be that

if [ $use_private_symbol_hack == 1 ]; then
    echo "Preloading libc private symbol hack"
    # $GAME_ROOT might contain spaces
    LD_PRELOAD_ADDITIONS="\$ORIGIN/../lib/private_symbol_hack.so:${LD_PRELOAD_ADDITIONS}"
fi

from the launch script does not get $ORIGIN from anywhere.

For reference, here is the whole launch script that is used to launch the game: https://paste.ubuntu.com/p/ChWfWbg4kF/

kbrenneman commented 2 years ago

$ORIGIN isn't an environment variable, which is why it escapes the $ character. It's a special token that ld.so expands to the directory containing the executable.

If the problem is some missing or different library, though, then setting LD_DEBUG and running it with the native and flatpak versions of Steam help figure out the difference.

JulianGro commented 2 years ago

Yeah this seems annoying. On native I get:

Not preloading private symbol hack as a glibc version less than or equal to 2.33 was detected

Which means that it is not trying to load that library on native. However, my libglib2.0 package is version 2.72.1. So either the code to check the glibc version is failing on native but not failing inside of Flatpak, or Steam ships an older glibc library that Flatpak does not use.

kbrenneman commented 2 years ago

The private_symbol_hack.so does appear to be the difference. If I modify XCOM2WotC.sh to unconditionally set use_private_symbol_hack=0, then I can at least get to the opening level. I haven't tested beyond that yet.