protonscr

Steam API uses PlayersRefreshComplete callback twice [BETA and STABLE]

steamclosed
ValveSoftware/steam-for-linux#10191 · opened 2023-11-02 by Abrifq · updated 2023-11-16 · 2 comments · github
AAbrifq 2023-11-02 github

Your system information

  • Steam client version (build number or date): Build Number/Steam Version 1698890449

  • Distribution (e.g. Ubuntu): DraugerOS 7.6.1, based on Ubuntu 22.04

  • Opted into Steam client beta?: [Yes/No] Yes

  • Have you checked for system updates?: [Yes/No] Yes

  • Steam Logs:
    steam-logs.tar.gz

  • GPU: Nvidia/Intel/AMD: AMD 5700U Integrated Graphics (neofetch says it's AMD ATI 05:00.0 Lucienne)

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

Steamworks API function Player Details calls the PlayersRefreshComplete callback twice, causing an use-after-free situtation. (see #Details on assumption

Steps for reproducing this issue:

Using Steam Beta, Rhythm Taichi XR (2266270) and Proton 8.0 (doesn't matter much, tried with Experimental and 5.13 too)

  1. Launch steam with command line: STEAM_LINUX_RUNTIME_VERBOSE=1 PROTON_LOG=1 STEAM_LINUX_RUNTIME_LOG=1 steam
  2. Launch Rhythm Taichi XR in Play Rhythm Taichi XR mode.
  3. Set a breakpoint if you have the source code :slightly_smiling_face:
  4. Launch the companion app (requires mobile phone)
  5. Choose "connect as controller"
  6. The game should crash. Depending on the Proton version, Unity Crash Handler might be invisible. The game should exit with code 768, or 0x300 in hexadecimal.
  7. Check unity logs from $STEAMDIR/steamapps/compatdata/2266270/pfx/drive_c/users/steamuser/AppData/LocalLow/Tempstudio, LLC/Rhythm Taichi/Player.log
  8. Check Steam Linux Runtime Logs $STEAMDIR/steamapps/common/$SLR/var/slr-latest.log (for example, slr can be SteamLinuxRuntime_sniper)

If you use Proton 5.13, which gives a more verbose log for reasons unknown to me, in step 7, you can search for OUTPUTTING STACK TRACE.

Should return something like this:
========== OUTPUTTING STACK TRACE ==================

RtlLookupFunctionEntry returned NULL function. Aborting stack walk.
0x000000007B01193E (kernelbase) EntryPoint
0x000000005703170E (onnxruntime) EntryPoint
0x000000005703188D (onnxruntime) EntryPoint
0x00000000569CFADF (onnxruntime) EntryPoint
0x00000000569CFC57 (onnxruntime) EntryPoint
0x000000004300210C (gameassembly) EntryPoint
0x0000000042E64DB9 (gameassembly) EntryPoint
0x0000000041F24737 (gameassembly) EntryPoint
0x0000000041F250D5 (gameassembly) EntryPoint
0x0000000041F27E2C (gameassembly) EntryPoint
0x000000004375AF20 (gameassembly) EntryPoint
0x0000000041EF26BB (gameassembly) EntryPoint
0x0000000041A05F7C (gameassembly) EntryPoint
0x0000000041CC3870 (gameassembly) EntryPoint
0x00000001808BD4D0 (unityplayer) EntryPoint
0x00000001808C0073 (unityplayer) EntryPoint
0x00000001808D8C33 (unityplayer) EntryPoint
0x00000001808D8CF5 (unityplayer) EntryPoint
0x000000018064EA50 (unityplayer) EntryPoint
0x000000018079E3F7 (unityplayer) EntryPoint
0x000000018079E493 (unityplayer) EntryPoint
0x00000001807A08EC (unityplayer) EntryPoint
0x000000018054E4DE (unityplayer) EntryPoint
0x000000018054D23A (unityplayer) EntryPoint
0x0000000180551418 (unityplayer) EntryPoint
0x0000000180554F1B (unityplayer) EntryPoint
0x00000001400011F2 (rhythm taichi) EntryPoint
<Missing stacktrace information>

========== END OF STACKTRACE ===========

Details on assumption

How does that assume the PlayersRefreshComplete callback was caled twice?

Search for the System.Threading.ThreadInterruptedException in the Unity log file.
There should be two instances of Steamworks.PlayersRefreshComplete:Invoke() on the same stack.

Alternative producing method

Using Steam Beta, Tekken 7 (389730) and Proton 8.0

  1. Launch steam with the same commandline from the first method
  2. Clear all logs from Tekken's log folder: $STEAMDIR/steamapps/compatdata/389730/pfx/drive_c/users/steamuser/AppData/Local/TekkenGame/Saved/Logs/
  3. Launch Tekken 7
  4. All intro movies play OK.
  5. After pressing "any key" on the "Press any button" screen, there should be a loading screen.
  6. This will depend on your machine but my machine takes 5-10 secs to load the game properly here. However, this time the game will crash within a few seconds, without producing any visible "I crashed!" windows. The game should exit with code 768, or 0x300 in hexadecimal.
  7. There should be a new folder with crash log and dump at $STEAMDIR/steamapps/compatdata/389730/pfx/drive_c/users/steamuser/AppData/Local/TekkenGame/Saved/Logs/
AAbrifq 2023-11-02 github

Please respond if i can re-download the libraries since i don't want to downlaod ~200GBs of game from scratch

AAbrifq 2023-11-16 github

Tried my best to diagnose the issues, fixed the vulkan issues in my setup. (32-bit was missing) and upon reinstalling Tekken 7, I "corrupted" my save.
Curse capcom, glory to arstotzka.

Closing this issue.

Proton versions

Launch options