Page 1 of 1

[0.12.29] Crash on start if game doesn't have focus

Posted: Tue Mar 29, 2016 4:10 am
by Kirona
I've noticed that when I launch Factorio from Steam, but then click something else before it loads up (I multitask a lot, and tend to read or focus on other things while I wait for games to load in), Factorio crashes with the error message "failed to create display!"

If I don't click anything until after the loading window shows up, it's fine, but interrupting this causes issues. The Factorio window will flash very rapidly on my taskbar for about 10 seconds, then the game crashes. I can click the flashing bar at any point to avert the crash, though. It seems like the problem stems from Factorio not having focus when it actually goes to generate a display.

I know, I know, the easy fix is to be more patient - wait a few seconds for the load bar to pop up before going off to poke other stuff - but I figured it's better to report a bug and have it deemed unimportant than to not report the bug at all :P

Re: [0.12.29] Crash on start if game doesn't have focus

Posted: Tue Mar 29, 2016 5:32 am
by posila
Please reproduce the issue once again and post here the log located at %appdata%\Factorio\factorio-current.log

Re: [0.12.29] Crash on start if game doesn't have focus

Posted: Tue Mar 29, 2016 9:28 am
by TN_Creator
Same here. Once I see the loading bar and the factorio logo, I can focus elsewhere, but if the focus is not on the game right at the start when the screen is blank, I get this error.
I can post the log tonight if Kirona doesn't.

Re: [0.12.29] Crash on start if game doesn't have focus

Posted: Tue Mar 29, 2016 5:36 pm
by Killerbee
Succeeded in recreating the crash(Not Responding window) and attached the log.

I was able to easily recreate it by starting it from the steam context menu and starting the game and immediately clicking again on another window.
In my case I had my browser full screen and clicked on that window.
That will cause the game to run in the background and after a couple of seconds the game will stop responding.

Re: [0.12.29] Crash on start if game doesn't have focus

Posted: Wed Mar 30, 2016 1:00 pm
by posila
Seems to happen only under OpenGL... you can use --force-d3d to use DirectX renderer.

BTW. How long does it take for Factorio to create the window on your computer?

Re: [0.12.29] Crash on start if game doesn't have focus

Posted: Wed Mar 30, 2016 4:11 pm
by Killerbee
After Steam is done preparing Factorio the game window will appear almost instantly.
I was only able to reproduce the issue because of the delay caused by the Steam prepare popup.

Re: [0.12.29] Crash on start if game doesn't have focus

Posted: Thu Mar 31, 2016 6:33 am
by TN_Creator
Killerbee wrote:After Steam is done preparing Factorio the game window will appear almost instantly.
I was only able to reproduce the issue because of the delay caused by the Steam prepare popup.
same here
I often focus on my browser while steam prepares games.

Re: [0.12.29] Crash on start if game doesn't have focus

Posted: Sat Apr 02, 2016 2:38 am
by Kirona
Sorry for the slow reply, life kinda threw me a curveball. The log is attached here, though I see others have also attached logs for the same issue.
posila wrote:Seems to happen only under OpenGL... you can use --force-d3d to use DirectX renderer.

BTW. How long does it take for Factorio to create the window on your computer?
It looks like the DirectX argument fixes it, as the game actually takes focus when it launches unlike under the OpenGL renderer (honestly I kinda like when programs don't force themselves to the front on launch, but when stuff like this happens it reminds me of why they do~). As for the timing question, it takes roughly 1 second for the window to actually pop up, most of which is Steam's "preparing to launch" popup (which is when I'd click off into another program). The time between the "preparing to launch" popup closing and Factorio itself opening is near-instantaneous.

Re: [0.12.29] Crash on start if game doesn't have focus

Posted: Fri Aug 05, 2016 3:08 pm
by Loewchen