GPU crash detected: - Device 0 Removed: DXGI_ERROR_DEVICE_HUNG [2026.04.19-03.04...
错误信息
[2026.04.19-03.04.46:495][691]LogAbilitySystem: Display: GameplayCueNotify /Game/DungeonCrawler/FX/GameplayCue/OceanStorm/GC_OceanStormStatus.GC_OceanStormStatus_C was not loaded when GameplayCue was invoked. Starting async loading.
[2026.04.19-03.04.46:496][691]LogAbilitySystem: Display: GameplayCueNotify /Game/DungeonCrawler/FX/GameplayCue/OceanStorm/GC_OceanStormStatus.GC_OceanStormStatus_C was not loaded when GameplayCue was invoked. Starting async loading.
[2026.04.19-03.04.57:621][732]LogD3D12RHI: Error: GPU crash detected:
- Device 0 Removed: DXGI_ERROR_DEVICE_HUNG
[2026.04.19-03.04.57:622][732]LogD3D12RHI: Error: Shader diagnostic messages and asserts:
Device: 0, Queue 3D:
No shader diagnostics found for this queue.
Device: 0, Queue Copy:
No shader diagnostics found for this queue.
Device: 0, Queue Compute:
No shader diagnostics found for this queue.
[2026.04.19-03.04.57:622][732]LogD3D12RHI: Error: DRED: No breadcrumb head found.
[2026.04.19-03.04.57:623][732]LogD3D12RHI: Error: DRED: No PageFault data.
[2026.04.19-03.04.57:623][732]LogD3D12RHI: Error: Video Memory Stats from frame ID 8:
[2026.04.19-03.04.57:623][732]LogD3D12RHI: Error: Local Budget: 0.00 MB
[2026.04.19-03.04.57:624][732]LogD3D12RHI: Error: Local Used: 0.00 MB
[2026.04.19-03.04.57:624][732]LogD3D12RHI: Error: System Budget: 0.00 MB
[2026.04.19-03.04.57:624][732]LogD3D12RHI: Error: System Used: 0.00 MB
[2026.04.19-03.04.57:627][732]LogD3D12RHI: Error: GPU发生崩溃,或D3D设备已移除。
检查日志中的GPU状态信息。
AI 解决方案
报错分析报告
1.错误翻译
原文:GPU crash detected: Device 0 Removed: DXGI_ERROR_DEVICE_HUNG
译文:检测到GPU崩溃:设备0已移除,错误码DXGI_ERROR_DEVICE_HUNG
2.原因分析
DXGI_ERROR_DEVICE_HUNG错误。3.解决方案
// 1. D3D12设备移除错误处理(C++示例)
#include <dxgi.h>
void HandleDeviceRemoved(HRESULT hr, ID3D12Device* device) {
if (hr == DXGI_ERROR_DEVICE_HUNG || hr == DXGI_ERROR_DEVICE_RESET) {
// 释放旧设备资源
ReleaseAllD3D12Resources(device);
// 重新初始化设备与资源
InitializeD3D12Device();
LogWarning("[D3D12] Device reset due to HUNG error");
}
}
// 2. 调用处示例(执行命令队列后检查)
HRESULT ExecuteCommands(ID3D12CommandQueue* cmdQueue) {
HRESULT hr = cmdQueue->ExecuteCommandLists(...);
HandleDeviceRemoved(hr, m_d3d12Device); // 传入当前设备
return hr;
}
4. 预防措施
stat gpu命令实时监控显存。注:日志中GameplayCueNotify未加载的警告是异步加载的正常提示,非核心错误根源。核心问题是GPU设备挂起。