[0.12] [linux] Segfault when resizing the game window

Things that we don't consider worth fixing at this moment.
Post Reply
Luchs
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Jul 26, 2015 10:18 am
Contact:

[0.12] [linux] Segfault when resizing the game window

Post by Luchs »

I'm on Linux using i3wm. Switching the game between fullscreen and windowed (standard binding $mod+f) sometimes produces a segfault:

Code: Select all

Factorio crashed. Generating symbolized stacktrace, please wait ...
 824.622 Warning Logger.cpp:315: Symbols.size() == 22, usedSize == 18
#0  0x7f21f6ba22f0 in ?? at ??:0
#1  0x7f21f4909b40 in ?? at ??:0
#2  0x7f21f4909bf3 in ?? at ??:0
#3  0x7f21f4910dfa in ?? at ??:0
#4  0x7f21f45eeaf5 in ?? at ??:0
#5  0x7f21f45f0e7d in ?? at ??:0
#6  0x7f21f45f1812 in ?? at ??:0
#7  0xb6b7cd in _al_ogl_setup_fbo at /tmp/factorio-b6tb5R/libraries/Allegro/src/opengl/ogl_fbo.c:280
#8  0xb69667 in _al_ogl_set_target_bitmap at /tmp/factorio-b6tb5R/libraries/Allegro/src/opengl/ogl_display.c:73
#9  0xb6ff75 in al_set_target_bitmap at /tmp/factorio-b6tb5R/libraries/Allegro/src/tls.c:432
#10 0x49c69b in GameRenderer::acknowledgeResize(short, short) at /tmp/factorio-b6tb5R/src/Graphics/GameRenderer.cpp:186
#11 0x9c878c in InGame::acknowledgeResize() at /tmp/factorio-b6tb5R/src/GameView.cpp:433
#12 0x8ebeb8 in acknowledgeResize at /tmp/factorio-b6tb5R/src/Game.cpp:103
#13 0x9e2136 in acknowledgeResize at /tmp/factorio-b6tb5R/src/AppManagerStates.cpp:75
#14 0x9f4fe3 in AppManager::acknowledgeResize() at /tmp/factorio-b6tb5R/src/AppManager.cpp:353
#15 0xa45006 in MainLoop::processAllegroEvents(bool) at /tmp/factorio-b6tb5R/src/MainLoop.cpp:79
#16 0x7f21f6b8da40 in processAllegroEvents at /tmp/factorio-b6tb5R/src/MainLoop.cpp:159
#17 0x40a419 in MainLoop::run(boost::filesystem::path const&, boost::filesystem::path const&, bool, bool) [clone .constprop.49814] at /tmp/factorio-b6tb5R/src/MainLoop.cpp:426
 824.622 Error Util.cpp:45: Unexpected error occurred. You can help us to solve the problem by posting the contents of the log file on the Factorio forums.
[1]    26609 segmentation fault (core dumped)  games/factorio/bin/x64/factorio
This seems to happen mainly when switching while the game is loading.

Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: Segfault when resizing the game window

Post by Oxyd »

Does this only happen with i3? What distribution do you use? What graphics card and what drivers do you use?

Luchs
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Jul 26, 2015 10:18 am
Contact:

Re: Segfault when resizing the game window

Post by Luchs »

Sorry, I hoped you could figure it out with the stacktrace only. ;)

>Does this only happen with i3?

I'm only using i3, so I don't know. I also don't have a way to reproduce it reliably, although it has happened a few times now.

>What distribution do you use?

Ubuntu 15.04

>What graphics card and what drivers do you use?

NVIDIA GTS 450 with the proprietary drivers, version 346.59

Edit: I just tried reproducing it again. The crash seems to happen when resizing after loading the map finished, but before (or shortly after?) the first frame from ingame is rendered. Here's the backtrace from gdb:

Code: Select all

[New Thread 0x7fffddff3700 (LWP 13065)]
[New Thread 0x7fffdeff5700 (LWP 13058)]
[New Thread 0x7fffdfbff700 (LWP 13057)]
[New Thread 0x7fffe5cde700 (LWP 13046)]
[New Thread 0x7fffe64df700 (LWP 13045)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3cc0da6 in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
(gdb) bt
#0  0x00007ffff3cc0da6 in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#1  0x00007ffff3cc11bb in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#2  0x00007ffff3cc1217 in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#3  0x00007ffff3aa60bb in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#4  0x00007ffff3aa61e3 in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#5  0x00007ffff3aa627b in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#6  0x00007ffff3aa62b9 in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#7  0x00007ffff3bb6a98 in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#8  0x00007ffff3aa0b41 in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#9  0x0000000000b69ac9 in ogl_update_transformation (disp=<optimized out>, target=0x14c73a0) at src/opengl/ogl_draw.c:494
#10 0x0000000000bbc3de in xdpy_acknowledge_resize (d=0x12cec10) at src/x/xdisplay.c:804
#11 0x00000000009e2113 in processAllegroEvent () at src/MainLoop.cpp:77
#12 processAllegroEvents () at src/MainLoop.cpp:159
#13 0x00000000009f4fe3 in tickStep () at src/MainLoop.cpp:426
#14 run () at src/MainLoop.cpp:533
#15 0x0000000000a45006 in main () at src/Main.cpp:398
At the point where the debugger stopped the process, the game had rendered an ingame frame, so loading was definitely finished.

Hope this helps! Let me know if you need anything else.

Edit2: It also seems to crash when just going in and out of fullscreen repeatedly while the game is running. In this case, the backtrace looks like this:

Code: Select all

#0  0x00007ffff3cbeb40 in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#1  0x00007ffff3cbebf3 in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#2  0x00007ffff3cc5dfa in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#3  0x00007ffff39a3af5 in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#4  0x00007ffff39a5e7d in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#5  0x00007ffff39a6812 in ?? () from /usr/lib/nvidia-346/libnvidia-glcore.so.346.59
#6  0x0000000000b6b7cd in _al_ogl_bind_framebuffer (fbo=0) at src/opengl/ogl_fbo.c:85
#7  setup_fbo_backbuffer (display=0x12cec10, bitmap=<optimized out>) at src/opengl/ogl_fbo.c:293
#8  _al_ogl_setup_fbo (display=display@entry=0x12cec10, bitmap=<optimized out>, bitmap@entry=0x14c73a0) at src/opengl/ogl_fbo.c:277
#9  0x0000000000b69667 in _al_ogl_set_target_bitmap (display=0x12cec10, bitmap=0x14c73a0) at src/opengl/ogl_display.c:72
#10 0x0000000000b6ff75 in al_set_target_bitmap (bitmap=0x14c73a0) at src/tls.c:426
#11 0x000000000049c69b in acknowledgeResize () at src/Graphics/GameRenderer.cpp:187
#12 0x00000000009c878c in acknowledgeResize () at src/GameView.cpp:432
#13 acknowledgeResize () at src/Game.cpp:103
#14 acknowledgeResize () at src/AppManagerStates.cpp:75
#15 0x00000000008ebeb8 in acknowledgeResize () at src/AppManager.cpp:355
#16 0x00000000009e2136 in processAllegroEvent () at src/MainLoop.cpp:79
#17 processAllegroEvents () at src/MainLoop.cpp:159
#18 0x00000000009f4fe3 in tickStep () at src/MainLoop.cpp:426
#19 run () at src/MainLoop.cpp:533
#20 0x0000000000a45006 in main () at src/Main.cpp:398
Toggling between fullscreen and windowed in the main menu never crashes.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.12] [linux] Segfault when resizing the game window

Post by kovarex »

Hello, why don't you post the complete log?

Luchs
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Jul 26, 2015 10:18 am
Contact:

Re: [0.12] [linux] Segfault when resizing the game window

Post by Luchs »

It didn't look interesting.

