如何分析Windows Crash Reporter生成的WERInternalMetadata.xml文件? [英] How to analyse WERInternalMetadata.xml file generated by Windows Crash Reporter?

查看:302
本文介绍了如何分析Windows Crash Reporter生成的WERInternalMetadata.xml文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.Net 4.0应用程序会为用户崩溃,但对他来说,我无法重现该错误。他附加了Windows Crash Reporter生成的 WERInternalMetadata.xml 文件。通过打开它,我发现它是一个 System.IO.FileNotFoundException 崩溃的软件,但是,没有函数调用,该函数会抛出那种异常,因此是其他地方或更深层的问题。

A .Net 4.0 app keeps crashing for a user, but just for him, I could not reproduce the bug. He attached the WERInternalMetadata.xml file generated by the Windows Crash Reporter. By opening it I found out that it's a System.IO.FileNotFoundException that crashes the software, however, there are no functions called in that function that would throw that kind of exception, so the is problem somewhere else or deeper.

这是文件中最有趣的部分。它包含(十六进制)数字,但我找不到它们的意思。

This is the "most interesting" part of the file. It contains (hexadecimal) numbers, but I couldn't find out what they mean.

<ProblemSignatures>
    <EventType>CLR20r3</EventType>
    <Parameter0>rstvshowtracker.exe</Parameter0>
    <Parameter1>1.0.3842.33258</Parameter1>
    <Parameter2>4c374e79</Parameter2>
    <Parameter3>mscorlib</Parameter3>
    <Parameter4>4.0.0.0</Parameter4>
    <Parameter5>4ba1da6f</Parameter5>
    <Parameter6>1620</Parameter6>
    <Parameter7>14</Parameter7>
    <Parameter8>System.IO.FileNotFoundException</Parameter8>
</ProblemSignatures>

有办法找出哪个代码导致异常,或至少找出更多细节比 FileNotFoundException

Is there a way to find out which code causes the exception, or at least to find out some more details than the FileNotFoundException?

推荐答案

首先, trace:

<Parameter0>rstvshowtracker.exe</Parameter0> - your exe
<Parameter1>1.0.3842.33258</Parameter1> - version of your exe
<Parameter2>4c374e79</Parameter2> - exe timestamp
<Parameter3>mscorlib</Parameter3> - assembly / module
<Parameter4>4.0.0.0</Parameter4> - assembly version
<Parameter5>4ba1da6f</Parameter5> - assm timestamp
<Parameter6>1620</Parameter6> - methodDef token of faulting method 
<Parameter7>14</Parameter7> - IL offset of faulting instruction
<Parameter8>System.IO.FileNotFoundException</Parameter8> - exception

你可以使用WinDBG和SOS来找出这个方法是什么(例如1620)。请参阅这里的示例如何做:
http://blogs.msdn.com/b/oanapl/archive/2009/01/30/windows-error-reporting-wer-and-clr-integration。 aspx

You could use WinDBG and SOS to find out what that method is (e.g. 1620). See the example here on how to do it: http://blogs.msdn.com/b/oanapl/archive/2009/01/30/windows-error-reporting-wer-and-clr-integration.aspx

...或者,您可以在应用程序中连接unhandledException事件,并将异常堆栈跟踪打印到日志文件,以查看是什么原因导致的问题;例如

...Alternatively, you could hook up the unhandledException event in your application, and print out the exception stack trace to a log file, to see what caused the issue; e.g.

static void MyHandler(object sender, UnhandledExceptionEventArgs args) 
{
   Exception e = (Exception) args.ExceptionObject;
   // print out the exception stack trace to a log
}

public static void Main() 
{
   AppDomain currentDomain = AppDomain.CurrentDomain;
   currentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler);
}

这篇关于如何分析Windows Crash Reporter生成的WERInternalMetadata.xml文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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