I am getting a blue screen when my windows winform application is run.
It seems that only one user is getting this. I am not sure where at this time to look for the problem. I am however using some code that I found on CodeProject to trap mouse events and keyboard events http://www.codeproject.com/KB/cs/globalhook.aspx could this possibly be it?
I am looking for suggestions on how I might trap this error. It’s only happening on one users computer out of 40, so I am a little perplexed – especially since this user is the primary stakeholder.
Update:
We have one more incident – the common denominator is the docking port. The user was using the same docking port.
It is impossible for your code to be causing a BSOD. If you’re not running in kernel mode, then a BSOD isn’t your fault (if you’ll excuse the pun).
OTOH, I have seen managed code trigger a bug in a piece of kernel-mode code. This bug then caused a BSOD. In my case, the kernel-mode code was part of a piece of VPN software that wanted to understand what code you were running so it could decide whether or not to allow you access to the VPN. The code was using kernel-mode hooks to do this, and they had a bug that was triggered by the loading of large numbers of assemblies.
Apparently, they had never tested their code while Visual Studio was running. It loads add-ins and such at runtime, which triggered their bug. A piece of C# code that simply loaded large numbers of assemblies into an AppDomain (then unloaded the AppDomain and started over) also triggered their bug, so it wasn’t a Visual Studio problem.
The moral of the story is that someone needs to look at the crash dump and figure out which piece of kernel-mode software caused the crash, then maybe you can figure out what was going on in the system to trigger the kernel-mode software to crash.