[posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED (MR)

Bugs that are actually features.
bhodi
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Feb 27, 2019 1:19 am
Contact:

[posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED (MR)

Post by bhodi »

Game seems to crash on load for me, in various stages of startup but all with a similar error. I tried a fresh reinstall with removal of user data, unplugging and plugging in various monitors. The meat of the matter is below; full dxdiag and two different startup logs are in the pastebin links.

Code: Select all

 1.934 Loading sounds...
   1.982 Info PlayerData.cpp:69: Local player-data.json unavailable
   1.982 Info PlayerData.cpp:72: Cloud player-data.json available, timestamp 1551229216
   2.587 Initial atlas bitmap size is 16384
   3.655 D3D11_ERROR: ID3D11Device::CreateTexture2D failed in createInternalTexture on line 240. Error [0x887a0005] - DXGI_ERROR_DEVICE_REMOVED
   3.655 > TextureDesc: Width=16384, Height=16380, MipLevels=1, ArraySize=1, Format=77, Usage=0, BindFlags=8, CPUAccessFlags=0, MiscFlags=0
   3.655 Error Util.cpp:75: Failed to create a texture.
  12.604 DSound: Stopping voice
  12.604 DSound: Joining thread

Code: Select all

   2.609 Created atlas bitmap 16384x748 [alpha-mask]
   2.611 Created atlas bitmap 16384x12636 [shadow, linear-magnification, alpha-mask]
   2.611 Created atlas bitmap 16384x1264 [shadow, mipmap, linear-magnification, alpha-mask]
   5.255 D3D11_ERROR: IDXGISwapChain::Present failed in swapBuffers on line 1267. Error [0x887a0005] - DXGI_ERROR_DEVICE_REMOVED
   5.255 D3D11_ERROR: ID3D11Device::GetDeviceRemovedReason failed in swapBuffers on line 1277. Error [0x887a0007] - DXGI_ERROR_DEVICE_RESET
   5.323 Error Util.cpp:75: Swap buffers failed.

IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED (0x887a0005)

Reason: DXGI_ERROR_DEVICE_RESET (0x887a0007)
  10.543 DSound: Stopping voice
  10.543 DSound: Joining thread
https://pastebin.com/geNp5FG8
https://pastebin.com/sHWG3jKQ

DxDiag: https://pastebin.com/k5j9i39i
bhodi
Manual Inserter
Manual Inserter
Posts: 2
Joined: Wed Feb 27, 2019 1:19 am
Contact:

Re: [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by bhodi »

A reboot fixed it. ¯\_(ツ)_/¯
Penguinator
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Feb 27, 2019 6:00 am
Contact:

Re: [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by Penguinator »

I experienced this error too, after loading 0.17.1 for the first time, converting a 0.16 save and playing for a short amount of time.
I'll try a reboot and see how it goes.

Here's the log, in case it's useful to anyone (edited out Windows user name from paths out of being paranoid about these things):

Code: Select all

29.962 Factorio initialised
  30.150 Info HttpSharedState.cpp:54: Downloading https://updater.factorio.com/updater/get-available-versions?username=singapeng&token=<private>&apiVersion=2
  31.121 Info HttpSharedState.cpp:147: Status code: 200
  31.124 0 packages available to download (experimental updates enabled).
  56.404 Loading map C:\.........\AppData\Roaming\Factorio\saves\big_base_016_02.zip: 37090003 bytes.
  57.098 Loading Level.dat: 78638089 bytes.
  57.126 Info Scenario.cpp:147: Map version 0.16.51-0
  57.142 Info PrototypeMigrationList.cpp:60: Activating migration base/2018-05-22_Factorio_0.17.0.json
  57.142 Info PrototypeMigrationList.cpp:60: Activating migration base/2018-06-12_Factorio_0.17.0.json
  57.142 Info PrototypeMigrationList.cpp:60: Activating migration base/2018-12-21_Factorio_0.17.0.json
  57.142 Info PrototypeMigrationList.cpp:60: Activating migration base/2018-12-27_Factorio_0.17.0.json
  86.248 Loading script.dat: 209 bytes.
  86.262 Checksum for script C:/........./AppData/Roaming/Factorio/temp/currently-playing/control.lua: 750731385
  86.263 Applying migration: Base Mod: 2018-08-03_Factorio_0.17.0.lua
  86.301 Applying migration: Base Mod: 2018-08-14_Factorio_0.17.0.lua
  86.305 Applying migration: Base Mod: 2018-10-25_Factorio_0.17.0.lua
  86.700 Checksum for script C:/........./AppData/Roaming/Factorio/temp/currently-playing/control.lua: 2366710471
  86.722 Script @C:/Program Files/Factorio/data/core/lualib/silo-script.lua:43: Running silo script migration: 2 -> 3
  86.722 Script @C:/Program Files/Factorio/data/core/lualib/silo-script.lua:34: Executing 0.17 GUI update
 313.365 D3D11_ERROR: IDXGISwapChain::Present failed in swapBuffers on line 1267. Error [0x887a0005] - DXGI_ERROR_DEVICE_REMOVED
 313.365 D3D11_ERROR: ID3D11Device::GetDeviceRemovedReason failed in swapBuffers on line 1277. Error [0x00000000] - S_OK
 313.372 Error Util.cpp:75: Swap buffers failed.

IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED (0x887a0005)

Reason: S_OK (0x00000000)
 336.059 DSound: Stopping voice
 336.059 DSound: Joining thread
 336.062 DSound: Exit _dsound_update; tid=41696
 336.062 DSound: Waiting for voice to stop ... signaled
 336.063 DSound: Joined thread
 336.063 DSound: Destroying thread
 336.063 DSound: Thread destroyed
 336.063 DSound: Releasing buffer
 336.063 DSound: Voice stopped
 336.064 DSound: Deallocating voice
 336.064 DSound: Deallocated voice
 336.298 Goodbye
Penguinator
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Feb 27, 2019 6:00 am
Contact:

Re: [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by Penguinator »

Happened again although I went further this time. Exact same error.
Those are my first two factorio crashes ever I think!

Code: Select all

 793.155 Info AppManager.cpp:266: Saving to _autosave1 (blocking).
 801.755 Info AppManagerStates.cpp:1756: Saving finished
1795.847 Info AppManager.cpp:266: Saving to _autosave2 (blocking).
1805.339 Info AppManagerStates.cpp:1756: Saving finished
2192.630 D3D11_ERROR: IDXGISwapChain::Present failed in swapBuffers on line 1267. Error [0x887a0005] - DXGI_ERROR_DEVICE_REMOVED
2192.631 D3D11_ERROR: ID3D11Device::GetDeviceRemovedReason failed in swapBuffers on line 1277. Error [0x00000000] - S_OK
2192.632 Error Util.cpp:75: Swap buffers failed.

IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED (0x887a0005)
posila
Factorio Staff
Factorio Staff
Posts: 5346
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by posila »

Penguinator wrote: Wed Feb 27, 2019 6:58 am Happened again although I went further this time. Exact same error.
Those are my first two factorio crashes ever I think!

Code: Select all

 793.155 Info AppManager.cpp:266: Saving to _autosave1 (blocking).
 801.755 Info AppManagerStates.cpp:1756: Saving finished
1795.847 Info AppManager.cpp:266: Saving to _autosave2 (blocking).
1805.339 Info AppManagerStates.cpp:1756: Saving finished
2192.630 D3D11_ERROR: IDXGISwapChain::Present failed in swapBuffers on line 1267. Error [0x887a0005] - DXGI_ERROR_DEVICE_REMOVED
2192.631 D3D11_ERROR: ID3D11Device::GetDeviceRemovedReason failed in swapBuffers on line 1277. Error [0x00000000] - S_OK
2192.632 Error Util.cpp:75: Swap buffers failed.

IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED (0x887a0005)
Can you post entire log, please? I want to know what's your OS, GPU, driver version, graphics settings etc. etc.
Penguinator
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Feb 27, 2019 6:00 am
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by Penguinator »

Sure, here you go:

Code: Select all

   0.007 2019-02-26 22:14:53; Factorio 0.17.1 (build 43001, win64, alpha)
   0.008 Operating system: Windows 10 (version 1803) 
   0.009 Program arguments: "C:\Program Files\Factorio\bin\x64\factorio.exe" 
   0.009 Read data path: C:/Program Files/Factorio/data
   0.009 Write data path: C:/........./AppData/Roaming/Factorio [211184/473286MB]
   0.009 Binaries path: C:/Program Files/Factorio/bin
   0.121 System info: [CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 8 cores, RAM: 3731/16245 MB, page: 3716/18677 MB, virtual: 4249/134217727 MB, extended virtual: 0 MB]
   0.121 Display options: [FullScreen: 1] [VSync: 0] [UIScale: automatic (100.0%)] [MultiSampling: OFF] [Screen: 255] [Lang: en]
   0.160 Available displays: 1
   0.161  [0]: \\.\DISPLAY1 - Intel(R) HD Graphics 530 {0x05, [0,0], 1920x1080, 32bit, 59Hz}
   0.327 Display: 0 -> Adapter: 0, Output: 0
   1.156 Initialised Direct3D[0]: NVIDIA GeForce GTX 960M; driver: nvldumdx.dll 23.21.13.9125
   1.156   D3D Feature Level: 11.0, DXGI 1.5+
   1.157   [Local Video Memory] Budget: 1708MB, CurrentUsage: 1MB, Reservation: 0/904MB
   1.157   [Non-Local Vid.Mem.] Budget: 7310MB, CurrentUsage: 0MB, Reservation: 0/3858MB
   1.157   Tiled resources: Tier 1
   1.157   Unified Memory Architecture: No
   1.157   BGR 565 Supported: Yes
   1.157   MaximumFrameLatency: 3, GPUThreadPriority: 0
   1.626 Desktop composition is active.
   1.627 Graphics settings preset: very-high
   1.627   Dedicated video memory size 2010 MB
   1.627 Graphics options: [Graphics quality: normal] [Video memory usage: high] [Light scale: 25%] [DXT: high-quality]
   1.627                   [Max load threads: 32] [Max texture size: 0] [Tex.Stream.: 1] [Low quality rotation: 0]
   2.004 DSound: Starting _dsound_update thread
   2.005 DSound: Enter _dsound_update; tid=11516
   3.139 Loading mod core 0.0.0 (data.lua)
   4.211 Loading mod base 0.17.1 (data.lua)
   8.514 Loading mod base 0.17.1 (data-updates.lua)
   9.065 Checksum for core: 1014885620
   9.065 Checksum of base: 819815259
  11.662 Loading sounds...
  20.179 Info PlayerData.cpp:67: Local player-data.json available, timestamp 1551246590
  20.179 Info PlayerData.cpp:74: Cloud player-data.json unavailable
  20.838 Initial atlas bitmap size is 16384
  20.852 Created atlas bitmap 16384x6216 [none]
  20.853 Created atlas bitmap 16384x688 [decal]
  20.857 Created atlas bitmap 16384x1104 [low-object]
  20.859 Created atlas bitmap 16384x656 [mipmap, linear-minification, linear-magnification, linear-mip-level, no-crop, no-scale]
  20.862 Created atlas bitmap 16384x2096 [terrain, mipmap, linear-minification, linear-mip-level, no-crop]
  20.862 Created atlas bitmap 16384x480 [smoke, mipmap, linear-minification, linear-magnification]
  20.865 Created atlas bitmap 16384x456 [not-compressed, mipmap, linear-minification, linear-magnification, linear-mip-level, no-crop, no-scale]
  20.867 Created atlas bitmap 16384x216 [alpha-mask]
  20.877 Created atlas bitmap 16384x3688 [shadow, linear-magnification, alpha-mask]
  20.878 Created atlas bitmap 16384x384 [shadow, mipmap, linear-magnification, alpha-mask]
  21.231 Created virtual atlas pages 4096x4096x3
  34.509 Parallel Sprite Loader initialized (threads: 7)
  44.621 Sprites loaded
  44.889 Generated mipmaps for atlas of size 16384x1104
  44.945 Generated mipmaps for atlas of size 16384x656
  44.979 Generated mipmaps for atlas of size 16384x2096
  45.011 Generated mipmaps for atlas of size 16384x480
  45.033 Generated mipmaps for atlas of size 16384x456
  45.055 Generated mipmaps for atlas of size 16384x384
  45.228 Generated mipmaps for virtual atlas of size 4096x12288
  45.248 Custom inputs active: 0
  45.514 Factorio initialised
  45.519 Info HttpSharedState.cpp:54: Downloading https://updater.factorio.com/updater/get-available-versions?username=singapeng&token=<private>&apiVersion=2
  46.932 Info HttpSharedState.cpp:147: Status code: 200
  46.935 0 packages available to download (experimental updates enabled).
  53.820 Loading map C:\Users\olivier\AppData\Roaming\Factorio\saves\big_base_016_02.zip: 37090003 bytes.
  54.699 Loading Level.dat: 78638089 bytes.
  54.733 Info Scenario.cpp:147: Map version 0.16.51-0
  54.750 Info PrototypeMigrationList.cpp:60: Activating migration base/2018-05-22_Factorio_0.17.0.json
  54.750 Info PrototypeMigrationList.cpp:60: Activating migration base/2018-06-12_Factorio_0.17.0.json
  54.750 Info PrototypeMigrationList.cpp:60: Activating migration base/2018-12-21_Factorio_0.17.0.json
  54.750 Info PrototypeMigrationList.cpp:60: Activating migration base/2018-12-27_Factorio_0.17.0.json
  95.193 Loading script.dat: 209 bytes.
  95.263 Checksum for script C:/........./AppData/Roaming/Factorio/temp/currently-playing/control.lua: 750731385
  95.264 Applying migration: Base Mod: 2018-08-03_Factorio_0.17.0.lua
  95.327 Applying migration: Base Mod: 2018-08-14_Factorio_0.17.0.lua
  95.351 Applying migration: Base Mod: 2018-10-25_Factorio_0.17.0.lua
  96.501 Checksum for script C:/........./AppData/Roaming/Factorio/temp/currently-playing/control.lua: 2366710471
  96.524 Script @C:/Program Files/Factorio/data/core/lualib/silo-script.lua:43: Running silo script migration: 2 -> 3
  96.524 Script @C:/Program Files/Factorio/data/core/lualib/silo-script.lua:34: Executing 0.17 GUI update
 793.155 Info AppManager.cpp:266: Saving to _autosave1 (blocking).
 801.755 Info AppManagerStates.cpp:1756: Saving finished
1795.847 Info AppManager.cpp:266: Saving to _autosave2 (blocking).
1805.339 Info AppManagerStates.cpp:1756: Saving finished
2192.630 D3D11_ERROR: IDXGISwapChain::Present failed in swapBuffers on line 1267. Error [0x887a0005] - DXGI_ERROR_DEVICE_REMOVED
2192.631 D3D11_ERROR: ID3D11Device::GetDeviceRemovedReason failed in swapBuffers on line 1277. Error [0x00000000] - S_OK
2192.632 Error Util.cpp:75: Swap buffers failed.

IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED (0x887a0005)

Reason: S_OK (0x00000000)
2212.140 DSound: Stopping voice
2212.140 DSound: Joining thread
2212.143 DSound: Exit _dsound_update; tid=11516
2212.143 DSound: Waiting for voice to stop ... signaled
2212.144 DSound: Joined thread
2212.144 DSound: Destroying thread
2212.144 DSound: Thread destroyed
2212.144 DSound: Releasing buffer
2212.144 DSound: Voice stopped
2212.144 DSound: Deallocating voice
2212.144 DSound: Deallocated voice
2212.402 Goodbye
SkerrittT
Inserter
Inserter
Posts: 49
Joined: Fri Mar 02, 2018 1:24 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by SkerrittT »

Now 10.17.24
Still happening
posila
Factorio Staff
Factorio Staff
Posts: 5346
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by posila »

SkerrittT wrote: Sun Mar 24, 2019 2:59 am now in 0.17.17
crashes frequently (at least once every session)
is this a problem with the game or a problem with my PC?
(doesn't seem many folk have this issue and its been occurring since 0.17.2 so maybe its me?)
It is somewhat tied to a PC. The DXGI_ERROR_DEVICE_RESET error is quite hard to recover from (it requires to create new device and reload all textures) and from reading DirectX documentation I thought it is something we won't need to deal with, as documentation provides examples of "graphics driver being updated" or "GPU is physically removed from the PC", but some people seem to get the error quite often seemingly for no reason.
SkerrittT
Inserter
Inserter
Posts: 49
Joined: Fri Mar 02, 2018 1:24 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by SkerrittT »

Well I do get the error in Factorio only.
If it was my PC I suppose (?) would expect it might happen in other games too - at least occasionally.
All my drivers and OS are uptodate with whatever is the latest.
Anyway. Thanks.
posila
Factorio Staff
Factorio Staff
Posts: 5346
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by posila »

SkerrittT wrote: Fri Apr 05, 2019 2:02 amWell I do get the error in Factorio only.
Hmm, can you open Factorio properties in Steam Library and set launch options to

Code: Select all

--force-opengl
and see if you still get any issues?
lotus-duo
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Feb 04, 2019 1:44 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by lotus-duo »

I don't know if my case is the same or not, but the problem is more or less looks like it. Maybe it will help.
Factorio 16 worked just fine. I started to try new version from 17.4 and could not make it start at all. It crashed with DXGI_ERROR_DEVICE_REMOVED (viewtopic.php?p=405075).
The following versions also didn't work.
Today I tried to experiment with drivers and different options. And finally, I at least got Factorio loading.
I installed non-official video driver PHDGD Solo 2, set all modes to low and very-low and finally it worked (very slow, low FPS, but at least it could start).
Then I tried to reinstall the official Intel driver, but something went wrong and Windows reverted to very basic video adapter driver.
To my surprise, Factorio still worked (log attached).
Then I reinstall the Intel driver (last one available), and it stopped working again (log attached).
I rolled back to the basic driver and it worked again.
So to summarize:
- Factorio 16 works fine,
- Factorio 17 always crashes with last available Intel driver for the video adapter.
- Factorio 17 loads with the same HW config, but with non-official driver or basic Microsoft video adapter driver.
Options used: --d3d-feature-level 10 --max-texture-size 2048 --graphics-quality very-low --video-memory-usage all --force-graphics-preset very-low --gfx-safe-mode --low-vram --window-size 1280x1024 --fullscreen --debug-graphics

And I can admin that HW is old, but I haven't got any problems with other games before (not graphics intensive of course).
Attachments
factorio-dump-previous.dmp
previous dump if needed
(446.09 KiB) Downloaded 187 times
factorio-previous.log
Log with Intel official driver (crash)
(5.41 KiB) Downloaded 190 times
factorio-current.log
Log with Microsoft basic render driver (success loading)
(5.25 KiB) Downloaded 189 times
SkerrittT
Inserter
Inserter
Posts: 49
Joined: Fri Mar 02, 2018 1:24 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by SkerrittT »

Posila,

I appreciate that you think its a Direct X problem that you wont have to worry about. My other report has been put into the duplicates category and diagnostic logs provided. I originally reported this March 4 for version 0.17.4 I have 2471 hours on Factorio and it would be good to get this problem fixed.

I had set Factorio aside for a while hoping that the crashing problem in might be sorted.

Its not. I started Factorio today and it ran for a while (as it does) and then crashed again with the same error.

I am confident the problem is not my W10 PC with ROG Strix GTX1070 8GB, 16GB RAM and all the latest drivers and software updates. Over the period I have been experiencing the problem there have been driver updates for the 1070 and updates for W10 with no effect.

No other game I play has this problem. I do appreciate your swamped with bug reports and can only ask that you don't give up on this one.
Attachments
Factorio 2019-04-19 174425.jpg
Factorio 2019-04-19 174425.jpg (124.33 KiB) Viewed 15888 times
posila
Factorio Staff
Factorio Staff
Posts: 5346
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by posila »

SkerrittT,
have you tried the --force-opengl launch option?
posila wrote: Fri Apr 05, 2019 8:46 am
SkerrittT wrote: Fri Apr 05, 2019 2:02 amWell I do get the error in Factorio only.
Hmm, can you open Factorio properties in Steam Library and set launch options to

Code: Select all

--force-opengl
and see if you still get any issues?
SkerrittT wrote: Fri Apr 19, 2019 8:08 amI am confident the problem is not my W10 PC with ROG Strix GTX1070 8GB, 16GB RAM and all the latest drivers and software updates. Over the period I have been experiencing the problem there have been driver updates for the 1070 and updates for W10 with no effect.
I am not saying your HW is not strong enough, I am saying something is not quite right with the PC. It could be something with SW (eg. do you use some software for GPU overclocking or tweaking? what kind of game overlays do you use?) or HW, I don't know. Given the issue seems to be limited to very small number of players, and it is unclear how to deal with it, I am offering --force-opengl workaround at the moment for cases that don't get trivially solved by rebooting a computer or a driver update; issues like this is the reason why we added the option to switch to OpenGL renderer in the first place.
SkerrittT
Inserter
Inserter
Posts: 49
Joined: Fri Mar 02, 2018 1:24 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by SkerrittT »

Posila,
TL;DR
I have just added " --force-opengl " as you suggested (sorry I did not see that message before) and I will let you know how it goes.
DETAIL
Thanks for the reply, most appreciated.....No there is no overclocking or tweaking software on the PC
The Steam Game Overlay while in game is turned on in my Steam settings (I use this for screenshots only really)
I have NVIDIA’s GeForce Experience installed and use this for driver updates. It has (apparently) a game overlay built in which I do not use it says Press Alt+Z to share your gameplay - which I dont do. This is enabled in settings and could be disabled if you say I should.
Everything else is pretty vanilla - some steam games, Chrome browser, malwarebytes, W10, a couple of games direct from the developer DCS, IL2, Discord, Opentrack, Thunderbird email, Acronis true image, Team viewer and that's about it. I don't typically have any of these other apps open when I have Steam and Factorio open.
BTW I don't know what "issues like this is the reason why we added the option to switch to OpenGL renderer in the first place" really means but I guess thats what the force opengl in properties / launch option does...so that was good planning on your part.
Thanks again.
lotus-duo
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Feb 04, 2019 1:44 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by lotus-duo »

posila wrote: Wed Apr 03, 2019 7:26 am It is somewhat tied to a PC. The DXGI_ERROR_DEVICE_RESET error is quite hard to recover from (it requires to create new device and reload all textures) and from reading DirectX documentation I thought it is something we won't need to deal with, as documentation provides examples of "graphics driver being updated" or "GPU is physically removed from the PC", but some people seem to get the error quite often seemingly for no reason.
Version 17.38 doesn't crash anymore, I think 17.37 bugfix helps also with DXGI_ERROR_DEVICE_RESET error.
The game loads OK, though it's very slow, but now the problem seems to be related to HW. At least I can try to change some settings.
Thanks for fixing! :)
Xeanoa
Fast Inserter
Fast Inserter
Posts: 190
Joined: Tue Apr 26, 2016 4:32 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by Xeanoa »

I don't have the issue, but looking at the thread I thought it might be related to switching between iGPU and dedicated graphics on certain power plans, usually for laptops.
posila
Factorio Staff
Factorio Staff
Posts: 5346
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by posila »

Xeanoa wrote: Mon May 13, 2019 12:44 pm I don't have the issue, but looking at the thread I thought it might be related to switching between iGPU and dedicated graphics on certain power plans, usually for laptops.
Do you have experience with this?

After SkerrittT raised the issue for the second time, I added this error to the automatic crash upload system, to see how often it happens. Since then we are receiving around 50 DXGI_ERROR_DEVICE_REMOVED crashes a day and they seem to be pretty much random. It happens on desktops and laptops, including laptops without dedicated GPU. It happens on high-end hardware as well as low-end hardware. It also happend to someone running on Microsoft Basic Display Driver (software rasterizer).

Most people (based on triple CPU model, GPU and graphics driver version) have the crash just once. Small fraction of the crashes are legitimate (ie. running high-res sprites on Intel Graphics HD 3000 with 4GB system RAM with ton of mods, throws DXGI_ERROR_DEVICE_REMOVED with GetDeviceRemovedReason E_OUTOFMEMORY after a while, but I am amazed it was able to load in the first place; or taking 16000x16000 screenshot on GPU with small VRAM size) but most of them seem to happen just out of nowhere.

About 1/3 of GetDeviceRemovedReason() is DXGI_ERROR_DEVICE_HUNG, but most of the time there was no change in draw call count or size of vertex buffer updates, so it seems it was rendering basically the same scene as for multiple frames before the error.

I can't rule out possibility we ocassionaly create an invalid draw command; every release I try to change some thing to brush out some weird cases. For example it could happen the engine would create a draw call with 0 primitives to render. Direct3D debug layer didn't complain about such draw call, but it is weird thing to do, and I though maybe some drivers won't survive it, so I made the engine not to do that. So far none of the changes had any effect on the 50 crashes a day. Also, on avarage, every 100 crashes, somebody reports the crash. So I would expect every 2 days a new bug report to be made or new person post to existing reports, but they don't in this case.

I am open to any ideas of how to diagnose these.
User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 870
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by mexmer »

i have seen this error in other game i was also working on for limited time.

this error happened only on notebooks with switchable graphics, rarely during gameplay notebook, usually it did happen during game start.

my best guess was, that switchable graphic driver didn't switch fast enough. so game initialized on integrated gpu, then driver switched to dedicated and game could not draw.

there were 3 ways that could people do to avoid this.

1st prevent graphic switching in driver (uncomfortable)
2nd set prefered graphic in game setting (it still soemtime failed, when system was under high load)
disable igpu (eg. cpu graphic) and use only dedicated
Xeanoa
Fast Inserter
Fast Inserter
Posts: 190
Joined: Tue Apr 26, 2016 4:32 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by Xeanoa »

posila wrote: Tue May 14, 2019 9:52 am
Xeanoa wrote: Mon May 13, 2019 12:44 pm I don't have the issue, but looking at the thread I thought it might be related to switching between iGPU and dedicated graphics on certain power plans, usually for laptops.
Do you have experience with this?
Unfortunately not a lot.
I've had an issue with the laptop not switching graphics device when launching a game before, so it would launch on the iGPU. And I had to route my wife's secondary display through the iGPU of her rig, because it only has a DVI connector, but our Radeon VIIs don't have those any more. Should get her a new one some time...
Maybe that's an idea to check for?

There are all kinds of weird things happening in the background when two graphic devices are active, that are mostly controlled by power options. Using the Ultimate power plan avoids many of those.
User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 870
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: [posila] [0.17.1] Crash on load, DXGI_ERROR_DEVICE_REMOVED

Post by mexmer »

Xeanoa wrote: Tue May 14, 2019 12:17 pm
posila wrote: Tue May 14, 2019 9:52 am
Xeanoa wrote: Mon May 13, 2019 12:44 pm I don't have the issue, but looking at the thread I thought it might be related to switching between iGPU and dedicated graphics on certain power plans, usually for laptops.
Do you have experience with this?
Unfortunately not a lot.
I've had an issue with the laptop not switching graphics device when launching a game before, so it would launch on the iGPU. And I had to route my wife's secondary display through the iGPU of her rig, because it only has a DVI connector, but our Radeon VIIs don't have those any more. Should get her a new one some time...
Maybe that's an idea to check for?

There are all kinds of weird things happening in the background when two graphic devices are active, that are mostly controlled by power options. Using the Ultimate power plan avoids many of those.
this is good point i forgot to mention in my post, usually power profiles screw up whatever you set in switchable graphic panel.
like if you set power profil to maximum saving, it will almost always force everything to igpu (not to mention downlock cpu), while High performance profile usually runs even desktop on dedicated, therefore in both cases (maximum saving/maximum perfomance) switching doesn't occur.

many notebook manufacturers override default windows power management, with own tools, and it can do lot of unusual things. that normally don't happen, when you have clean windows and balanced profile enabled.

@posila if you happen to have for example some HP Probook with switchable graphic and HP Velocity installed, maybe you will be able to reproduce this.
Post Reply

Return to “Not a bug”