Crash clicking multiple times immediately after glfwCreateWindow

100% Repro. Only occuring on a client machine so I am unable to trap the issue in a debugger. Windows 8.

First Call glfwCreateWindow with Fullscreen enabled (using glfwGetPrimaryMonitor)

Immediately after this call, clicking on the window with the Left Mouse (Right Mouse does nothing) repeatedly (10+ times) causes a crash that doesn’t get caught by my crash logger. It crashes straight to desktop, and no call stack is caught, nor does using SetUnhandledExceptionFilter seem to make any difference.

This crash occurs before even hooking up glfwSetMouseButtonCallback, but it still can occur after it is hooked up. If so, the Right Mouse button works fine and hits the callback, but the Left Mouse button does not invoke the callback at all and crashes if clicked too much.

If adding sleeps after the create window call, the crash will still occur, though it seems only between the sleep calls. For instance, adding a 5 second sleep after the call seems to make it so the crash will occur if you are clicking only right as the sleep is ending, 5 seconds after the window appears.

Immediately setting glfwSetInputMode to GLFW_CURSOR_DISABLED after creating the window appears to make no difference.

Sprinkling glfwPollEvents after creating the window and in between each glfw call appears to alleviate the issue somewhat. However, any long pause in time between calls to glfwPollEvents still causes a crash if you are clicking when the pause ends. Since this is happening during synchronous loading with huge pauses while textures are loaded to the GPU, dropping glfwPollEvents everywhere is not a real solution.

Code is single threaded. The create window function is called after a call to only glfwSetErrorCallback and glfwInit. Compiled in Visual Studio with /SUBSYSTEM:CONSOLE.

Client Machine with Repro
Windows 8.1 Pro
Intel Core i5-3317U CPU @ 1.70 GHz 1.70 GHz
8.00 GB RAM
64-bit Operating System x64 based processor

I can not repro the issue on any dev machine, ranging from various Win 7 boxes to mac boxes.

This doesn’t sound to be GLFW specific, so you may find other forums can give you more information.

There are some cases where SetUnhandledExceptionFilter won’t get called, see this codeproject article on SetUnhandledExceptionFilter or this Stackoverflow thread

You might want to try getting your client to set crash dumps on, and send you a minidump (usually all you need). See this MS article.

You may also want to check out CrashRpt as this is able to handle different exception types as well as generating & sending minidumps for you.