[0.16.51] Initialization stalls at "loading sounds" (Linux, sound-related)

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
Post Reply
thuejk
Fast Inserter
Fast Inserter
Posts: 113
Joined: Fri Feb 13, 2015 8:41 pm
Contact:

[0.16.51] Initialization stalls at "loading sounds" (Linux, sound-related)

Post by thuejk »

The context: When playing Factorio, I sometimes have a second instance of Factorio open, e.g. with creative mode to design blueprints.

The bug: Sometimes when starting the second instance of Factorio (or sometimes when loading a map in the second instance), the second instance will freeze. Usually at "Loading sounds". The process ignores sigint. Closing the first instance of Factorio will unfreeze the second instance.

This is on Ubuntu 18.04.1. The stall happens frequently, but is not 100% reproducible.

Output in the terminal of the stuck instance:
t@sh ~/factorio_copy> ./bin/x64/factorio
0.000 2018-11-19 02:37:21; Factorio 0.16.51 (build 36654, linux64, alpha)
0.083 Operating system: Linux (Ubuntu 18.04)
0.083 Program arguments: "./bin/x64/factorio"
0.083 Read data path: /home/thue/factorio_copy/data
0.083 Write data path: /home/thue/factorio_copy [58334/216903MB]
0.083 Binaries path: /home/thue/factorio_copy/bin
0.100 System info: [CPU: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz, 8 cores, RAM: 11986 MB]
0.100 Environment: DISPLAY=:0, WAYLAND_DISPLAY=<unset>
0.104 Display options: [FullScreen: 0] [VSync: 1] [UIScale: system (100.0%)] [MultiSampling: OFF] [Screen: 255] [Lang: en]
0.220 Available display adapters: 1
0.220 [0]: resolution 1600x1200px at [0,0]
0.220 Create display on adapter 0. Size 1280x720 at position [150, 222].
0.348 Initialised OpenGL:[0] AMD OLAND (DRM 2.50.0 / 4.15.0-39-generic, LLVM 6.0.0); driver: 3.0 Mesa 18.0.5
0.348 Video memory size (dedicated/total available/current available): 2048/4091/2044 MB
0.386 Graphics settings preset: high
0.386 Graphics options: [Graphics quality: normal] [Video memory usage: high] [Light scale: 100%] [DXT: false] [Shader: 1]
0.386 [Parallel sprite loading: 1] [Max texture size: 0/8192] [Bmp cache: 0] [Sprite slicing: 1] [Low quality rotation: 0]
0.551 Loading mod core 0.0.0 (data.lua)
0.578 Loading mod base 0.16.51 (data.lua)
0.776 Loading mod base 0.16.51 (data-updates.lua)
0.821 Checksum for core: 840319042
0.821 Checksum of base: 3323233190
1.031 Loading sounds...
1.258 Info PlayerData.cpp:65: Local player-data.json available, timestamp 1542583076
1.258 Info PlayerData.cpp:72: Cloud player-data.json unavailable
1.355 Loaded shader file /home/thue/factorio_copy/data/core/graphics/shaders/game.glsl
1.355 Loaded shader file /home/thue/factorio_copy/data/core/graphics/shaders/zoom-to-world.glsl
1.356 Loaded shader file /home/thue/factorio_copy/data/core/graphics/shaders/alpha-mask.glsl
1.375 Initial atlas bitmap size is 16384
1.419 Created atlas bitmap 16384x5940 [none]
1.430 Created atlas bitmap 16384x847 [shadow]
1.430 Created atlas bitmap 16384x682 [decal]
1.430 Created atlas bitmap 8192x1492 [mipmap]
1.438 Created atlas bitmap 8192x800 [mipmap, smoke]
1.454 Created atlas bitmap 8192x2376 [linear-minification, mipmap, terrain]
1.454 Created atlas bitmap 8192x1036 [no-crop, trilinear-filtering, icon, light]
1.455 Created atlas bitmap 8192x238 [alpha-mask]
14.003 Sprites loaded
14.003 Convert atlas 8192x1492 to: mipmap
14.145 Convert atlas 8192x800 to: mipmap
14.223 Convert atlas 8192x2376 to: min-linear
14.940 Convert atlas 8192x1036 to: trilinear-filtering
15.080 Convert atlas 8192x238 to: alpha-mask
15.181 Custom inputs active: 0
16.596 0 packages available to download (experimental updates enabled).
16.694 Factorio initialised [<----- is actually stalled at "loading sounds"]
^C 144.460 Received SIGINT, shutting down [Nothing happens]
^C 146.738 Received second SIGINT, terminating immediately [Nothing happens immediately]
^C^C^C^C^C^C [Nothing happens repeatably]
The end of the strace looks like this:
futex(0x320c754, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x320c700, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x3357478, FUTEX_WAIT_BITSET, 2, NULL, 0xffffffff0x2d722d8

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.16.51] Initialization stalls at "loading sounds" (Linux, sound-related)

