AppDomain.UnhandeledException 事件未触发
在 WPF 应用程序中,应用程序只是崩溃,而不触发上述事件。
(我还注册了 DispatcherUnhandeledException,它也不会触发。)
我的结论是它不会触发,因为处理程序被定义为放置日志条目。查看日志时,没有相应的条目。
它发生在生产环境中;我无法指出特定场景。
我读过一些关于可能发生这种情况的场景的描述,但我仍然对此没有明确的把握。谁能分享他在这方面的经验/知识?
如何找到崩溃的根源并解决它?
非常感谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
造成这种情况的常见原因是 StackOverflowException 或 OutOfMemoryException。要查找原因,您可以附加 Visual Studio 调试器并启用所有异常 在“例外”窗口中。当您的应用程序发生任何异常时,系统会提示您。
Common causes for this would be a
StackOverflowException
or anOutOfMemoryException
. 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.