Modern user interface environments (Windows, OSX, Linux, mobile, etc) rely heavily on the graphics pipeline for performance.
Systems have one** graphics pipeline. All graphical programs (desktop, browser, games, etc) are separate threads which must share this single graphics context.
This creates the required conditions for multithreading problems. The threads can get deadlocked, livelocked, raced, etc.
It is likely your thread is not "playing nicely" with the desktop graphics thread, and it is locking up. Probably waiting on a resource that is no longer available (are you freeing all resources correctly?)
OpenGL is very aggressively developed, and pushes hardware to the limit. You might find that bug does not occur on other hardware.
If however, your whole system shuts down, then it is likely the actual chipset of pipeline is overheating and/or overvolting. Most hardware has sensors which cut the power if harmful spikes in load occur. Manufacturers load test their hardware and set the cutoffs accordingly.
** Single graphics pipelines are being replaced by multiple pipelines (which can 'own' separate smaller regions of the screen). This is what OpenGL's Vulkan is all about, and requires special GPU chipsets.
