[0.17.56] Blue Flash on window focus loss with "Use flip presentation model"

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
pcmaster160
Inserter
Inserter
Posts: 26
Joined: Wed Oct 23, 2013 12:51 pm
Contact:

[0.17.56] Blue Flash on window focus loss with "Use flip presentation model"

Post by pcmaster160 »

I'm on Windows 10, I have 3 monitors connected, all are different resolutions but the one I play Factorio on is 4k with DPI scaling. When I have "Use flip presentation model" enabled and select a window other than Factorio there is 1 frame with a "blue flash". The flash does not occur when I am recording with OBS so I am unable to post a screenshot but it does not make the entire frame blue but rather puts a blue hue on everything. It is similar to the "red flash" when your player gets hurt. If I am on the settings menu when I select another window the normally orange checkboxes turn blue.

This occurs when "focusing" a window other than factorio (selecting it) and when "focusing" factorio when another window was selected. It does not happen when "Use flip presentation model" is disabled. It also does not happen when "Use flip presentation model" is enabled and OBS is recording with a source of the 4k monitor (but does occur when the source is another monitor).

Graphics Settings:
Image

Hardware:
GPU: AMD 270x 2gb
CPU: Intel i7-7700

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

Re: [0.17.56] Blue Flash on window focus loss with "Use flip presentation model"

Post by posila »

Thank you for taking the time to report the issue.
Please post also your log. Press Win + R, type in %APPDATA%\Factorio and click OK. File Explorer should open and you should see file called factorio-current.log.
pcmaster160 wrote:
Sun Jul 14, 2019 8:13 pm
If I am on the settings menu when I select another window the normally orange checkboxes turn blue.
Does it look like this?
bgr.png
bgr.png (336.25 KiB) Viewed 1688 times

pcmaster160
Inserter
Inserter
Posts: 26
Joined: Wed Oct 23, 2013 12:51 pm
Contact:

Re: [0.17.56] Blue Flash on window focus loss with "Use flip presentation model"

Post by pcmaster160 »

Yes! It looks just like that!

Log is attached.
Attachments
factorio-current.log
(5.3 KiB) Downloaded 78 times

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

Re: [0.17.56] Blue Flash on window focus loss with "Use flip presentation model"

Post by posila »

Thanks. I have created that image by swapping red and blue color channel. So my hypothesis is that for some reason (probably some kind of under-the-hood optimization) DirectX or the graphics driver decides to render image in BGR color format instead of RGB, and when the game loses focus, this optimization is turned off, but there was already prepared next frame for presentation in the wrong format, so it gets incorrectly presented with red and blue color channels swapped.

Thank you again for reporting the issue, it's good for us to be aware of all weird things that might happen and know how to workaround them (turning off flip presentation model in this case)

Post Reply

Return to “1 / 0 magic”