[0.17.43] IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Post Reply
zsoc
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed May 29, 2019 8:55 pm
Contact:

[0.17.43] IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED

Post by zsoc »

Crash experienced while game was minimized. Also note the multiple GPUs. Was commanded by Bilka to report here.

Important snippet:

Code: Select all

16713.301 D3D11_ERROR: IDXGISwapChain::Present failed in swapBuffers on line 1538. Error [0x887a0005] - DXGI_ERROR_DEVICE_REMOVED
16713.301 GetDeviceRemovedReason(): [0x887a0006] DXGI_ERROR_DEVICE_HUNG
16713.304 Error Util.cpp:97: Swap buffers failed.

IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED (0x887a0005)

Reason: DXGI_ERROR_DEVICE_HUNG (0x887a0006)
See full log:
https://gist.githubusercontent.com/jkan ... urrent.log

Twinsen
Factorio Staff
Factorio Staff
Posts: 1330
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [0.17.43] IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED

Post by Twinsen »

Any details about anything happening during the crash? Was the game simply minimized and it crashed seemingly randomly?

Did you do anything like lock/unlock the screen, turn screens on or off, start a different 3d application, start playing a video(on a webpage or otherwise) ? Or anything that might hang the video card driver.

zsoc
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed May 29, 2019 8:55 pm
Contact:

Re: [0.17.43] IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED

Post by zsoc »

Sure thing - sorry I wasn't sure what would be relevant.

The game was minimized, in editor mode (and i *believe* paused, although i might be wrong about that?).

No other gpu-related application was running *except* web browsers. Both chrome and firefox were open, although I don't believe chrome was doing anything GPU-related. Firefox was running at least 1 video (twitch.tv) which is for sure GPU accelerated. All 5 screens were continually on the entire time, before, during, and after the crash. The video playing was on a different monitor than factorio was previously rendering to when not minimized (if that is somehow important?). Also to note that the video would have been playing before Factorio was even opened. Not something suddenly started.

Possibly unrelated, but possibly related.... I've also experienced a number of BSODs over the weeks which I have a hard time narrowing down. But they *seem* to be related to playing videos in a browser on another monitor at the same time as playing Factorio - as I haven't gotten a single BSOD when not doing this (although it's only correlative at best).

I'm also amused how the GXDI docs suggest handling this error by just restarting the device, as if that were a very simple task... :D

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

Re: [0.17.43] IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED

Post by posila »

Do you get the DXGI_ERROR_DEVICE_REMOVED error often? If so, could you install Graphics Tools in Windows 10 (Open Apps & Features or Add or Remove Programs dialog -> Manage Optional Features -> Add Feature -> Graphics Tools) and then in Factorio properties in Steam Library set launch options to --debug-graphics

Graphics Tools will install DirectX Debug Layer, and --debug-graphics launch option will enable it in Factorio; If Factorio uses DirectX wrong and that is what leads to the DXGI_ERROR_DEVICE_REMOVED, the debug layer will output what did we do wrong into the log file.

However, BSODs indicate there might be something out of ordinary with your computer. Some bad or conflicting driver or HW, or possibly something corrupted in the OS.

OS will reset the device if needed; but an application lost all device context and needs to create new one, including recreating all resources that were on the device ... like textures. Which is quite a complicated process and takes a long time, so I'd be pretty happy if these errors turned out to be bug we can fix and not random error we have to live with.

zsoc
Burner Inserter
Burner Inserter
Posts: 8
Joined: Wed May 29, 2019 8:55 pm
Contact:

Re: [0.17.43] IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED

Post by zsoc »

It looks like this is indeed a symptom of a hardware/OS-level problem.

In my particular case, I am using Corsair C15 DDR4 3000 RAM, but with a B350 chipset and a Ryzen 7. There's some incompatibility that is over my head, so the RAM was being recognized as 2133 - Corsair's suggestion was to use XMP and manually change the ram frequency to 3000mhz, which I did. I didn't consider this "overclocking" because, well, it's 3000mhz ram :p But lo and behold.... when I set all that back to automatic in the bios - this crash goes away entirely, and I can't repo it no matter how many instances of factorio I run or how many videos i run on other monitors at the same time ¯\_(ツ)_/¯

So really, I guess my only suggestion in this case would be to consider this error a hardware/settings problem and have a more user-friendly message along side it that suggests trying to disable any OC'ing to see if the problem persists.

But from my anecdotal experience... this doesn't appear to be a fixable bug.

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

Re: [0.17.43] IDXGISwapChanin::Present error: DXGI_ERROR_DEVICE_REMOVED

Post by posila »

Thank you for your findings.

At this point I am pretty sure these errors are not caused by bug in our code, but something external ("overclocking" being one of the reason). Which is unfortunate, as that means we can't simply fix it, but instead we have to handle the error more gracefully :/

Post Reply

Return to “Pending”