某些情况下,当程序崩溃时异常没有被程序捕获,就会出现UnhandledExceptionFilter这种情况,会弹出下图的系统错误弹窗
遇到此错误时,手动获取问题进程的dump文件,您可以按照本文来标识导致异常的 DLL 中的步骤
堆栈中有UnhandledExceptionFilter的情况
1.在 Windbg.exe,打开.dmp 文件的进程,并配置符号路径
2.在命令提示符下键入~ * kb列出所有进程中的线程
3.找到有函数调用的线程 Kernel32! UnhandledExceptionFilter,并切换到这个线程查看堆栈
# ChildEBP RetAddr Args to Child
00 04abe580 76d84bf3 00000000 00000000 00000000 win32u!NtUserWaitMessage+0xc (FPO: [0,0,0])
WARNING: Stack unwind information not available. Following frames may be wrong.
01 04abe5c0 76d84ae4 00000000 00000000 00000000 user32+0x24bf3
02 04abe5f0 76de229b 00000000 76de0690 04abe830 user32+0x24ae4
03 04abe6bc 76de1031 04abe830 0a621d90 00000000 user32+0x8229b
04 04abe818 76de1af7 0a621d90 07f69368 00000000 user32+0x81031
05 04abe8a4 76de192e 00000000 0a621d90 07f69368 user32+0x81af7
06 04abe8d8 76de1645 00000000 00aade00 00a9b590 user32+0x8192e
07 04abe8f8 00a8f543 00000000 00aade00 00a9b590 user32+0x81645
08 04abe930 00a80b41 00aade00 00a9b590 00012010 xxx进程!__crtMessageBoxA+0x160 (FPO: [Non-Fpo]) (CONV: cdecl) [f:\dd\vctools\crt_bld\self_x86\crt\src\crtmbox.c @ 158]
09 04abe958 00a7a9fc 0000000a 00000000 77615c10 xxx进程!_NMSG_WRITE+0x16f (FPO: [Non-Fpo]) (CONV: cdecl) [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0msg.c @ 242]
0a 04abec90 00a834e0 21876de5 00000000 00000000 xxx进程!abort+0x26 (FPO: [Non-Fpo]) (CONV: cdecl) [f:\dd\vctools\crt_bld\self_x86\crt\src\abort.c @ 59]
0b 04abecc0 00a8432b 04abed64 75eb2432 04abed94 xxx进程!terminate+0x33 (FPO: [Non-Fpo]) (CONV: cdecl) [f:\dd\vctools\crt_bld\self_x86\crt\prebuild\eh\hooks.cpp @ 130]
*** WARNING: Unable to verify timestamp for KERNELBASE.dll
0c 09a8f644 77ea7e7a 09a8f66c