Posts
1150
Comments
891
Trackbacks
1
Faulting Module Kernel32.dll: One solution

This is one solution to this error, hardly the only one.

Sometimes when you try to run a .NET application, you get a completely generic error message in event viewer that includes “faulting module kernel32.dll” in the description.  If you Google this, you will see that there is a wide and nearly useless range of cases where this can occur.

In my particular case, though it took a little while to figure out, the cause and solution were fairly straightforward.

The application was a windows service, and would throw an error when started.  It worked in other environments, worked on other machines in the same environment, yada yada yada.  The problem was that the .NET application had a reference to dependency it expected to be in the GAC.  On the machine throwing the error, the dependency wasn’t in the GAC, thus the failure (there were actually two missing dependencies, one custom, one Microsoft Enterprise Library 4.1).

Once the dependencies were installed, the windows service started successfully.

posted on Sunday, October 30, 2011 4:18 PM Print
Comments
Gravatar
# re: Faulting Module Kernel32.dll: One solution
Abraham
11/14/2011 3:01 AM
Do we have any option to find which dependency is missing?
Gravatar
# re: Faulting Module Kernel32.dll: One solution
jdn
11/14/2011 9:29 AM
Unfortunately, not from the event viewer message, you have to find some other way of doing so.
Gravatar
# re: Faulting Module Kernel32.dll: One solution
Cristina
1/28/2012 8:55 AM
I've been looking all over the Internet for a solution to this problem for my Windows Service application which is programmed to start automatically. It worked fine till now, because when trying to install it I get this nasty error message and it installs incompletely (no *.Install file in the installation directory). However, the next screen states that the application has been successfully installed, but the windows service is not starting at all as it should. When uninstalling it, I get the same message which scares me off. However, the application seems to uninstall. How can I find which dependency is missing?

In the event log I am only given this message:
"Faulting application msiexec.exe, version 4.5.6001.22159, stamp 480573de, faulting module kernel32.dll, version 5.1.2600.5781, stamp 49c4f482, debug? 0, fault address 0x00012afb."

Does this mean it only happens on my computer? I am very afraid of clients' machines.
Thanks a lot, your advice would be very helpful and much appreciated.
Gravatar
# re: Faulting Module Kernel32.dll: One solution
jdn
1/28/2012 1:42 PM
Without knowing anything about your application, what I did was to find a machine where the service worked, and then went through all of the entries in Add/Remove programs to find out what was installed on the machine where it worked, and compared it with the entries in Add/Remove programs on the machine where it wasn't working.

This is how I determined what the dependency was.
Gravatar
# re: Faulting Module Kernel32.dll: One solution
rotem
3/22/2012 3:36 AM
Thank you! Thank you!
helped me out...

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 2 and 8 and type the answer here: