ebiten icon indicating copy to clipboard operation
ebiten copied to clipboard

internal/graphicsdriver/directx: DXGI_ERROR_DEVICE_REMOVED / DXGI_ERROR_DEVICE_HUNG error with the DirectX12 driver

Open hajimehoshi opened this issue 1 year ago • 12 comments

2022/07/11 21:04:37 directx: ID3D12Device::CreateGraphicsPipelineState failed: HRESULT(2289696773): goroutine 1 [running, locked to thread]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x65
main.logErrorAndExit({0x8a77a0, 0xc00062a020}, 0xc000006a00)
	github.com/wasedaigo/rpgsnack-runtime/main.go:124 +0x3f
main.main()
	github.com/wasedaigo/rpgsnack-runtime/main.go:112 +0x3d3

Motherboard hewlett-packard 1998 Intel Core i5 4690 CPU @ 3.50GHz Intel(R) HD Graphics 4600 Ram 8gb System Type 64-bit

Reported by @wasedaigo

hajimehoshi avatar Jul 12 '22 07:07 hajimehoshi

I feel like my usage of descriptor heaps is wrong...

hajimehoshi avatar Jul 13 '22 05:07 hajimehoshi

I'll backport 42d5d91829bcd6dfc559ef53d7fa546f3119daa2 to v2.3 for approprite memory usages.

EDIT: Applying this is not so easy. Let's wait until an actual issue happens...

hajimehoshi avatar Jul 14 '22 12:07 hajimehoshi

This still happens with alpha.9

directx: ID3D12Device::CreateGraphicsPipelineState failed: HRESULT(2289696773): goroutine 1 [running, locked to thread]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x65
main.logErrorAndExit({0x6c7a00, 0xc0000c2070}, 0xc0000cea10)
	github.com/wasedaigo/rpgsnack-runtime/main.go:124 +0x3f
main.main()
	github.com/wasedaigo/rpgsnack-runtime/main.go:112 +0x3d3

hajimehoshi avatar Jul 29 '22 07:07 hajimehoshi

I reverted the fix c183555cc8985f8b9df80fb1bc9034e79ddc9fd5 as this didn't help the reporter's machine.

hajimehoshi avatar Jul 30 '22 15:07 hajimehoshi

We would need an actual device if we want to fix this.

hajimehoshi avatar Jul 31 '22 13:07 hajimehoshi

As described in #2485 I do have access to machine which has this problem

erexo avatar Dec 21 '22 13:12 erexo

Thanks but I'm at lost what approach would be the best. DXGI_ERROR_DEVICE_HUNG seems a very notorious error.

Let me think.

hajimehoshi avatar Dec 21 '22 13:12 hajimehoshi

https://www.makeuseof.com/windows-dxgi-error-device-hung-error/

This article recommends 1) stop overclocking if you already do, and/or 2) edit the registery, and so on. Unfortunately the user would have to take these approarches instead of Ebitengine. I'll investigate more.

hajimehoshi avatar Dec 21 '22 13:12 hajimehoshi

/CC @wasedaigo

hajimehoshi avatar Feb 16 '23 03:02 hajimehoshi

From @wasedaigo's report:

directx: ID3D12Device::CreateCommittedResource failed: HANDLE(2289696773)
goroutine 1 [running, locked to thread]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x65
main.logErrorAndExit({0xfb9780, 0xc000129340}, 0xc00018c9b0)
	github.com/wasedaigo/rpgsnack-runtime/main.go:125 +0x2c
main.main()
	github.com/wasedaigo/rpgsnack-runtime/main.go:119 +0x3c9

hajimehoshi avatar Feb 16 '23 04:02 hajimehoshi

My current rough guess is that adopting DirectX 11 instead of DirectX 12 might improve the situation.

  • ANGLE (WebGL implementation) still uses DirectX 11.
  • Final Fantasy 14 still uses DirectX 11.

hajimehoshi avatar Mar 24 '23 16:03 hajimehoshi

As this is pretty rare with the DirectX 11 (not 12) driver, I'll remove the milestone. I don't think this is fixable by me anyway.

hajimehoshi avatar Jul 29 '23 15:07 hajimehoshi