Hi. I have an application I'm working on that, perhaps 1 time in 500, hangs the entire system on startup. And by that, I mean that the entire OS freezes including the mouse pointer, and no input is accepted from the keyboard. I can't even imagine what I could be doing from within the confines of my program in order to cause these system-wide effects, but I assume that it's some kernel mode thing. Does anyone have any tips on debugging this sort of issue? This is a C++ OpenGL application running on Windows 7.
Debugging a system hang (entire OS freezes)
Members - Reputation: 5056
Posted 07 August 2014 - 04:42 PM
This is a C++ OpenGL application running on Windows 7.
Update your graphics drivers first. The major proprietary OpenGL drivers are often very buggy and even simple functions or innocent combinations of functions can cause all kinds of kernel panics and freezes. This is one of the reasons both Firefox and Chrome jump through hoops to translate WebGL and their internal rendering through Direct3D instead of using OpenGL directly. Direct3D drivers are forced to use more of Microsoft's runtime and the WDDM model which also makes them more resilient to internal driver errors or hardware errors than the typical OpenGL driver (on any platform).
Crossbones+ - Reputation: 3128
Posted 07 August 2014 - 08:48 PM
Check if minidumps are being generated.
If you've disabled your Swap File or its size is too low, minidumps won't be generated.
Also don't rule the possibility of hardware problems. If your application has no VSync, and the CPU is not doing anything, the GPU may be running so fast it overheats or your PSU can't deliver enough power; which is harder to witness in other programs because rarely the GPU runs 100% uninterrupted (because of VSync or because the CPU has actually some work to do, stalling the GPU)
Crossbones+ - Reputation: 3453
Posted 07 August 2014 - 11:22 PM
Are you using any libraries or systems beside OpenGL? Like playing sound during startup?
Sometimes it's the coincidental accessing of a resource (by your game and some other program) getting drivers bonkers
(I had something similar on a HP desktop where starting a sound in DirectSound and WinAmp starting a song at the same time would completely hang the machine)