views:

22

answers:

1

In a WPF application, the app simply crashes, without the above event being fired.

(I'm also registered to DispatcherUnhandeledException, which doesn't fire as well.)

I conclude that it doesn't fire since the handler is defined to place a log entry. When looking at the log, there's no corresponding entry.

It happens in a production environment; I'm unable to point at a particular scenario.

I've read few descriptions on scenarios where this might happen, but I still don't have a clear grasp on this. Can anyone share his experience / knowledge on this?

How can I find the root of the crash and solve it?

Many thanks.

+1  A: 

Common causes for this would be a StackOverflowException or an OutOfMemoryException. To find the cause you could attach the Visual Studio Debugger and enable all Exceptions in the Exceptions window. You will then be prompted when any exception occurs in your application.

bitbonk
It happens at production, and at no known particular scenario, so attaching a debugger isn't a relevant solution. Besides, I believe that a debugger won't catch it, since no exception is thrown.
Yaakov Davis
You can not know if no excpetion is thrown. It could well be that your UnhandledExceptionHandler was just not able to catch it or wasn't able to log it.
bitbonk