P.T.C
首先,我们来查看“P.T.C”报告了什么:
***** Activity prior to crash *****
……….
Thread Terminate: Process=0, Thread=11, Exit Code=0
Thread Terminate: Process=0, Thread=6, Exit Code=0
First chance exception c0000005 (Access Violation) occurred
Thread stopped.
它基本上打印出了崩溃之前的DEBUG OUTPUT的内容。
Report
这个“Report”是Exception Monitor一个很强悍的功能,看看它都能告诉我些什么:
***********************************************************
* Exception Monitor Log Analyzer Report version 7.0.0.0
* Report Created from: f:\Program Files\Exception Monitor 7.1\bin\em\logs\OOP_5456-15335-719-2003.dbl
* Report Created on: July 20,2003 at 05:49 PM
* The following fault type was detected: Access Violation
* Exception Monitor 7.1.2195.5
* Log generated on: 2003-7-19 15:04:23
***********************************************************
The service faulted in thread # 15
The stack for the faulting thread follows. Column 1 shows the Child EBP, Column 2 shows the Return Address, Column 3 shows the module called, and column 4 shows the resolved name if column 3 was not able to locate or use symbols. To read the stack, start at the bottom and work your way up. The function on the bottom called the function above it, which called the function above it, etc.
0000000000c6fce4 0000000077f58cca ntdll!0x0000000077F83AED (No FPO)
0000000000c6fdb8 0000000077190729 ntdll!0x0000000077F58CCA (No FPO)
0000000000000001 0000000000000000 ole32!0x0000000077190729 (No FPO)
*****
The following is extended information from the log:
00c6fcd8 : 00080000
00c6fcdc : 000e78a8
00c6fce0 : 00000000
00c6fce4 : 00c6fdb8
00c6fce8 : 77f58cca : C:\WINDOWS\System32\ntdll.dll+0x8cca
00c6fcec : 00080000
……
!inetdbg.ds c6fd98 to dump next block
……………..
……………….
…………………..
…………..
由于没有Windows XP Symbols,Exception Monitor并不能如愿地告诉你崩溃到底发生在哪一个函数,虽然我们知道是NTDLL.DLL的0x77f83aed指令。
W32dasm
NTDLL.DLL的“0x77f83aed”指令可能是什么方面的函数调用呢?
我们用W32dasm加载了NTDLL.DLL,它会进行Disassemble,我们可以看到输出的函数,如下图所示:
从指令地址来看,“0x77f83aed”指令似乎是RtlFreeHeap附近,总之都是涉及释放堆栈。
COM+进程映像转储
Windows XP的Component Service提供了一种新功能“进程映像转储”。
进程转储工具概念
通过将 COM+ 应用程序失败时的状态转储到指定目录中,进程转储工具允许管理员简化开发人员调试应用程序的任务。以下是失败情况的例子:
- 应用程序挂起并不再响应客户端。
- 应用程序导致了异常并被 COM+ 运行时终止。
- 应用程序失败。
在所有这些情况中,进程转储功能允许转储失败时的整个进程状态,启用更为有效的应用程序失败调试。
这个设置针对某一个COM+应用,如下图所示:
这样,当Tomo_UM_X应用自动关闭时发生的崩溃,就会被COM+把进程映像转储到指定的目录中,存储的文件名类似于:
{424102D6-D93F-42D8-98A4-E39ADDD8DD32}_2003_07_20_11_51_02.dmp
可以用Microsoft Visual Studio .NET打开这个文件,然后“启动新实例”,就可以重现当时的情景,如下所示:
Disclaimers:
本文档所包含的信息代表了在发布之日,zhengyun对所讨论问题的当前看法。本文档不应理解为zhengyun一方的承诺,zhengyun不保证所给信息在发布之日以后的准确性。
本文档仅供参考。
用户必须遵守所有适用的版权法。在不对版权法所规定的权利加以限制的情况下,如未得到 zhengyun和CSDN.Net明确的书面许可,不得出于任何目的、以任何形式或手段(电子的、机械的、影印、录制等等)复制、传播本文的任何部分,也不得将其存储或引入到检索系统中。
Written by zhengyun (at) tomosoft.com