Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shenzen I/O (504210) crashes on launch #268

Closed
DanMan opened this issue Jul 4, 2020 · 8 comments
Closed

Shenzen I/O (504210) crashes on launch #268

DanMan opened this issue Jul 4, 2020 · 8 comments

Comments

@DanMan
Copy link

DanMan commented Jul 4, 2020

My system information

Steam Runtime Version: 0.20200604.0
Distribution: Fedora 32 (64 bit)
Link to your full system information: https://gist.github.com/DanMan/df94fe2dc319aad76fc097c2f90e6329/6703e5131451674221d74d71bdd0d9d543275cf3
Have you checked for system updates?: [Yes]
Are you using the Steam Linux Runtime compatibility tool?: [Yes]

Crash reason

Shenzhen.bin.x86_64 killed by SIGSEGV

Backtrace

{   "signal": 11
,   "executable": "/…/steamapps/common/SHENZHEN IO/Shenzhen.bin.x86_64"
,   "stacktrace":
      [ {   "crash_thread": true
	,   "frames":
	      [ {   "address": 485331304471,   "build_id_offset": 485331304471 }
	      , {   "address": 139642737964960
	        ,   "build_id": "b840f4e4e3d577b8705f1309d8caa5172f65e11c"
	        ,   "build_id_offset": 22432
	        ,   "function_name": "dl_main"
	        ,   "file_name": "/lib64/ld-linux-x86-64.so.2"
	        }
	      , {   "address": 139642738056331
	        ,   "build_id": "b840f4e4e3d577b8705f1309d8caa5172f65e11c"
	        ,   "build_id_offset": 113803
	        ,   "function_name": "_dl_sysdep_start"
	        ,   "file_name": "/lib64/ld-linux-x86-64.so.2"
	        }
	      , {   "address": 139642737954732
	        ,   "build_id": "b840f4e4e3d577b8705f1309d8caa5172f65e11c"
	        ,   "build_id_offset": 12204
	        ,   "function_name": "_dl_start"
	        ,   "file_name": "/lib64/ld-linux-x86-64.so.2"
	        }
	      , {   "address": 139642737951000
	        ,   "build_id": "b840f4e4e3d577b8705f1309d8caa5172f65e11c"
	        ,   "build_id_offset": 8472
	        ,   "function_name": "_dl_start_user"
	        ,   "file_name": "/lib64/ld-linux-x86-64.so.2"
	        } ]
	} ]
}
@DanMan
Copy link
Author

DanMan commented Jul 23, 2020

Still crashes with runtime version 0.20200720.0.

/steamapps/common/SHENZHEN IO/Shenzhen: line 43: 21955 Segmentation fault (core dumped) ./Shenzhen.bin.x86_64
/steamapps/common/SHENZHEN IO/Shenzhen: line 46: 21958 Segmentation fault (core dumped) rm -f xdb.s xdb.il

@smcv
Copy link
Contributor

smcv commented Jul 27, 2020

A guess: does Shenzhen I/O have a launch script that completely replaces the LD_LIBRARY_PATH environment variable with its own entries?

Games that do that will not currently work with Steam Linux Runtime. They need to prepend or append their directory entries to the variable.

@DanMan
Copy link
Author

DanMan commented Jul 27, 2020

I think, I'm not sure. It seems it was actually ported by @flibitijibibo. Here's the script:

#!/bin/bash
# Shenzhen I/O Shell Script
# Written by Ethan "flibitijibibo" Lee

# Move to script's directory
cd "`dirname "$0"`"

# Get the system architecture
UNAME=`uname`
ARCH=`uname -m`

# Zachtronics wants lines!
# NOTE: This doesn't work on obfuscated builds!
#export MONO_XDEBUG=1

# MonoKickstart picks the right libfolder, so just execute the right binary.
if [ "$UNAME" == "Darwin" ]; then
	# ... Except on OSX.
	export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./osx/

	# El Capitan is a total idiot and wipes this variable out, making the
	# Steam overlay disappear. This sidesteps "System Integrity Protection"
	# and resets the variable with Valve's own variable (they provided this
	# fix by the way, thanks Valve!). Note that you will need to update your
	# launch configuration to the script location, NOT just the app location
	# (i.e. Kick.app/Contents/MacOS/Kick, not just Kick.app).
	# -flibit
	if [ "$STEAM_DYLD_INSERT_LIBRARIES" != "" ] && [ "$DYLD_INSERT_LIBRARIES" == "" ]; then
		export DYLD_INSERT_LIBRARIES="$STEAM_DYLD_INSERT_LIBRARIES"
	fi

	./Shenzhen.bin.osx $@
else
	# Restore the original library search path that was replaced by the Steam runtime.
	# This should make it possible to launch a PDF reader or other installed programs.
	export LD_LIBRARY_PATH=$STEAM_LD_LIBRARY_PATH

	if [ "$ARCH" == "x86_64" ]; then
		./Shenzhen.bin.x86_64 $@
	else
		./Shenzhen.bin.x86 $@
	fi
fi

# Clean up XDEBUG...
rm -f xdb.s xdb.il

@smcv
Copy link
Contributor

smcv commented Jul 27, 2020

	# Restore the original library search path that was replaced by the Steam runtime.
	# This should make it possible to launch a PDF reader or other installed programs.
	export LD_LIBRARY_PATH=$STEAM_LD_LIBRARY_PATH

This game is deliberately breaking out of the Steam Runtime. That isn't something that can work on the container runtime either. In the container environment, the game can't break out, but its attempts to do so will currently result in it crashing, for complicated reasons involving ld.so, libdl and libc.

Crashing with a mismatch between the versions of fundamental OS libraries does seem quite on-brand for Shenzen I/O, though :-)

We have an idea for how to make the container runtime more robust against games that do this sort of thing, but it hasn't been implemented yet.

@smcv
Copy link
Contributor

smcv commented Aug 9, 2021

We have an idea for how to make the container runtime more robust against games that do this sort of thing

This will hopefully be solved in the next client_beta version of Steam Linux Runtime - soldier (SteamLinuxRuntime_soldier/VERSIONS.txt should say depot 0.20210809.21 or later).

Note that this particular beta will also require updating Steam Linux Runtime to the client_beta branch (if you don't update both tools, a few games won't work).

I tried Shenzhen I/O with a prerelease version, and as well as launching successfully, it is also able to send the datasheets to an external PDF reader successfully, both natively and under Flatpak.

@smcv
Copy link
Contributor

smcv commented Aug 10, 2021

I've confirmed that this works with Steam Linux Runtime depot 0.20210809.34 and Steam Linux Runtime - soldier depot 0.20210809.22, which are both currently on the client_beta branches of their respective compat tools. (Tested on Ubuntu 20.04.)

We can close this issue when those depots (or a newer version) get promoted to the default branch.

@DanMan
Copy link
Author

DanMan commented Aug 10, 2021

Can confirm as well. Game launches and PDF reader is invoked from the game using non-Flatpak Steam.

@smcv
Copy link
Contributor

smcv commented Sep 3, 2021

We can close this issue when those depots (or a newer version) get promoted to the default branch.

Now in the default branch. @kisak-valve, I think we can close this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants