EpicGamesExt / raddebugger

A native, user-mode, multi-process, graphical debugger.
MIT License
3.45k stars 175 forks source link

GPU context loss crashes the program #212

Open chuckrector opened 5 months ago

chuckrector commented 5 months ago

I can reproduce this on any system with two graphics cards by disabling the primary one while raddbg is running. Martins suggested Win+Ctrl+Shift+B for restarting the GPU driver although raddbg seems to be able to survive this on my systems.

I leave raddbg and many other programs open for long periods (weeks or months) of time and this morning I noticed that many programs had either suspended, recovered, or restarted their UI in some way due to a GPU hiccup. raddbg was hung and so I confirmed my suspicion on a separate machine (both Windows 10.0.19045). I very rarely ever leave a debug session open in the middle of stepping for extended periods, such as overnight, to where this would actually matter, but avoiding a crash would be a useful nice-to-have in those cases.

mmozeiko commented 5 months ago

Information about how to properly handle GPU device removal error in application: https://learn.microsoft.com/en-us/windows/uwp/gaming/handling-device-lost-scenarios

At bottom of page there is information about how to make it happen for debugging this situation - launch admin cmd.exe and run dxcap -forcetdr