No Signs of Fetal Exception when application crashed | NLog version 2 | Compact Framework 3.5
I have a .Net Compact Framework 3.5 application which uses Nlog version 2.0 to log Info,Error and Fetal Exceptions. Most of the time the logging works as expected and logs fetal exceptions before crashing. But at times its observed that application crashes without leaving any signs of an error/exception.
Let me elaborate the scenario -
1> The Application creates few threads, all the threads have try-catch block added at the beginning of their call stacks. And hence log fetal exceptions before crashing.
2> The main thread have 'AppDomain.CurrentDomain.UnhandledException' to log any fetal exceptions on its call stack.
3> The application does load some third party managed dlls and performs some PInvokes on Wnce dlls.
But I believe even if some third party dll crashes (or lets say it creates a new thread which crashes), I should atleast see some ThreadAbortExceptions in the log, logged by my application's thread before exiting.
The key configuration parameters of Nlog-
a> FileTarget.AutoFlush = true
c>FileTarget is not wrapped in any async wrapper or in any buffered wrapper.