Post by posila »

Thanks for the report.
I don't think we will fix this.
As a workaround, try to launch the second instance with --disable-audio command line parameter.

thuejk
Fast Inserter
Fast Inserter
Posts: 113
Joined: Fri Feb 13, 2015 8:41 pm
Contact:

Re: [0.16.51] Initialization stalls at "loading sounds" (Linux, sound-related)

Post by thuejk »

--disable-audio does not fix the stall. Perhaps it is not audio-related, in spite of stalling on "Loading sounds".

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.16.51] Initialization stalls at "loading sounds" (Linux, sound-related)

Post by posila »

Ah, I see. Unfortunatelly, running two instances of the game is very low priority at the moment.

You could try to run the second instance with lower graphics settings (try --low-vram command line parameter)

thuejk
Fast Inserter
Fast Inserter
Posts: 113
Joined: Fri Feb 13, 2015 8:41 pm
Contact:

Re: [0.16.51] Initialization stalls at "loading sounds" (Linux, sound-related)

Post by thuejk »

Yup, that seems to work!

It is fair enough that running 2 instances of Factorio is not your primary support case :). But the error mode (freeze) is quite unintuitive - you don't think that unintuitive error also happens when running only one instance, while having some other vram-hog programs open?

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.16.51] Initialization stalls at "loading sounds" (Linux, sound-related)

Post by posila »

I think freeze is not great for user experience, but it is not something we can control. If OpenGL call decides to hang instead of returning an error, it's not really something we can workaround (I just assume it hang in OpenGL)

BenSeidel
Filter Inserter
Filter Inserter
Posts: 584
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: [0.16.51] Initialization stalls at "loading sounds" (Linux, sound-related)

Post by BenSeidel »

Hi,
Just making sure, but are you running two instances from the same installation folder or from different folders. This can also include shared settings such as configs or blueprints.dat (via soft link) or other such things.

thuejk
Fast Inserter
Fast Inserter
Posts: 113
Joined: Fri Feb 13, 2015 8:41 pm
Contact:

Re: [0.16.51] Initialization stalls at "loading sounds" (Linux, sound-related)

Post by thuejk »

The instances are totally separate.

thuejk
Fast Inserter
Fast Inserter
Posts: 113
Joined: Fri Feb 13, 2015 8:41 pm
Contact:

Re: [0.16.51] Initialization stalls at "loading sounds" (Linux, sound-related)

Post by thuejk »

it is not something we can control. If OpenGL call decides to hang instead of returning an error, it's not really something we can workaround (I just assume it hang in OpenGL)
Since it mostly seems to hang in the same place, you could add a check for the amount of free vram before that, and then just error out if the amount is low. I assume OpenGL supports that.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.16.51] Initialization stalls at "loading sounds" (Linux, sound-related)

Post by posila »

I don't know if the second instance of the game was already running, before you started the one that you hang, but you can see, from what OpenGL reported about VRAM, it looks like the game should run just fine.

Code: Select all

0.348 Video memory size (dedicated/total available/current available): 2048/4091/2044 MB
In the past whenever somobody reported problems with starting the game, I adjusted default settings for range of similar HW hoping this would make the game better, but during testing of graphics rewrite in 0.17 I realized the graphics settings default to very unoptimal values for lot of low end hardware, so I am trying to get away from integrating general workarounds based on one-off issues.

Post Reply

Return to “Minor issues”