protonscr

Sword of the Stars II: Enhanced Edition

protonopen appid 42990Game compatibility - UnofficialXAudio2.NET
ValveSoftware/Proton#7324 · opened 2023-12-09 by Asteliks · updated 2026-06-04 · 3 comments · github · game page · search this game
AAsteliks 2023-12-09 github

Compatibility Report

  • Name of the game with compatibility issues: Sword of the Stars II: Enhanced Edition
  • Steam AppID of the game: 42990

System Information

I confirm:

  • [X] that I haven't found an existing compatibility report for this game.
  • [X] that I have checked whether there are updates for my system available.

Symptoms

The game opens the luncher but if you start the game it's an instant crash to desktop

Reproduction

  1. Run SOTS2 on steam
  2. Edit the game setting however you want or don't
  3. Start the game
  4. Note a crash to desktop
Kkisak-valve maintainer 2023-12-09 github

Hello @Asteliks, these look like some lines of interest from your Proton log:

[00000398:] EXCEPTION handling: System.NullReferenceException: Object reference not set to an instance of an object

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at Kerberos.Sots.GameStates.MainMenuScene.Exit () [0x00048] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameStates.MainMenuState.OnExit (Kerberos.Sots.GameState prev, Kerberos.Sots.ExitReason reason) [0x00008] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameState.Exit (Kerberos.Sots.GameState next, Kerberos.Sots.ExitReason reason) [0x00050] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameStateMachine.PrepareGameStateCore (Kerberos.Sots.GameState value, System.Object[] parms) [0x00024] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameStateMachine.PrepareGameState (Kerberos.Sots.GameState value, System.Object[] parms) [0x00028] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameStateMachine.SwitchGameState (Kerberos.Sots.GameState value, System.Object[] parms) [0x0000e] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.App.SwitchGameState (Kerberos.Sots.GameState value, System.Object[] parms) [0x00000] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameStates.SplashState.OnUpdate () [0x00013] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameState.Update () [0x00000] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameStateMachine.Update () [0x000d1] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.App.Update () [0x001f5] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.Engine.ScriptHost.ThreadProc (System.Object scriptHostParams) [0x0009b] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00025] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.Threading.ThreadHelper.ThreadStart (System.Object obj) [0x0000f] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
  at Kerberos.Sots.GameStates.MainMenuScene.Exit () [0x00048] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameStates.MainMenuState.OnExit (Kerberos.Sots.GameState prev, Kerberos.Sots.ExitReason reason) [0x00008] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameState.Exit (Kerberos.Sots.GameState next, Kerberos.Sots.ExitReason reason) [0x00050] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameStateMachine.PrepareGameStateCore (Kerberos.Sots.GameState value, System.Object[] parms) [0x00024] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameStateMachine.PrepareGameState (Kerberos.Sots.GameState value, System.Object[] parms) [0x00028] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameStateMachine.SwitchGameState (Kerberos.Sots.GameState value, System.Object[] parms) [0x0000e] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.App.SwitchGameState (Kerberos.Sots.GameState value, System.Object[] parms) [0x00000] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameStates.SplashState.OnUpdate () [0x00013] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameState.Update () [0x00000] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.GameStateMachine.Update () [0x000d1] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.App.Update () [0x001f5] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at Kerberos.Sots.Engine.ScriptHost.ThreadProc (System.Object scriptHostParams) [0x0009b] in <7bebb796d76547d7afd1d31eac2170cd>:0 
  at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00025] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00071] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x0002b] in <de4d51d88e3b4eea89a8d6a3a9854818>:0 
Mmadewokherd 2025-12-19 github

The game has code that calls Encoding.UTF8.GetBytes(string) and passes the result to an external dll (sqlite3). The external dll expects a null-terminated UTF8 string, but GetBytes doesn't include a null terminator. This is the correct behavior - .NET Framework is the same. But apparently .NET Framework (almost?) always has a 0 byte after the array contents in memory, and so in practice with .NET Framework the dll always gets a null-terminated string with this pattern.

This has shown up before, and a fix was attempted: https://github.com/mono/mono/issues/16988

I tried to add the fix to Wine Mono, but could not because it led to instability: https://bugs.winehq.org/show_bug.cgi?id=48174#c47

Mmadewokherd 2026-06-04 github

It's not enough to get this game working properly, but I pushed a fix to Wine Mono: https://gitlab.winehq.org/mono/mono/-/tree/0274f7eec584e64d3f9408ce0af4ac21c363feb4

It seems the next problem is that the menu needs the d3dx10 sprite API to render.

Proton versions

Upstream links