[1.1.91] Crashes when focused while switching video output

Place for things which are bugs but we have no idea how to solve them. Things related to hardware, libraries, strange setups, etc.
Post Reply
User avatar
Henriquelay
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Jun 28, 2020 9:12 pm
Contact:

[1.1.91] Crashes when focused while switching video output

Post by Henriquelay »

I use a KVM, and when I switch (video, HID including audio) when the game is focused, it crashes to desktop.
When the game is not focused, it does not crash.
Steps to reproduce
  1. Load up game
  2. Have it focused on your WM
  3. At any time, switch the KVM to other device
  4. Come back to Factorio device
  5. It has crashed
If step 2 is not realized, the game does not crash.

It is unclear if it crashed when switching out or switching in, but apparently on a quick read of the log, I would guess it is the former, since there is
SDL coudn't be initialized. SDL_Error: No available displays
Expected behavior
The game keeps running on my headless machine. Either "paused" or normally running without visuals.
My Setup
Steam download, 1.1.91, build 61680, linux64
Arch Linux, Sway, AMD Video card with AMDGPU-PRO (proprietary) drivers, single monitor connected on KVM through Displayport 1.2.

The logfile provided has mods applied but the crashes occur regardless of mods' presence. I haven't tried to replicate in Windows.
Attachments
factorio-previous.log
(3.48 KiB) Downloaded 28 times

User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 452
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [1.1.91] Crashes when focused while switching video output

Post by raiguard »

Thanks for the report. This specific crash is happening because SDL expects a display to exist when initializing the graphics subsystem. I don't think there's a good way to fix that. If you wait until the game window appears before switching your KVM then it should continue to work. At least, it did in my limited testing.
Don't forget, you're here forever.

Post Reply

Return to “1 / 0 magic”