[posila][0.15.16]Factorio tries to create display too often

This subforum contains all the issues which we already resolved.
Bilka
Factorio Staff
Factorio Staff
Posts: 3305
Joined: Sat Aug 13, 2016 9:20 am
Contact:

[posila][0.15.16]Factorio tries to create display too often

Post by Bilka »

My graphics driver is broken in some way which makes most games not start. When I tried to open Factorio it tried to create the window, which failed because of my broken drivers. The actual bug is that for some reason the game then tried to create the display over and over and over and over again, for maybe a minute or longer. I even managed to get a video of that happening. As you can see, the game then crashes "properly".

The log shows this behaviour:

Code: Select all

   0.010 2017-05-28 15:52:07; Factorio 0.15.16 (build 30063, win64, steam)
   0.010 Operating system: Windows 10 (version 1607) 
   [...]
   0.032 System info: [CPU: AMD A10-5745M APU with Radeon(tm) HD Graphics  , 4 cores, RAM: 11462MB]
   0.047 Display options: [FullScreen: 0] [VSync: 0] [UIScale: 81%] [MultiSampling: OFF] [Screen: 0]
   0.049 Available display adapters: 2
   0.049  [0]: \\.\DISPLAY46 - AMD Radeon HD 8610G + HD 8670M Dual Graphics {0x05, [0,0], 1366x768, 32bit, 60Hz}
   0.050  [1]: \\.\DISPLAY47 - AMD Radeon HD 8610G + HD 8670M Dual Graphics {0x8000001, [-1280,0], 1280x1024, 32bit, 60Hz}
   0.050 Create display on adapter 0. Size 1280x720 at position [33, 6].
   0.995 D3DPRESENT_PARAMETERS: fmt=0x16{0x17}; w=1280,h=720,Hz=0; ads=0;pi=0x80000000;ms=0;swap=1;flags=1
   0.995 CreateDevice(HAL, D3DCREATE_HARDWARE_VERTEXPROCESSING) failed: D3DERR_DEVICELOST[-2005530520]
   1.068 CreateDevice(HAL, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_DEVICELOST[-2005530520]
   1.306 CreateDevice(REF, HARDWARE_VERTEXPROCESSING) failed: D3DERR_DEVICELOST[-2005530520]
   1.429 CreateDevice(REF, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_DEVICELOST[-2005530520]
   1.429 CreateDevice failed: D3DERR_DEVICELOST

   1.613 D3DPRESENT_PARAMETERS: fmt=0x16{0x17}; w=1280,h=720,Hz=0; ads=0;pi=0x80000000;ms=0;swap=1;flags=1
   1.613 CreateDevice(HAL, D3DCREATE_HARDWARE_VERTEXPROCESSING) failed: D3DERR_DEVICELOST[-2005530520]
   1.712 CreateDevice(HAL, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_DEVICELOST[-2005530520]
   1.862 CreateDevice(REF, HARDWARE_VERTEXPROCESSING) failed: D3DERR_DEVICELOST[-2005530520]
   1.994 CreateDevice(REF, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_DEVICELOST[-2005530520]
   1.994 CreateDevice failed: D3DERR_DEVICELOST

   2.163 D3DPRESENT_PARAMETERS: fmt=0x16{0x17}; w=1280,h=720,Hz=0; ads=1;pi=0x80000000;ms=0;swap=1;flags=1
   2.163 CreateDevice(HAL, D3DCREATE_HARDWARE_VERTEXPROCESSING) failed: D3DERR_DEVICELOST[-2005530520]
   2.264 CreateDevice(HAL, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_DEVICELOST[-2005530520]
   2.406 CreateDevice(REF, HARDWARE_VERTEXPROCESSING) failed: D3DERR_DEVICELOST[-2005530520]
   2.545 CreateDevice(REF, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_DEVICELOST[-2005530520]
   2.545 CreateDevice failed: D3DERR_DEVICELOST

   [...]

  98.310 D3DPRESENT_PARAMETERS: fmt=0x17{0xd}; w=1280,h=720,Hz=0; ads=1;pi=0x1;ms=1;swap=3;flags=0
  98.310 CreateDevice(HAL, D3DCREATE_HARDWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  98.310 CreateDevice(HAL, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  98.403 CreateDevice(REF, HARDWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  98.481 CreateDevice(REF, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  98.481 CreateDevice failed: D3DERR_INVALIDCALL

  98.679 D3DPRESENT_PARAMETERS: fmt=0x17{0xd}; w=1280,h=720,Hz=0; ads=1;pi=0x1;ms=1;swap=3;flags=0
  98.679 CreateDevice(HAL, D3DCREATE_HARDWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  98.679 CreateDevice(HAL, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  98.898 CreateDevice(REF, HARDWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  98.988 CreateDevice(REF, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  98.988 CreateDevice failed: D3DERR_INVALIDCALL

  99.120 D3DPRESENT_PARAMETERS: fmt=0x17{0xd}; w=1280,h=720,Hz=0; ads=1;pi=0x1;ms=1;swap=3;flags=0
  99.120 CreateDevice(HAL, D3DCREATE_HARDWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  99.120 CreateDevice(HAL, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  99.211 CreateDevice(REF, HARDWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  99.322 CreateDevice(REF, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  99.322 CreateDevice failed: D3DERR_INVALIDCALL

  99.452 D3DPRESENT_PARAMETERS: fmt=0x17{0xd}; w=1280,h=720,Hz=0; ads=1;pi=0x1;ms=1;swap=3;flags=0
  99.452 CreateDevice(HAL, D3DCREATE_HARDWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  99.452 CreateDevice(HAL, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  99.531 CreateDevice(REF, HARDWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  99.660 CreateDevice(REF, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  99.660 CreateDevice failed: D3DERR_INVALIDCALL

  99.853 D3DPRESENT_PARAMETERS: fmt=0x17{0xd}; w=1280,h=720,Hz=0; ads=1;pi=0x1;ms=1;swap=3;flags=0
  99.853 CreateDevice(HAL, D3DCREATE_HARDWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
  99.853 CreateDevice(HAL, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
 100.051 CreateDevice(REF, HARDWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
 100.176 CreateDevice(REF, SOFTWARE_VERTEXPROCESSING) failed: D3DERR_INVALIDCALL[-2005530516]
 100.177 CreateDevice failed: D3DERR_INVALIDCALL

 100.179 d3d_create_display failed.

 100.179 Failed to create display (NULL)

 100.180 Error Util.cpp:62: failed to create display!
 117.643 Steam API shutdown.
 117.648 Goodbye
I attached the full log but it doesn't show much more than what I copied here.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

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

Re: [0.15.16] Factorio tries to create display too often

Post by posila »

Thanks for the report.
This is how Allegro behaves when it fails to initialize DirectX, it tries again with slightly different parameters until it goes through all display modes supported by an adapter. Problem is it destroys window after failure and creates new one for next attempt. It can't be changed easily to behave differently. I could maybe disable retrying ... as this behavior might be health risk, I think.

Bilka
Factorio Staff
Factorio Staff
Posts: 3305
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [0.15.16][posila] Factorio tries to create display too often

Post by Bilka »

Another problem with this is that the windows takes the focus whenever it is recreated, so using your PC while this is happening is neigh impossible unless you have multiple monitors.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

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

Re: [posila][0.15.16]Factorio tries to create display too often

Post by posila »

For 0.15.26 I made two changes about this issue. From Allegro main repository I cherrypicked a change about clearing window to black instead of white, so it doesn't flash white when trying to create device.
The second change is an attempt to filter display modes it will try to initialize, so it doesn't try every possible combination of settings, but just those that your device might actually support.

Post Reply

Return to “Resolved Problems and Bugs”