ValveSoftware / ValveSoftware/Proton

IL-2 Sturmovik: Battle of Stalingrad (307960)

Open
#3,106 62 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.NET Game compatibility - Unofficial
Dominant language
C++
Stars
32.8k
Forks
1.6k
PR merge metrics
PR metrics pending

Description

Compatibility Report

  • Name of the game with compatibility issues: IL-2 Sturmovik: Battle of Stalingrad
  • Steam AppID of the game: 307960

System Information

I confirm:

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

Symptoms

Occasionally the game does not start at all and Steam says it's running until ~2 minutes later when it finally understands it's not running. In this state I see wine processes (wineserver, winedevice) but not the game executable (IL-2.exe). And occasionally my system completely freezes when the game is starting just as the black window appears.

Most of the time the game starts fine. The mouse is jerky but that's a cosmetic issue. I try to start a a single mission, it gets all up to when the loading is done, then I press Start, and the game crashes.

The backtrace is seen in the attached log steam-307960.log. I have determined that it is crashing because the game calls strlwr on a read-only string "idle", and the Wine implementation tries to write into read-only memory. Using vanilla Wine (Steam running in Wine, not Proton), I was able to work around this issue by patching Wine like this:

--- a/dlls/msvcrt/string.c
+++ b/dlls/msvcrt/string.c
@@ -79,7 +79,10 @@ int CDECL MSVCRT__strlwr_s_l(char *str, MSVCRT_size_t len, MSVCRT__locale_t loca
 
     while (*str)
     {
-        *str = MSVCRT__tolower_l((unsigned char)*str, locale);
+        char lowered = MSVCRT__tolower_l((unsigned char)*str, locale);
+        if (*str != lowered) {
+            *str = lowered;
+        }
         str++;
     }
 

With this the gameplay started, but there was an error about failing to run the LogParser which I fixed using winetricks dotnet35sp1 (I don't know if that would be needed with Proton).

Reproduction

Install the game, start it and try a single mission.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached steam-307960.log and the reported reproduction: launch IL-2 Sturmovik and begin a single mission. Read dlls/msvcrt/string.c around the strlwr implementation and compare the failure with the provided backtrace and workaround. Done means the game starts reliably and reaches gameplay without the reported crash or system freeze.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.