ValveSoftware / steam-runtime

A runtime environment for Steam applications
Other
1.18k stars 86 forks source link

Steam-Linux-Runtime Beta breaks 2 AGS Games with the identicaly Start.sh script since some (3-4) days (latest update?) #379

Closed SaschaVasarrhelyi closed 3 years ago

SaschaVasarrhelyi commented 3 years ago

Your system information

Please describe your issue in as much detail as possible:

Describe what you expected should happen and what did happen. Please link any large code pastes as a Github Gist The Beta version of the Steam-Linux-Runtime [client_beta] breaks the Start.sh script of two AGS games without any error massage if i start Steam in the console (Guard Duty & Mages Initiation). The two games has the identicaly Start.sh script https://gist.github.com/SaschaVasarrhelyi/970ef0cf4c95ad982d4b4956f59bade6 . It ends before the script can start AGS. I have also an AGS game they run normal with the [client_beta] but with an little bit differrend Start.sh script (Al Emmo) https://gist.github.com/SaschaVasarrhelyi/d030fc3a34b35e381efdabba5b504da6 . The starting of all 3 games is possible if i set the Steam-Linux-Runtime without [client_beta] but not anymore if [client_beta] is active.

Steps for reproducing this issue:

  1. Set Steam-Linux-Runtime to client_beta
  2. Start Guard Duty or Mages Initiation: Reign of the Elements
  3. See that it don't start without massages d030fc3a34b35e381efdabba5b504da6-2f958bbed8c34b80908b169f4920b9ca07049690.zip 970ef0cf4c95ad982d4b4956f59bade6-d473be048ff31dff8cf04c9a597d6ab28868b044.zip cb07dc9afde779d5a1c460dd74a6dc2f-5f3390549aa6ae3554e619851762ecf6df0cbff8.zip
kisak-valve commented 3 years ago

Hello @SaschaVasarrhelyi, please give https://github.com/ValveSoftware/steam-runtime/blob/master/doc/reporting-steamlinuxruntime-bugs.md#essential-information a read and share a Steam Linux Runtime log along with your system information from Steam after it's done gathering the extended diagnostics information.

smcv commented 3 years ago

In addition to the information @kisak-valve already asked for, I'd like to know: do these games work when not using the Steam Linux Runtime compatibility tool?

The starting of all 3 games is possible if i set the Steam-Linux-Runtime without [client_beta] but not anymore if [client_beta] is active.

This probably indicates a regression between 0.20210208.0 (not beta; works) and 0.20210309.0 (beta; doesn't work). You can confirm this by looking at SteamLinuxRuntime/VERSIONS.txt.

I think the most likely reason is that this was caused by fixing #371?

From https://steamdb.info/depot/872752/ it looks like Guard Duty includes several bundled libraries in ./lib32 and ./lib64 that it ideally shouldn't. It also has several copies of libagsteam.so and libsteam_api.so in different locations, including one in the top-level directory and another in each of the lib32 and lib64 subdirectories. https://steamdb.info/depot/270612/ has a similar setup.

After fixing #371, I think we have a behaviour change for this game: previously, it would prefer to load lib32/libagsteam.so or lib64/libagsteam.so. Now, it will prefer to load ./libagsteam.so.

SaschaVasarrhelyi commented 3 years ago

The Game dosn't run if the compatibility tools not set to Steam-Linux-Rtime no matter if i use the non beta brunch or the beta of Steam-Linux-Runtime. But when i use the non beta Steam-Linux-Runntime and set the compatibility tools to Steam-Linux-Runtime the game starts and launch normaly.

smcv commented 3 years ago

Still using the beta, please try setting the Launch Options in the game's properties to:

STEAM_COMPAT_FLAGS="" %command%

and report back whether that makes it work?

SaschaVasarrhelyi commented 3 years ago

Yes, that make it work but just with the compatibility tools set to steam-linux-runtime (in the options-> compatibility -> steam-linux-runtime).

smcv commented 3 years ago

OK, thanks for the info. I think I understand most of what's happening here, but we still need to see a log to confirm what is happening, as requested in https://github.com/ValveSoftware/steam-runtime/issues/379#issuecomment-798795127.

SaschaVasarrhelyi commented 3 years ago

I have Start and then i exit the game normaly for this log but with the "STEAM_COMPAT_FLAGS="" %command%" Launch option and in the Steam-Linux-Runtime client_beta. slr-latest.log slr-app872750-t20210318T135644.log

smcv commented 3 years ago

Please do that again without the launch options workaround, so we can compare? (Empty the Launch Options box, or set it to just %command%)

SaschaVasarrhelyi commented 3 years ago

Ok. Here is it. slr-app872750-t20210318T141359.log slr-latest.log

SaschaVasarrhelyi commented 3 years ago

I find out that without to set the Steam-Linux-Runtime in the options menu (options -> Compatibility -> Steam-Linux-Runtime) they couldn't make .log files in var/ if i start the game.It just do exit without loading. Hope that help you to to find out whats happened.

smcv commented 3 years ago

The log files var/slr-*.log are a feature of Steam Linux Runtime, so it is normal that they are not produced when SLR is disabled.

To see the game's output with SLR disabled, you would have to run Steam from a terminal (mate-terminal or xterm or equivalent) and look at the messages that appear in that terminal, or redirect its stdout and stderr to a log file yourself. I think you would see the same error message that you see at the end of the SLR log.

smcv commented 3 years ago

OK, here's the error message from your log:

/home/sascha/.steam/debian-installation/steamapps/common/Guard Duty/./Start.sh: 14: export: Duty:/home/sascha/.steam/debian-installation/steamapps/common/Guard Duty/lib64: bad variable name

This is a bug in these games. The author of the Start.sh script has assumed that $LD_LIBRARY_PATH will not contain spaces, but the game directory has spaces in its name.

Instead of

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$SCRIPTPATH/lib64"
...
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$SCRIPTPATH/lib32"

it should have these:

    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SCRIPTPATH/lib64"
...
    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SCRIPTPATH/lib32"

(Various other bits of this script could also be made more robust, but that's the important part.)

These are two games based on the AGS (Adventure Game Studio) engine, by different developers and publishers, with identical startup scripts, which suggests that the developers are copying the startup script either from each other or from some third source.

SaschaVasarrhelyi commented 3 years ago

Thanks a lot for the useful info :) I change the Start.sh script and voila, the two games are running jet fine and without to set the compatibility tool ore something other. Thanks a lot again, i'am happy now :)

SaschaVasarrhelyi commented 3 years ago

may i send your answer to the steam- community forum of the games that are affected?

smcv commented 3 years ago

Yes, but please include a link to this issue report so we have a central place to make recommendations.

The ideal solution for this would be for these games' developers to fix their Start.sh to be more robust, then nobody would need to apply this workaround to their own copy.