protonscr

Steam Client's SDL broken by XMODIFIERS

steamclosed Distro Family: Solus
ValveSoftware/steam-for-linux#5201 · opened 2017-10-09 by ikeydoherty · updated 2020-05-15 · 11 comments · github
Iikeydoherty 2017-10-09 github

Your system information

  • Steam client version (build number or date): 04/2017, 1507158695
  • Distribution (e.g. Ubuntu): Solus
  • Opted into Steam client beta?: yes
  • Have you checked for system updates?: yes

Please describe your issue in as much detail as possible:

Effectively the same issue as https://github.com/ValveSoftware/steam-for-linux/issues/5103#issuecomment-318641884. Originally reported by myself to https://github.com/ValveSoftware/steam-for-linux/issues/5101#issuecomment-335252889 per instructions - re-reporting here per https://github.com/ValveSoftware/steam-for-linux/issues/5101#issuecomment-335259072

Client will segfault if fatal dbus warnings are enabled, because SDL cannot initialise.
Copy-pasted from https://github.com/ValveSoftware/steam-for-linux/issues/5101#issuecomment-335256123:

So the problem here is the uplifted SDL shipping with the Steam runtime incorrectly uses XMODIFIERS (which here is set to @im=ibus) and tries to incorrectly initialise SDL in after InitIME. Going to patch LSI to forcibly unset XMODIFIERS for now.

Relevant fix in LSI: https://github.com/solus-project/linux-steam-integration/commit/1a70578cb17d63245e91b054fde88f8672a36400

Basically with XMODIFIERS in the environment, SDL_InitSubSystem can fail.

Note: A running fcitx instance or set IBUS_ADDRESS might mitigate this, but I have neither.

Steps for reproducing this issue:

  1. Launch Steam with XMODIFERS="@im=ibus" in environment and STEAM_RUNTIME=0
  2. Observe it die.
  3. Run with DBUS_FATAL_WARNINGS=1 on Ubuntu systems. Observe it die harder.
Kkisak-valve maintainer 2017-10-09 github

I take it ~/.local/share/Steam/ubuntu12_32/libSDL2-2.0.so.0 is the specific library being looked at, not the one in the steam runtime.

Iikeydoherty 2017-10-09 github

Yeah ~/.local/share/Steam/ubuntu12_32/libSDL2-2.0.so.0 - I guess the appropriate term is Steam's private SDL? Apologies for causing confusion.

Iikeydoherty 2017-10-14 github

By way of an update - this no longer affects Solus due to our usage of LSI and use of system SDL.

Kkisak-valve maintainer 2017-10-16 github

Assigning a SDL dev.

Ssmcv 2017-11-09 github

This is believed to have been fixed upstream in SDL 2.0.7 by changeset 11567.

Note that there two copies of SDL are relevant. SDL 2.0.4 in the Steam Runtime (https://github.com/ValveSoftware/steam-runtime) is intended to be used by both 32- and 64-bit games, but due to the LD_LIBRARY_PATH order used, 32-bit builds end up using the copy (of SDL 2.0.6?) bundled with the 32-bit Steam client as mentioned in https://github.com/ValveSoftware/steam-for-linux/issues/5201#issuecomment-335273207. To fix this for all games, both copies would need to be updated.

Iikeydoherty 2017-11-09 github

Thanks @smcv ! LSI is currently overriding SDL libs wherever it can, but obviously this would still affect other distros :)

Ssmcv 2017-11-13 github

due to the LD_LIBRARY_PATH order used, 32-bit builds end up using the copy (of SDL 2.0.6?) bundled with the 32-bit Steam client

This is no longer true in the current client beta, which uses the Steam Runtime copy of SDL as intended. I suspect this dodges the SDL/ibus/dbus bug, since that bug was a regression in SDL 2.0.6 as far as I can see, so the SDL in the Runtime is too old to have it (2.0.5 didn't have the feature that uses libdbus, 2.0.6 has the feature but uses libdbus incorrectly, 2.0.7 uses it correctly).

Kkisak-valve maintainer 2020-03-27 github

Hello @ikeydoherty, are you still experiencing this issue on an up to date system?

FFaeAlicia 2020-03-28 github

Was implementing a workaround for another issue ( #6901 ) and noticed this in the script:

# assertion failures which are now fatal by default
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882607
# https://github.com/ValveSoftware/steam-for-linux/issues/5201
export DBUS_FATAL_WARNINGS=0

My curiosity got the best of me and so I went to investigate. The timing appears to work out, given that @kisak-valve just added the retest label yesterday, so I decided to test. I commented out DBUS_FATAL_WARNINGS=0 and ran it and it's still running fine as I type this on my Xubuntu 19.10 system. So it appears at least that part is solved.

Bbraiam 2020-04-10 github

Can confirm. Commenting out the line doesn't produce an immediate crash of Steam.

Kkisak-valve maintainer 2020-05-15 github

Thanks for retesting, closing.