Paul Hitchcock
Paul Hitchcock

Reputation: 73

How can I determine the cause of an AppCrash on Unhandled Exception in Kernelbase.dll prior to Application Start?

App is crashing at startup and Application Error in Event Log gives the following info:
Faulting module name: KERNELBASE.dll, version: 6.2.15063.483, time stamp: 0xc3955624
Exception code: 0xe0434f4d
Fault offset: 0x000eb802

Here's the back story
On one of our customer's networks, our app is crashing before it can even open. I've now spent days searching for answers and haven't been able to solve this yet. I started with some basic troubleshooting, and after not finding any smoking gun, but finding that a new user profile solved the issue, I suggested that was a good fix to get back up and running again. Their outsourced IT agreed at first but is having difficulties migrating user data to a new profile and has never been able to finish moving the affected user to a new profile. Now the issue is occurring on another machine on their network and they are pushing back stating that the issue is with our application and we should spend the time to fix it. I agree that if it's in our code we should fix it, but so far it seems it doesn't even get far enough to reach our code. Also, we have not seen this anywhere else except on this one network with the two accounts that are logging into a domain PC with a local account.

Application Info

User Environment Info

Troubleshooting thus far

Questions

To me it seems there is an unhandled CLR exception occurring prior to the app startup, probably because of some windows permissions conflicts either on a file or registry entry, but I don't know how to chase it any further.

Upvotes: 4

Views: 5124

Answers (2)

Kevin Dimey
Kevin Dimey

Reputation: 729

In my case, the exception code led me to Exception code: 0xe0434f4d

As mentioned in the post, the trick was about .net framework version installed and supportedRuntime key in app.config.

Upvotes: 0

Paul Hitchcock
Paul Hitchcock

Reputation: 73

I was able to fix this so the app started working again. After comparing two ProcMon logs side-by-side (one from the profile that was crashing, and one from a new profile with same rights) I found that on the profile that was crashing, it started very early referencing apphelp.dll and looking at AppCompatFlags keys in the registry. That led me to believe it was trying to run in compatibility mode, which it shouldn't need to do.

Even though the I made sure there was no compatibility mode set through the UI by right-clicking the app icon and viewing the properties, there were still some records stored in the registry. I removed entries for the app from the following keys and logged the user out and back in, and the issue has gone away. To be fair, I did a few other things as well that may have contributed. I downloaded and ran the .NET Repair Tool. It didn't solve the issue immediately after running it, but I thought I'd mention it just in case it played a part. I ran the repair kit first, then found and removed the registry entries, then logged the user out and back in.

Ultimately, I'm not really sure what caused this to occur in the first place, but from what I read, it's possible the app crashed once, and Windows tried to do some compatibility troubleshooting on it and stored some keys in the registry which ended up causing to crash consistently.

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted

Upvotes: 2

Related Questions