#5991·FEX

Slay the Spire 2 (Godot/Mono native Linux build) crashes reproducibly during multi-threaded asset preload on ARM64

Author: theoleuthardtCreated Sep 25, 2026Updated Sep 25, 2026

Environment

  • Device: Retroid Pocket 6 (Qualcomm, Adreno 740 GPU via Turnip)
  • Distro: ArmadaOS (SteamOS-like Fedora bootc for ARM handhelds, github.com/armada-os/armada)
  • FEX: bundled with ArmadaOS; Host thunking confirmed enabled for Vulkan, OpenGL, ALSA, DRM, Wayland
  • Game: Slay the Spire 2 (Steam AppID 2868840), native Linux x86_64 build
    • Engine: "MegaDot v4.5.1.m.12.mono.custom_build" (custom Godot 4 fork, Mono/.NET runtime)
    • Game version: v0.107.1

Summary

The game's native Linux build launches fine (Vulkan/Turnip init succeeds, Steamworks succeeds, intro logo loads and displays correctly), but crashes reproducibly and deterministically every single time during the main menu asset preload step, right after:

[INFO] Preloading 'MainMenuEssentials' assets... count=5 vfx=0

Stack traces

Multiple related exceptions appear leading up to the fatal crash, e.g.:

ERROR: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Reflection.RuntimeMethodInfo'.
   at Godot.GodotObject.GetPtr(GodotObject instance)
   at Godot.Noise.GetNoise1D(Single x)
   at ScreenTraumaRumble.Update(Double delta)
   at NScreenShake._Process(Double delta)
ERROR: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
   at Godot.Bridge.ScriptManagerBridge.GetOrCreateScriptBridgeForType(Type, godot_ref*)
   at Godot.Bridge.ScriptManagerBridge.GetOrCreateScriptBridgeForPath(godot_string*, godot_ref*)

Fatal crash:

Fatal error. System.AccessViolationException: Attempted to read or write protected memory.
This is often an indication that other memory is corrupt.
   at System.Collections.Generic.Dictionary`2.FindValue(...)
   at System.Collections.Generic.Dictionary`2.TryGetValue(...)
   at Godot.Bridge.ScriptManagerBridge+ScriptTypeBiMap.TryGetScriptPtr(Type, IntPtr&)
   at Godot.Bridge.ScriptManagerBridge.GetOrCreateScriptBridgeForType(Type, godot_ref*)
   at Godot.Bridge.ScriptManagerBridge.GetOrCreateScriptBridgeForPath(godot_string*, godot_ref*)

What I've tried (none prevented the crash, only shifted the exact exception/line slightly)

  • --rendering-driver vulkan vs opengl3
  • --rendering-method mobile vs forward_plus
  • FEX_TSOENABLED=1
  • FEX_TSOENABLED=1 + FEX_PARANOIDTSO=1
  • taskset -c 0,1,2,3 and taskset -c 0 (single core)

The fact that full TSO emulation doesn't fix it, but reducing available CPU cores changes exactly when/where it crashes, points away from a pure memory-ordering issue and toward a timing-sensitive race.

Hypothesis

Godot's WorkerThreadPool (8 threads on this device) loads/registers many C# scripts concurrently during this preload step, causing Mono's JIT to compile code on multiple threads at once. This looks like it could be hitting the same class of bug described in #3032 (self-modifying-code tracking marking a code page read-only, followed by a conflicting guest access), just triggered by Mono's JIT instead of DrRacket's.

Happy to provide full console logs, journalctl output, or coredumpctl info on request.