【发布时间】:2011-05-15 11:58:58
【问题描述】:
我正在尝试调试一些行为奇怪的 .NET 可执行文件(我没有源代码)。
当使用 WinDBG 附加到它时,我注意到它抛出了 IndexOutOfRangeException。
我试图了解哪一行实际上引发了这个异常——我如何才能看到导致这个异常的索引访问?
我可以使用 !CLRStack 查看堆栈,但它不会引导我找到抛出它的确切代码行。
这就是我在 !CLRStack 中看到的:
0015ec9c 6f1459d8 System.Management.Instrumentation.InstrumentedAssembly+TypeInfo.Fire(System.Object)
0015eccc 6f144bdc System.Management.Instrumentation.InstrumentedAssembly.Fire(System.Type, System.Object)
0015ecd8 6f145164 System.Management.Instrumentation.InstrumentedAssembly.Fire(System.Object)
0015ecec 6f142268 System.Management.Instrumentation.Instrumentation.Fire(System.Object)
0015ecf8 034ce47b InstallerLibrary.InstallerInterface.WMIEventGenerator.FireEvent(System.Object)
0015ed2c 0393970c InstallerLibrary.InstallerInterface.WMIEventGenerator.GenerateServerAlive(UInt32)
0015ed54 039396b7 InstallerLibrary.InstallerInterface.InstallerInterface.NotifyServerAlive(UInt32)
0015ed60 03939655 InstallerLibrary.InstallaterManager.NotifyServerAlive(UInt32)
0015ed88 00580f13 InstallerInit.Class1.Main(System.String[])
【问题讨论】:
-
如果你没有代码你会怎么做?
-
我会联系负责它的团队,告诉他们到底哪里出了问题,因为他们没有在真实系统上进行测试。
-
只需将堆栈跟踪发送给他们。他们会告诉你需要什么进一步的信息。
-
在没有任何可靠的情况下向他们提出这个问题将被丢弃为“无法在我们的系统上重现”。我想准确显示代码的哪一部分失败了。这可能吗?
-
向他们发送进程转储。使用
.dump /ma命令创建一个。他们无法在内部重现问题这一事实不是借口,而是无知或无能的表现。
标签: c# debugging windbg indexoutofboundsexception