[raiguard] [2.0.11] Crash on Linux (X11_GL_SwapWindow)

Place for things which are bugs but we have no idea how to solve them. Things related to hardware, libraries, strange setups, etc.
pusty52
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Oct 27, 2024 8:57 am
Contact:

[raiguard] [2.0.11] Crash on Linux (X11_GL_SwapWindow)

Post by pusty52 »

Hi, game crashes on startup with the following log. Using Ubuntu 6.11.0-9-generic.
log
gattacus
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Oct 27, 2024 11:42 am
Contact:

Re: [2.0.11] Crash on Linux

Post by gattacus »

same here on Ubuntu 24.10
Attachments
factorio-current.log
(9.74 KiB) Downloaded 12 times
pusty52
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun Oct 27, 2024 8:57 am
Contact:

Re: [raiguard] [2.0.11] Crash on Linux (X11_GL_SwapWindow)

Post by pusty52 »

I have observed some weird behavior. I doesnt happen every time. Sometimes the game crashes 8 times in a row and then it works, sometimes it works on the first try. I hope that this info does help at least a bit.
gattacus
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Oct 27, 2024 11:42 am
Contact:

Re: [raiguard] [2.0.11] Crash on Linux (X11_GL_SwapWindow)

Post by gattacus »

Well, I use wayland on my system. It seems factorio is using the x11 driver (although I tried to force wayland with SDL_VIDEODRIVER=wayland and the setting in factorio), causing the crash.
jonathanhrl
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Oct 28, 2024 9:07 am
Contact:

Re: [raiguard] [2.0.11] Crash on Linux (X11_GL_SwapWindow)

Post by jonathanhrl »

For me the game did not crash, but froze instead, I had to open gdb and find where the executable was stuck:

Code: Select all

Thread 1 (Thread 0x7f611b3bb0c0 (LWP 432287) "factorio"):
#0  0x00007f611b7c762b in __recvmsg_syscall (fd=33, msg=0x7ffeb6bd3370, flags=0) at ../sysdeps/unix/sysv/linux/recvmsg.c:27
#1  __libc_recvmsg (fd=33, msg=0x7ffeb6bd3370, flags=0) at ../sysdeps/unix/sysv/linux/recvmsg.c:41
#2  0x00007f611ba30438 in ?? () from target:/tmp/pressure-vessel-libs-YL92V2/lib/gameoverlayrenderer.so
#3  0x00007f611ba31346 in ?? () from target:/tmp/pressure-vessel-libs-YL92V2/lib/gameoverlayrenderer.so
#4  0x00007f611ba32552 in ?? () from target:/tmp/pressure-vessel-libs-YL92V2/lib/gameoverlayrenderer.so
#5  0x00007f611ba33a42 in ?? () from target:/tmp/pressure-vessel-libs-YL92V2/lib/gameoverlayrenderer.so
#6  0x00007f611ba22cc5 in glXSwapBuffers () from target:/tmp/pressure-vessel-libs-YL92V2/lib/gameoverlayrenderer.so
#7  0x0000000002e010f6 in X11_GL_SwapWindow () at /tmp/factorio-build-wNHLhy/libraries/SDL2/src/video/x11/SDL_x11opengl.c:1009
#8  0x000000000168c4f7 in GraphicsInterfaceOpenGL::swapBuffers () at /tmp/factorio-build-wNHLhy/src/Graphics/OpenGL/GraphicsInterfaceOpenGL.cpp:275
#9  0x0000000000e21366 in SDLWindow::swap () at /tmp/factorio-build-wNHLhy/src/Graphics/SDLWindow.cpp:396
#10 0x0000000000ecc5c2 in GlobalContext::swapRenderBuffers () at /tmp/factorio-build-wNHLhy/src/GlobalContext.cpp:1486
#11 0x00000000021bd27f in GlobalContext::swapRenderBuffers () at /tmp/factorio-build-wNHLhy/src/GlobalContext.cpp:1448
#12 MainLoop::mainLoopStep () at /tmp/factorio-build-wNHLhy/src/MainLoop.cpp:720
#13 0x00000000021bd5ee in MainLoop::run () at /tmp/factorio-build-wNHLhy/src/MainLoop.cpp:412
#14 0x00000000021ca597 in fmain () at /tmp/factorio-build-wNHLhy/src/Main.cpp:1325
#15 0x000000000240338e in main () at /tmp/factorio-build-wNHLhy/src/Main.cpp:1347
Detaching from program: target:/home/user/.local/share/Steam/steamapps/common/Factorio/bin/x64/factorio, process 432287
[Inferior 1 (process 432287) detached]
gattacus wrote: Mon Oct 28, 2024 4:05 pm Well, I use wayland on my system. It seems factorio is using the x11 driver (although I tried to force wayland with SDL_VIDEODRIVER=wayland and the setting in factorio), causing the crash.
I'm currently using this to force it to use Wayland (in addition to configuring Wayland in Factorio):

Code: Select all

env --unset DISPLAY SDL_VIDEODRIVER=wayland %command%
This will unset the DISPLAY environment variable, which is used by X11 applications to find the X.Org Server. With this unset Factorio will have no other choice than either use Wayland (determined by the WAYLAND_DISPLAY env) or crash. If it crashes, ensure the WAYLAND_DISPLAY env is set (normally its value is wayland-0).
Last edited by jonathanhrl on Tue Oct 29, 2024 7:12 pm, edited 3 times in total.
Masztufa
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Nov 02, 2024 6:56 pm
Contact:

Re: [raiguard] [2.0.11] Crash on Linux (X11_GL_SwapWindow)

Post by Masztufa »

Encountered a similar looking freeze/lockup on wayland KDE plasma

I was watching an ore patch dry up in map mode. It resulted in granting the achievement in game and in steam as well.
After the achievement triggered it locked up, and didn't seem to respond to signals. The music continued to play though.

It looks like that save (and steam) already has the achievement unlocked, so i'm not sure how to go about replicating it.
Just watching it deplete without getting the achievement was not enough.

Posted it here instead of elsewhere because the trace in log looks similar enough.
Attachments
crash.log
(13.96 KiB) Downloaded 13 times
jonathanhrl
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Oct 28, 2024 9:07 am
Contact:

Re: [raiguard] [2.0.11] Crash on Linux (X11_GL_SwapWindow)

Post by jonathanhrl »

Masztufa wrote: Sat Nov 02, 2024 7:05 pm ...
I was watching an ore patch dry up in map mode. It resulted in granting the achievement in game and in steam as well.
After the achievement triggered it locked up, and didn't seem to respond to signals. The music continued to play though.
...
Adding up to this, this is exactly what happened to me, achievement unlocked on Steam and the game at the same time and it froze right after.

I'm attaching the full gdb dump from that day, it has the stack trace of all threads (it didn't crash again the last few days, but I didn't play that much as well). I forgot to enable command logging so I commented what I did in the file itself.

The majority (if not all) of the threads seem to be stuck waiting on a Futex, some deadlock probably happened inside the engine, but it's just a guess.
Attachments
gdb-factorio-thread-dump.txt
Stack Trace of all threads with gdb commands "thread apply all bt" and "info threads", there's a continue in between the two "thread apply all bt" invocations, so if any thread made any progress, the stack trace would change between those two invocations.
(164.46 KiB) Downloaded 11 times
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 607
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard] [2.0.11] Crash on Linux (X11_GL_SwapWindow)

Post by raiguard »

The freeze-on-steam-achievement is a separate bug: 111743
Don't forget, you're here forever.
Post Reply

Return to “1 / 0 magic”