32

I recently received some system event logs from one of our clients running our application on a virtual machine.

I noticed these entries in the log:

Description: The process was terminated due to an unhandled exception.
Framework Version: v4.0.30319
4/22/2014 5:05:28 PM;"Error";".NET Runtime";"1026";"Application: MyApp.exe
Report Id: d50fe7ab-ca61-11e3-9e10-6805ca17040a"
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Faulting application path: C:\Program Files\MyApp\bin\MyApp.exe
Faulting application start time: 0x01cf5e44d3e971c2
Faulting process id: 0x13fc
Fault offset: 0x000000000000a49d
Exception code: 0xe0434352
Faulting module name: KERNELBASE.dll  version: 6.1.7601.17514  time stamp: 0x4ce7c78c
4/22/2014 5:05:29 PM;"Error";"Application Error";"1000";"Faulting application name: MyApp.exe  version: 1.2.1403.7002  time stamp: 0x5319d243

Followed by a huge rdlc stacktrace ending in "The directory name is invalid"

I've been trying to determine what Fault offset: 0x000000000000a49d Exception code: 0xe0434352 really means. So far I can only tell that I may be something related to user access rights, KERNELBASE.dll could be corrupted or it may be some mystic Microsoft voodoo.

Does anyone have a definitive answer to what this means? Or a msdn lync explaining this in detail? I'd really like to understand the full details behind this issue.

memory of a dream
  • 1,207
  • 3
  • 23
  • 32
  • Sounds like you just missed some exception handling in your application when doing file IO. That would be the first place to start. Also you should post the full stack trace, don't be shy. – Ashigore Apr 25 '14 at 12:05
  • @Ashigore The exception in question is form Microsoft.Reporting.WinForms.LocalProcessingException and it basically says that the path provided for exporting in not valid. which makes no sense because just before the call to export I create all the required directory structure and there is no hint of a problem with that. – memory of a dream Apr 25 '14 at 13:52
  • @memoryofadream Is it possible there is a race condition between creating the directories and writing the file? Perhaps insert a looping check after creating the directories to check is that path is now valid before continuing? – Ashigore Apr 25 '14 at 14:03
  • @Ashigore Thanks for the suggestion but that can't be a problem. My logs show that the folder was successfully created in October last year and this exporting functionality has been using it without a problem ever since. My only guess is that the app didn't have sufficient rights to create a file in this folder. Well at least not during this run. That's why I'm trying to understand these CLR codes. I'm hoping that they may shed some light on something. – memory of a dream Apr 25 '14 at 14:15
  • @leppie thanks for the link. should I understand that the exception code in question represents an AppDomain.UnhandledException? – memory of a dream Apr 25 '14 at 14:27

1 Answers1

56

0xe0434352 is the SEH code for a CLR exception. If you don't understand what that means, stop and read A Crash Course on the Depths of Win32™ Structured Exception Handling. So your process is not handling a CLR exception. Don't shoot the messenger, KERNELBASE.DLL is just the unfortunate victim. The perpetrator is MyApp.exe.

There should be a minidump of the crash in DrWatson folders with a full stack, it will contain everything you need to root cause the issue.

I suggest you wire up, in your myapp.exe code, AppDomain.UnhandledException and Application.ThreadException, as appropriate.

Andrew Mortimer
  • 2,380
  • 7
  • 31
  • 33
Remus Rusanu
  • 288,378
  • 40
  • 442
  • 569
  • 2
    Thanks, that helped me. I've wrapped my code to catch all exceptions and it turned out that it was some third party assembly missing. It showed clearly in the Exception.Message which file could not be found. – dmihailescu Mar 22 '17 at 16:59
  • For me, I updated to [SP1](https://support.microsoft.com/en-us/help/3182545/sql-server-2016-service-pack-1-release-information) (from 13.0.1728.2 to 13.0.4001.0). It's possible something got corrupted after I installed Visual Studio, Data Tools, and other stuff. Shouldn't cause problems, but something to consider. :) – Chiramisu May 17 '17 at 18:17
  • 3
    Your link is dead. Here is an alternative: https://www-user.tu-chemnitz.de/~heha/viewchm.php/hs/Win32SEH.chm/Win32SEH.htm – Elaskanator Jun 01 '18 at 19:01
  • that link is dead too. see this: https://bytepointer.com/resources/pietrek_crash_course_depths_of_win32_seh.htm – Barış Akkurt Jun 11 '20 at 13:37