Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# WER报告的神秘IL偏移量_C#_.net_Windows Error Reporting - Fatal编程技术网

C# WER报告的神秘IL偏移量

C# WER报告的神秘IL偏移量,c#,.net,windows-error-reporting,C#,.net,Windows Error Reporting,我正在尝试解析Windows错误报告(report.wer) 以下是报告的一部分: Version=1 EventType=CLR20r3 ... snip ... Sig[0].Name=問題の署名 01 Sig[0].Value=myapp.exe Sig[1].Name=問題の署名 02 Sig[1].Value=2.2.0.1 Sig[2].Name=問題の署名 03 Sig[2].Value=541bc264 Sig[3].Name=問題の署名 04 Sig[3].Value=Sy

我正在尝试解析Windows错误报告(report.wer)

以下是报告的一部分:

Version=1
EventType=CLR20r3

... snip ...

Sig[0].Name=問題の署名 01
Sig[0].Value=myapp.exe
Sig[1].Name=問題の署名 02
Sig[1].Value=2.2.0.1
Sig[2].Name=問題の署名 03
Sig[2].Value=541bc264
Sig[3].Name=問題の署名 04
Sig[3].Value=System
Sig[4].Name=問題の署名 05
Sig[4].Value=2.0.0.0
Sig[5].Name=問題の署名 06
Sig[5].Value=4a275e12
Sig[6].Name=問題の署名 07
Sig[6].Value=2919
Sig[7].Name=問題の署名 08
Sig[7].Value=ef
Sig[8].Name=問題の署名 09
Sig[8].Value=System.IO.IOException

... snip ...
(其中
問題の署名表示
问题签名

由苏教授,我发现:

  • 故障组件是版本2.0.0.0的
    系统
  • 故障方法标记是
    06002919
  • 故障IL偏移量为
    ef
但问题是IL偏移值
ef

System
的方法
06002919
没有
IL\u 00ef

以下是方法的定义
06002919

  .method /*06002919*/ assembly hidebysig 
          instance bool  Poll(int32 microSeconds,
                              valuetype System.Net.Sockets.SelectMode/*0200059D*/ mode) cil managed
  {
    // コード サイズ       81 (0x51)
    .maxstack  4
    .locals /*11000641*/ init (class System.Net.Sockets.Socket/*020005A0*/ V_0,
             object[] V_1)
    IL_0000:  ldarg.0
    IL_0001:  ldfld      bool System.Net.Sockets.NetworkStream/*02000547*/::m_CleanedUp /* 040027EA */
    IL_0006:  brfalse.s  IL_0019

    IL_0008:  ldarg.0
    IL_0009:  call       instance class [mscorlib/*23000001*/]System.Type/*01000065*/ [mscorlib/*23000001*/]System.Object/*01000001*/::GetType() /* 0A00006C */
    IL_000e:  callvirt   instance string [mscorlib/*23000001*/]System.Type/*01000065*/::get_FullName() /* 0A000136 */
    IL_0013:  newobj     instance void [mscorlib/*23000001*/]System.ObjectDisposedException/*01000179*/::.ctor(string) /* 0A0006A9 */
    IL_0018:  throw

    IL_0019:  ldarg.0
    IL_001a:  ldfld      class System.Net.Sockets.Socket/*020005A0*/ System.Net.Sockets.NetworkStream/*02000547*/::m_StreamSocket /* 040027E5 */
    IL_001f:  stloc.0
    IL_0020:  ldloc.0
    IL_0021:  brtrue.s   IL_0048

    IL_0023:  ldstr      "net_io_readfailure" /* 70011B97 */
    IL_0028:  ldc.i4.1
    IL_0029:  newarr     [mscorlib/*23000001*/]System.Object/*01000001*/
    IL_002e:  stloc.1
    IL_002f:  ldloc.1
    IL_0030:  ldc.i4.0
    IL_0031:  ldstr      "net_io_connectionclosed" /* 70011BBD */
    IL_0036:  call       string System.SR/*02000009*/::GetString(string) /* 06000029 */
    IL_003b:  stelem.ref
    IL_003c:  ldloc.1
    IL_003d:  call       string System.SR/*02000009*/::GetString(string,
                                                                 object[]) /* 06000028 */
    IL_0042:  newobj     instance void [mscorlib/*23000001*/]System.IO.IOException/*01000161*/::.ctor(string) /* 0A0006FD */
    IL_0047:  throw

    IL_0048:  ldloc.0
    IL_0049:  ldarg.1
    IL_004a:  ldarg.2
    IL_004b:  callvirt   instance bool System.Net.Sockets.Socket/*020005A0*/::Poll(int32,
                                                                                   valuetype System.Net.Sockets.SelectMode/*0200059D*/) /* 06002CDB */
    IL_0050:  ret
  } // end of method NetworkStream::Poll
我是不是误读了什么?我怎样才能正确解读WER报告



上面IL转储的源System.dll取自我的开发机器上的GAC(C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089),而不是目标机器。

问题最有可能是由尝试解码WER日志的机器上的System.dll与发生异常的机器上的System.dll之间的差异引起的。从发生异常的计算机中获取System.dll并使用该文件

例如,在我的计算机上,此令牌(06002919)导致
计时器
构造函数:)


这个DLL有很多修订版本,你用的那个很旧。我盲目猜测您使用了c:\windows\microsoft.net\framework中的引用程序集。您需要存储在GAC中c:\windows\assembly中的System.dll副本,最好是从该计算机上获得。但是,如果元数据标记是正确的,那么本机select()函数调用就会失败。如果你知道原因就好了:)@HansPassant-Hmm,你的意思是System.dll的各种版本似乎都有相同版本的2.0.0.0吗?我是在我的开发人员PC(而不是目标机器)上从GAC获得System.dll的。不管怎样,我会补充我是如何得到这个的。非常感谢你的回答。不幸的是,目标机器是在一个由严格的安全控制守卫的工厂里,所以我不能轻易抓住它。。。但是我会试着检查我周围的一些机器。我已经验证了System.dll有不同的文件版本(2.0.50727.nnnn),并且它们都有相同的程序集版本2.0.0.0。我想这就是答案。现在我从目标机器获得了dll,发现System.dll是2.0.50727.4927,其中方法
06002919
NetworkStream::BeginRead
,它有
IL\u 00ef
。谢谢。
.class /*0200054C*/ abstract auto ansi nested assembly beforefieldinit Timer
...
{
  ...
  .method /*06002919*/ assembly hidebysig specialname rtspecialname 
        instance void  .ctor(int32 durationMilliseconds) cil managed
  {
    ...
    IL_0018:  ret
  } // end of method Timer::.ctor
}