Page 1 of 1

[1.1.32] Crash shortly after startup on Linux Mesa 21 D3D12

Posted: Thu Apr 22, 2021 2:17 pm
by Calaphos
The game crashes after ~20s after reaching the main menu. Does not seem to matter whether any GUI is opened or a game is loaded. This only happens on WSl2 under Windows 10 with accelerated OpenGL through WSLg (https://github.com/microsoft/wslg) and the Gallium D3D12 driver. GUI and Background simulation work fine before the game crashes.

To reproduce:
- Windows 10 build > 21364
- WSL2 Virtual Machine
- Latest Mesa 21.0.3 build with Gallium D3D12 driver
- Start the game, wait a bit

The problem only seems to happen on the new GUI. Stable 0.15.40 works just fine.

Re: [1.1.32] Crash shortly after startup on Linux Mesa 21 D3D12

Posted: Fri Apr 23, 2021 7:49 am
by posila
It's not new GUI, it's new rendering backend using OpenGL 3.3 core instead of OpenGL 1.2. The new rendering backend is in the game from 0.17
It crashes inside of following OpenGL call

Code: Select all

glGetQueryObjecti64v(queryObject, GL_QUERY_RESULT_AVAILABLE, &available);
there are no relevant OpenGL errors before that, but we do call glGetError only once a frame, so it's possible something went wrong during the frame and we hit undefined behavior.

However ... given your setup, I am gonna say, it's probably bug in Mesa or Gallium or WSLg. Given we have native Windows builds, we won't put any effort to resolving this from our side.

Re: [1.1.32] Crash shortly after startup on Linux Mesa 21 D3D12

Posted: Fri Apr 23, 2021 5:35 pm
by ptx0
posila wrote:
Fri Apr 23, 2021 7:49 am
However ... given your setup, I am gonna say, it's probably bug in Mesa or Gallium or WSLg. Given we have native Windows builds, we won't put any effort to resolving this from our side.
someone has posted a 'helpful guide' on how to run Factorio using WSL with the idea that they'll have access to POSIX fork() and the ability to replace malloc with Microsoft's mimalloc.

those kinds of guides are frustrating because they.. encourage people to do things that waste your time.

can't wait til they try running it in Cygwin64.