My .net program calls BSOD

I get a blue screen when my winform application for windows starts. It seems that only one user gets this. I do not know where to look for a problem at this time. However, I use the code that I found in CodeProject to catch mouse events and keyboard events http://www.codeproject.com/KB/cs/globalhook.aspx , maybe this is possible?

I am looking for suggestions on how I could capture this error. This only happens on one of the 40 user's computers, so I'm a little puzzled - especially since this user is the main interested person.

Update: We have another incident - the common denominator is the docking port. The user used the same docking port.

+7
c # winforms
source share
3 answers

It is not possible for your code to call BSOD. If you are not working in kernel mode, then BSOD is not your fault (if you excuse the pun).

OTOH, I saw that managed code triggers an error in a piece of kernel mode code. This error caused the BSOD. In my case, kernel mode code was part of a piece of VPN software that wanted to understand what code you were running so that it could decide whether to allow you access to the VPN. To do this, the kernel mode hooks were used in the code, and they had an error caused by loading a large number of assemblies.

Apparently, they never tested their code while running Visual Studio. It loads add-ons, etc. At runtime, what caused their error. The part of C # code that simply loaded a large number of assemblies into AppDomain (then unloaded AppDomain and started) also caused their error, so this was not a Visual Studio problem.

The moral of this story is that someone needs to look at the crash dump and find out what part of the software in kernel mode caused a crash, then maybe you can figure out what is going on in the system to make the software crash.

+12
source share

The problem is not with your application, but with some problem with its system, as roufamatic says that the checks are event logs. However, there are two common “hardware” errors that usually cause such a problem, and you could usefully check them to make sure that they [will give you an edge.

  • Bad memory. If a memory error occurs, it is not uncommon to see a particular program that can “cause” access to bad memory and, therefore, lead to a BSOD. If, for example, it usually works with fairly lightweight applications, then it is possible that the memory error will be in a place that is not usually used. When you download your application, especially if it has a large amount of memory and causes many dependencies, you can call an indirect call. Therefore, do a full test of RAM.

  • Printer drivers This used to be more of a problem than it is now, but if you work on XP, it sometimes appears. Printer drivers are known to be poorly written and quite often erroneous. It is not unheard of for an application to invoke a printer driver, which in turn shuts down the system. To verify this, simply remove the printer drivers, then restart them again.

EDIT: As pointed out in the comments, any bad hardware or bad drivers can cause this behavior. I simply allocate memory and printer drivers because experience shows that these two are the most common reasons, so you should consider first.

+3
source share

I had to solve this problem earlier. I wrote C # code for user mode to talk to a HID device on a USB bus. This problem occurred on my laptop, but on no other machine. It turned out that this was causing problems because I was running a 64-bit OS and therefore had 64-bit drivers. All other users had 32-bit drivers that did not have a problem. It was a moderately controlled set of users. I knew every user, and they were competent users who could provide me with information about their hardware, OS, and drivers. We also used the same device.

I do not remember how I DEFINED. But I solved it quite simply by installing an application project for 32-bit Windows only. Without a 64-bit application, a failed driver is never used.

Ask users to update their drivers, their hardware, or change the code so that they don’t use the driver at all.

+1
source share

All Articles