无法捕获的 .NET 运行时 2.0 错误 - 用户机器 - 下一步是什么? [英] Uncatchable .NET runtime 2.0 error - user machine - what next?

查看:15
本文介绍了无法捕获的 .NET 运行时 2.0 错误 - 用户机器 - 下一步是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

情况:

我有一个广泛使用 http 连接的应用程序(流翻录应用程序),它应该可以 24/7 全天候工作.确实如此.

但是,偶尔它会因运行时错误而崩溃,该错误在任何地方都未捕获,并将以下内容转储到事件日志中:

事件类型:错误事件源:.NET Runtime 2.0 错误报告事件类别:无事件 ID:5000日期:13.10.2010时间:11:02:30用户:不适用电脑:STREAM01描述:EventType clr20r3, P1 streamsink.exe, P2 1.0.0.42484, P3 4c880fd9, P4 mscorlib, P5 2.0.0.0, P6 4add54dc, P7 344a, P8 21c, P9 system.io.ioexception, P10

我的问题是:如何知道哪一行代码导致了崩溃.我正在使用二进制文件部署 .PDB,但是...该怎么办?

目标是 Windows XP,框架是 2.0

我已经实现了:

 static public void InitializeExceptionHandler(string AppName) {Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);AppDomain currentDomain = AppDomain.CurrentDomain;currentDomain.UnhandledException+=new UnhandledExceptionEventHandler(currentDomain_UnhandledException);_appName=应用名称;}

不,它不起作用!

解决方案

也许这篇文章会有所帮助 一个在 WinForms 中捕获未处理异常的简单类

更新:

这很奇怪..所以抓住ProcDump,写批处理文件并让您的客户在看到错误消息时运行它.获取转储并尝试通过 WinDbg 或 VS 2010.此处 提供更多信息.

还要检查:创建和分析 .NET 生产应用程序中的小型转储.如果您不熟悉 WinDbg,请查看 Tess Ferrandez 的博客>

另一种方法是 远程调试设置

Situation:

I have an application that uses http connections extensively (stream ripping app) and it is supposed to work 24/7. And it does.

However, occasionally, it crashes with runtime error that is uncaught anywhere, and dumps following to the event log:

Event Type: Error
Event Source:   .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID:   5000
Date:       13.10.2010
Time:       11:02:30
User:       N/A
Computer:   STREAM01
Description:
EventType clr20r3, P1 streamsink.exe, P2 1.0.0.42484, P3 4c880fd9, P4 mscorlib, P5 2.0.0.0, P6 4add54dc, P7 344a, P8 21c, P9 system.io.ioexception, P10 NIL.

My question is: how to know what line of code caused the crash. I am deploying .PDBs with the binaries, but... What to do?

Target is WIndows XP, Framework is 2.0

EDIT:

I have this already implemented:

    static public void InitializeExceptionHandler(string AppName) {
        Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
        Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
        AppDomain currentDomain = AppDomain.CurrentDomain;
        currentDomain.UnhandledException+=new UnhandledExceptionEventHandler(currentDomain_UnhandledException);
        _appName=AppName;
    }

No, it doesn't work!

解决方案

Maybe this article will be helpful A Simple Class to Catch Unhandled Exceptions in WinForms

UPDATE:

It very strange.. So grab ProcDump, write batch file and ask your customer to run it when he see error message. Get dump and try to investigate it via WinDbg or VS 2010. Here some more information.

Also check: Creating and analyzing minidumps in .NET production applications. If you are new to WinDbg, check Tess Ferrandez's blog

Another way go with Remote Debugging Setup

这篇关于无法捕获的 .NET 运行时 2.0 错误 - 用户机器 - 下一步是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