Code: Select all

   0.000  Info Main.cpp:150: Program arguments: "games/factorio/bin/x64/factorio"
   0.001 2015-07-30 19:53:33; Factorio 0.12.1 (Build 16116, linux64)
   0.001 Operating system: Linux
   0.001 Read data path: /home/lukas/games/factorio/data
   0.001 Write data path: /home/lukas/games/factorio
   0.001 Binaries path: /home/lukas/games/factorio/bin
   0.002 Info LocaleProvider.cpp:282: Language en is LTR
   0.002 Info LocaleProvider.cpp:282: Language en is LTR
   0.605 Graphics options: [FullScreen: false] [VSync: false] [UIScale: 100%] [MultiSampling: X 2] [Graphics quality: normal] [Video memory usage: all]
   0.660 Loading mod core 0.0.0 (data.lua)
   0.666 Loading mod base 0.12.1 (data.lua)
   1.205 Info LocaleProvider.cpp:282: Language en is LTR
   1.205 Info LocaleProvider.cpp:282: Language en is LTR
   1.207 Info LocaleProvider.cpp:282: Language en is LTR
   1.207 Info LocaleProvider.cpp:282: Language en is LTR
   1.320 Initial atlas bitmap size is 16384
   1.324 Created atlas bitmap 16384x7660
  13.302 Info Updater.cpp:720: Downloading https://www.factorio.com/updater/get-available-versions?username=Luchs&token=<private>&apiVersion=2
  14.183 0 packages available to download (experimental updates enabled).
  14.223 Factorio initialised
  32.942 Loading map /home/lukas/games/factorio/saves/_autosave1.zip
  33.038 Info Scenario.cpp:160: Map version 0.12.1-4
  37.502 Warning Logger.cpp:315: Symbols.size() == 23, usedSize == 19
Factorio crashed. Generating symbolized stacktrace, please wait ...
  38.248 Warning Logger.cpp:315: Symbols.size() == 22, usedSize == 18
#0  0x7fe5817942f0 in ?? at ??:0
#1  0x7fe57f4fbb40 in ?? at ??:0
#2  0x7fe57f4fbbf3 in ?? at ??:0
#3  0x7fe57f502dfa in ?? at ??:0
#4  0x7fe57f1e0af5 in ?? at ??:0
#5  0x7fe57f1e2e7d in ?? at ??:0
#6  0x7fe57f1e3812 in ?? at ??:0
#7  0xb6b7cd in _al_ogl_setup_fbo at /tmp/factorio-b6tb5R/libraries/Allegro/src/opengl/ogl_fbo.c:280
#8  0xb69667 in _al_ogl_set_target_bitmap at /tmp/factorio-b6tb5R/libraries/Allegro/src/opengl/ogl_display.c:73
#9  0xb6ff75 in al_set_target_bitmap at /tmp/factorio-b6tb5R/libraries/Allegro/src/tls.c:432
#10 0x49c69b in GameRenderer::acknowledgeResize(short, short) at /tmp/factorio-b6tb5R/src/Graphics/GameRenderer.cpp:186
#11 0x9c878c in InGame::acknowledgeResize() at /tmp/factorio-b6tb5R/src/GameView.cpp:433
#12 0x8ebeb8 in acknowledgeResize at /tmp/factorio-b6tb5R/src/Game.cpp:103
#13 0x9e2136 in acknowledgeResize at /tmp/factorio-b6tb5R/src/AppManagerStates.cpp:75
#14 0x9f4fe3 in AppManager::acknowledgeResize() at /tmp/factorio-b6tb5R/src/AppManager.cpp:353
#15 0xa45006 in MainLoop::processAllegroEvents(bool) at /tmp/factorio-b6tb5R/src/MainLoop.cpp:79
#16 0x7fe58177fa40 in processAllegroEvents at /tmp/factorio-b6tb5R/src/MainLoop.cpp:159
#17 0x40a419 in MainLoop::run(boost::filesystem::path const&, boost::filesystem::path const&, bool, bool) [clone .constprop.49814] at /tmp/factorio-b6tb5R/src/MainLoop.cpp:426
  38.248 Error Util.cpp:45: Unexpected error occurred. You can help us to solve the problem by posting the contents of the log file on the Factorio forums.
[1]    14609 segmentation fault (core dumped)  games/factorio/bin/x64/factorio

Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [0.12] [linux] Segfault when resizing the game window

Post by Oxyd »

Can you try upgrading your NVidia drivers and see if that fixes it? I use version 352.21 on my office computer and I haven't been able to reproduce this crash even once.

Luchs
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Jul 26, 2015 10:18 am
Contact:

Re: [0.12] [linux] Segfault when resizing the game window

Post by Luchs »

Thanks for your help, upgrading the driver to 352.30 fixed the issue. I wasn't aware that there is a newer version as the official ubuntu repositories only seem to package older versions of the driver.

Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [0.12] [linux] Segfault when resizing the game window

Post by Oxyd »

Yes, Ubuntu likes to ship old software, which can be a problem in cases like this.

Since updating your driver fixed it, I'm going to call this an NVidia bug rather than Factorio bug and move this to Won't Fix. If someone can reproduce this with up-to-date drivers, I'll move it back.

Post Reply

Return to “Won't fix.”