windbg解决程序CPU占用率高,内存占用时高时低现象

 

用windbg attach 该进程,


Microsoft (R) Windows Debugger Version 6.11.0001.404 X86
Copyright (c) Microsoft Corporation. All rights reserved.

*** wait with pending attach
Symbol search path is: SRV*D:\symbols*http://msdl.microsoft.com/download/symbols;D:\code2\version2,3,3,3-2012-05-10_18-46\bin\release
Executable search path is:
ModLoad: 00400000 02201000   D:\Fetion测试环境\Fetion.exe
ModLoad: 7c920000 7c9b6000   C:\WINDOWS\system32\ntdll.dll
ModLoad: 7c800000 7c91e000   C:\WINDOWS\system32\kernel32.dll
ModLoad: 76300000 7631d000   C:\WINDOWS\system32\IMM32.dll
ModLoad: 77da0000 77e49000   C:\WINDOWS\system32\ADVAPI32.dll
ModLoad: 77e50000 77ee3000   C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77fc0000 77fd1000   C:\WINDOWS\system32\Secur32.dll
ModLoad: 77ef0000 77f39000   C:\WINDOWS\system32\GDI32.dll
ModLoad: 77d10000 77da0000   C:\WINDOWS\system32\USER32.dll
ModLoad: 10000000 10008000   D:\Fetion测试环境\OutlookAgent.dll
ModLoad: 76990000 76ace000   C:\WINDOWS\system32\ole32.dll
ModLoad: 77be0000 77c38000   C:\WINDOWS\system32\msvcrt.dll
ModLoad: 770f0000 7717b000   C:\WINDOWS\system32\OLEAUT32.dll
ModLoad: 78520000 785c3000   C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43\MSVCR90.dll
ModLoad: 78480000 7850e000   C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.6161_x-ww_31a54e43\MSVCP90.dll
ModLoad: 76320000 76367000   C:\WINDOWS\system32\COMDLG32.dll
ModLoad: 77180000 77283000   C:\WINDOWS\WinSxS\X86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\COMCTL32.dll
ModLoad: 77f40000 77fb6000   C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 7d590000 7dd84000   C:\WINDOWS\system32\SHELL32.dll
ModLoad: 71a20000 71a37000   C:\WINDOWS\system32\WS2_32.dll
ModLoad: 71a10000 71a18000   C:\WINDOWS\system32\WS2HELP.dll
ModLoad: 762f0000 762f5000   C:\WINDOWS\system32\MSIMG32.dll
ModLoad: 43ce0000 43e13000   C:\WINDOWS\system32\urlmon.dll
ModLoad: 3eab0000 3ec9b000   C:\WINDOWS\system32\iertutil.dll
ModLoad: 4ae90000 4b03b000   C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.6002.22791_x-ww_c8dff154\gdiplus.dll
ModLoad: 76d30000 76d48000   C:\WINDOWS\system32\IPHLPAPI.DLL
ModLoad: 3e410000 3e4f6000   C:\WINDOWS\system32\WININET.dll
ModLoad: 003a0000 003a9000   C:\WINDOWS\system32\Normaliz.dll
ModLoad: 76b10000 76b3a000   C:\WINDOWS\system32\WINMM.dll
ModLoad: 02210000 022f0000   D:\Fetion测试环境\StatisticsDataDLL.dll
ModLoad: 003c0000 003fb000   D:\Fetion测试环境\ResPackage.dll
ModLoad: 77bd0000 77bd8000   C:\WINDOWS\system32\VERSION.dll
ModLoad: 02300000 02417000   D:\Fetion测试环境\fhlib.dll
ModLoad: 02430000 02474000   D:\Fetion测试环境\CloudFileCentre.dll
ModLoad: 02490000 0249b000   D:\Fetion测试环境\NatDetector.dll
ModLoad: 024b0000 025c7000   D:\Fetion测试环境\LIBEAY32.dll
ModLoad: 71a40000 71a4b000   C:\WINDOWS\system32\WSOCK32.dll
ModLoad: 025d0000 02615000   D:\Fetion测试环境\SSLEAY32.dll
ModLoad: 02620000 02696000   D:\Fetion测试环境\FileTransferV4.dll
ModLoad: 026b0000 026da000   D:\Fetion测试环境\UPnP_PortForward.dll
ModLoad: 74d90000 74dfd000   C:\WINDOWS\system32\RICHED20.dll
ModLoad: 72240000 72245000   C:\WINDOWS\system32\SensApi.dll
ModLoad: 026f0000 0272c000   D:\Fetion测试环境\PcDevice.dll
ModLoad: 02740000 0275b000   D:\Fetion测试环境\AdbWinApi.dll
ModLoad: 76060000 761b6000   C:\WINDOWS\system32\SETUPAPI.dll
ModLoad: 76c00000 76c2e000   C:\WINDOWS\system32\WINTRUST.dll
ModLoad: 765e0000 76673000   C:\WINDOWS\system32\CRYPT32.dll
ModLoad: 76db0000 76dc2000   C:\WINDOWS\system32\MSASN1.dll
ModLoad: 76c60000 76c88000   C:\WINDOWS\system32\IMAGEHLP.dll
ModLoad: 02760000 0276c000   D:\Fetion测试环境\UdpPunch.dll
ModLoad: 02780000 0278f000   D:\Fetion测试环境\ReliableSock.dll
ModLoad: 62c20000 62c29000   C:\WINDOWS\system32\LPK.DLL
ModLoad: 73fa0000 7400b000   C:\WINDOWS\system32\USP10.dll
ModLoad: 68d60000 68e01000   D:\Fetion测试环境\dbghelp.dll
ModLoad: 5adc0000 5adf7000   C:\WINDOWS\system32\uxtheme.dll
ModLoad: 67340000 67406000   C:\Program Files\360\360Safe\safemon\safemon.dll
ModLoad: 76bc0000 76bcb000   C:\WINDOWS\system32\PSAPI.DLL
ModLoad: 74680000 746cc000   C:\WINDOWS\system32\MSCTF.dll
ModLoad: 49010000 49096000   C:\WINDOWS\system32\Msftedit.dll
ModLoad: 73640000 7366e000   C:\WINDOWS\system32\msctfime.ime
ModLoad: 038c0000 03b28000   C:\WINDOWS\system32\GOOGLEPINYIN2.IME
ModLoad: 759d0000 75a7f000   C:\WINDOWS\system32\USERENV.dll
ModLoad: 65700000 6572e000   C:\Program Files\360\360Safe\safemon\iNetSafe.dll
ModLoad: 76fa0000 7701f000   C:\WINDOWS\system32\CLBCATQ.DLL
ModLoad: 77020000 770ba000   C:\WINDOWS\system32\COMRes.dll
ModLoad: 042e0000 04323000   D:\Fetion测试环境\FetionShow\AvatarX.dll
ModLoad: 04330000 0436e000   C:\Program Files\China Mobile\Fetion\DynamicGifCtl2.dll
ModLoad: 719c0000 719fe000   C:\WINDOWS\system32\mswsock.dll
ModLoad: 60fd0000 61025000   C:\WINDOWS\system32\hnetcfg.dll
ModLoad: 71a00000 71a08000   C:\WINDOWS\System32\wshtcpip.dll
ModLoad: 76eb0000 76eec000   C:\WINDOWS\system32\RASAPI32.dll
ModLoad: 76e60000 76e72000   C:\WINDOWS\system32\rasman.dll
ModLoad: 5fdd0000 5fe25000   C:\WINDOWS\system32\NETAPI32.dll
ModLoad: 76e80000 76eaf000   C:\WINDOWS\system32\TAPI32.dll
ModLoad: 76e50000 76e5e000   C:\WINDOWS\system32\rtutils.dll
ModLoad: 77c40000 77c65000   C:\WINDOWS\system32\msv1_0.dll
ModLoad: 76760000 7676c000   C:\WINDOWS\system32\cryptdll.dll
ModLoad: 76f90000 76f96000   C:\WINDOWS\system32\rasadhlp.dll
ModLoad: 76f20000 76f28000   C:\WINDOWS\system32\WtsApi32.dll
ModLoad: 762d0000 762e0000   C:\WINDOWS\system32\WINSTA.dll
ModLoad: 76ef0000 76f17000   C:\WINDOWS\system32\DNSAPI.dll
ModLoad: 16080000 16099000   C:\Program Files\Bonjour\mdnsNSP.dll
ModLoad: 68000000 68036000   C:\WINDOWS\system32\rsaenh.dll
ModLoad: 75af0000 75b01000   C:\WINDOWS\system32\devenum.dll
ModLoad: 09fa0000 0a022000   D:\Fetion测试环境\FetionShow\Document.dll
ModLoad: 0a340000 0a393000   D:\Fetion测试环境\FetionShow\KuwatarTaskSvc.dll
ModLoad: 0a3c0000 0a409000   D:\Fetion测试环境\FetionShow\view.dll
ModLoad: 0a430000 0a48b000   D:\Fetion测试环境\FetionShow\DownloadSvc.dll
ModLoad: 75e00000 75eae000   C:\WINDOWS\system32\SXS.DLL
ModLoad: 3eca0000 3f73c000   C:\WINDOWS\system32\ieframe.dll
ModLoad: 058a0000 058b7000   D:\Program Files\Lingoes\Translator2\opentext22.dll
ModLoad: 61880000 618ba000   C:\WINDOWS\system32\OLEACC.dll
ModLoad: 767c0000 767e9000   C:\WINDOWS\system32\schannel.dll
ModLoad: 68100000 68126000   C:\WINDOWS\system32\dssenh.dll
ModLoad: 0c480000 0c9c9000   C:\WINDOWS\system32\xpsp2res.dll
ModLoad: 757d0000 757e3000   C:\WINDOWS\system32\cryptnet.dll
ModLoad: 4a410000 4a469000   C:\WINDOWS\system32\WINHTTP.dll
ModLoad: 76f30000 76f5c000   C:\WINDOWS\system32\WLDAP32.dll
ModLoad: 750b0000 750c3000   C:\WINDOWS\system32\Cabinet.dll
(1514.152c): Break instruction exception - code 80000003 (first chance)
eax=7ffde000 ebx=00000001 ecx=00000002 edx=00000003 esi=00000004 edi=00000005
eip=7c92120e esp=0ca0ffcc ebp=0ca0fff4 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00000246
ntdll!DbgBreakPoint:
7c92120e cc              int     3
Missing image name, possible paged-out or corrupt data.
Missing image name, possible paged-out or corrupt data.
Missing image name, possible paged-out or corrupt data.
0:031> g
CRsaHelper::EncryptDataNet --> return hr=0x0ModLoad: 05a10000 05a2c000   D:\Fetion测试环境\fms.dll
**2012/08/30 11:34:41:load rapi.dll failed!!183
ModLoad: 73af0000 73b02000   C:\WINDOWS\system32\avicap32.dll
ModLoad: 73b40000 73b60000   C:\WINDOWS\system32\MSVFW32.dll
(1514.94c): C++ EH exception - code e06d7363 (first chance)
(1514.f0c): Break instruction exception - code 80000003 (first chance)
eax=7ffde000 ebx=00000001 ecx=00000002 edx=00000003 esi=00000004 edi=00000005
eip=7c92120e esp=05adffcc ebp=05adfff4 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00000246
ntdll!DbgBreakPoint:
7c92120e cc              int     3
Missing image name, possible paged-out or corrupt data.
Missing image name, possible paged-out or corrupt data.
Missing image name, possible paged-out or corrupt data.
0:023> k
ChildEBP RetAddr 
05adffc8 7c972119 ntdll!DbgBreakPoint
05adfff4 00000000 ntdll!DbgUiRemoteBreakin+0x2d
0:023> k
ChildEBP RetAddr 
05adffc8 7c972119 ntdll!DbgBreakPoint
05adfff4 00000000 ntdll!DbgUiRemoteBreakin+0x2d
0:023> g
ModLoad: 0d180000 0dba3000   C:\WINDOWS\system32\Macromed\Flash\Flash32_11_4_402_265.ocx
ModLoad: 73e70000 73ecc000   C:\WINDOWS\system32\DSOUND.dll
ModLoad: 73aa0000 73ab5000   C:\WINDOWS\system32\mscms.dll
ModLoad: 72f70000 72f96000   C:\WINDOWS\system32\WINSPOOL.DRV

OnReadyStateChange 3

OnReadyStateChange 4

OnReadyStateChange 4

OnReadyStateChange 3

OnReadyStateChange 4

OnReadyStateChange 4
ModLoad: 72c90000 72c99000   C:\WINDOWS\system32\wdmaud.drv
ModLoad: 72c80000 72c88000   C:\WINDOWS\system32\msacm32.drv
ModLoad: 77bb0000 77bc5000   C:\WINDOWS\system32\MSACM32.dll
ModLoad: 77ba0000 77ba7000   C:\WINDOWS\system32\midimap.dll
ModLoad: 0e5f0000 0e669000   D:\Fetion测试环境\FetionShow\TinyFlash.dll
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.100c): Break instruction exception - code 80000003 (first chance)
eax=7ffde000 ebx=00000001 ecx=00000002 edx=00000003 esi=00000004 edi=00000005
eip=7c92120e esp=0e99ffcc ebp=0e99fff4 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00000246
ntdll!DbgBreakPoint:
7c92120e cc              int     3
0:040> k
ChildEBP RetAddr 
0e99ffc8 7c972119 ntdll!DbgBreakPoint
0e99fff4 00000000 ntdll!DbgUiRemoteBreakin+0x2d
0:040> !runaway              //因为程序反复出现 CPU, 内存 时高时低现象,看看那个线程在占用内核时间。
 User Mode Time
  Thread       Time
  31:df0       0 days 0:00:08.640
   0:1004      0 days 0:00:03.750
  17:fb8       0 days 0:00:00.250
  20:15f0      0 days 0:00:00.171
   8:b90       0 days 0:00:00.156
  22:11d4      0 days 0:00:00.031
  30:b88       0 days 0:00:00.015
  16:17b0      0 days 0:00:00.015
  13:c60       0 days 0:00:00.015
   7:154c      0 days 0:00:00.015
   6:94c       0 days 0:00:00.015
  40:100c      0 days 0:00:00.000
  39:10e0      0 days 0:00:00.000
  38:1574      0 days 0:00:00.000
  37:160c      0 days 0:00:00.000
  36:12e4      0 days 0:00:00.000
  35:1488      0 days 0:00:00.000
  34:e6c       0 days 0:00:00.000
  33:19c       0 days 0:00:00.000
  32:1750      0 days 0:00:00.000
  29:14b0      0 days 0:00:00.000
  28:ad4       0 days 0:00:00.000
  27:1508      0 days 0:00:00.000
  26:1420      0 days 0:00:00.000
  25:e08       0 days 0:00:00.000
  24:1338      0 days 0:00:00.000
  23:1400      0 days 0:00:00.000
  21:16c8      0 days 0:00:00.000
  19:127c      0 days 0:00:00.000
  18:1660      0 days 0:00:00.000
  15:14b8      0 days 0:00:00.000
  14:774       0 days 0:00:00.000
  12:7fc       0 days 0:00:00.000
  11:b5c       0 days 0:00:00.000
  10:8c0       0 days 0:00:00.000
   9:cf0       0 days 0:00:00.000
   5:15c4      0 days 0:00:00.000
   4:10f4      0 days 0:00:00.000
   3:125c      0 days 0:00:00.000
   2:d80       0 days 0:00:00.000
   1:fa0       0 days 0:00:00.000
0:040> ~31s     //切换至该线程
eax=0e69d0ff ebx=00000001 ecx=0ccbfc70 edx=0e64ec00 esi=0ccbfc54 edi=0e69d050
eip=0e613734 esp=0ccbfc2c ebp=0ccbfc9c iopl=0         nv up ei ng nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000286
TinyFlash!cTinyFlashStreamIn::ReadString+0x34:
0e613734 50              push    eax
0:031> k
ChildEBP RetAddr 
0ccbfc30 0e615cad TinyFlash!cTinyFlashStreamIn::ReadString+0x34
0ccbfc38 0e60f2c6 TinyFlash!cMetaDataTag::ReadTagBody+0xd
0ccbfc9c 0e60c25a TinyFlash!cTag::Read+0xa6
0ccbfcb8 0e60c69b TinyFlash!cTinyFlash::Parse+0x1a
0ccbfd04 0e5f7997 TinyFlash!cTinyFlash::LoadStream+0x9b
0ccbfd54 0e5f7c6b TinyFlash!cFlashMixer::MixFlash+0x177
0ccbfd88 0a35c13b TinyFlash!MixTinyFlash+0x3b
0ccbfe00 0a35e16b KuwatarTaskSvc!MixFlash_helper::DoMixFlash+0x26b [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflash_helper.cpp @ 275]
0ccbfe74 0a35eab1 KuwatarTaskSvc!CMixFlashWorkerImpl::_DoExcute+0x16b [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflashworkerimpl.cpp @ 305]
0ccbfea0 0a359b8b KuwatarTaskSvc!CMixFlashWorkerImpl::Excute+0x141 [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflashworkerimpl.cpp @ 260]
0ccbfea8 0a35a129 KuwatarTaskSvc!CKuwatarTaskSvcImpl::_DoExcute+0x4b [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\kuwatartasksvcimpl.cpp @ 469]
0ccbfee4 0a34a349 KuwatarTaskSvc!CKuwatarTaskSvcImpl::_ThreadProc+0x109 [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\kuwatartasksvcimpl.cpp @ 335]
0ccbff24 0a34e35a KuwatarTaskSvc!boost::function0 >::operator()+0x49 [d:\boost_1_34_1\boost\function\function_template.hpp @ 692]
0ccbff70 0a34e699 KuwatarTaskSvc!CThreadRunner::_CThreadRunnerImpl::_ThreadProc+0x3a [d:\code2\version2,3,3,3-2012-05-10_18-46\helpers\threadrunner.h @ 205]
0ccbff74 0a3636f9 KuwatarTaskSvc!CThreadRunner::_CThreadRunnerImpl::_CrtThreadProc+0x9 [d:\code2\version2,3,3,3-2012-05-10_18-46\helpers\threadrunner.h @ 195]
0ccbffac 0a36379e KuwatarTaskSvc!_callthreadstartex+0x1b [f:\rtm\vctools\crt_bld\self_x86\crt\src\threadex.c @ 348]
0ccbffb4 7c80b729 KuwatarTaskSvc!_threadstartex+0x7f [f:\rtm\vctools\crt_bld\self_x86\crt\src\threadex.c @ 326]
0ccbffec 00000000 kernel32!BaseThreadStart+0x37
0:031> bp MixFlash_helper::DoMixFlas
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINDOWS\system32\Normaliz.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\Fetion测试环境\ResPackage.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\Fetion测试环境\Fetion.exe -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\Fetion测试环境\StatisticsDataDLL.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\Fetion测试环境\fhlib.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\Fetion测试环境\CloudFileCentre.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\Fetion测试环境\NatDetector.dll -
*** WARNING: Unable to verify checksum for D:\Fetion测试环境\LIBEAY32.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\Fetion测试环境\LIBEAY32.dll -
*** WARNING: Unable to verify checksum for D:\Fetion测试环境\SSLEAY32.dll
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\Fetion测试环境\SSLEAY32.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\Fetion测试环境\FileTransferV4.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\Fetion测试环境\UPnP_PortForward.dll -
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\Fetion测试环境\PcDevice.dll -
Bp expression 'MixFlash_helper::DoMixFlas' could not be resolved, adding deferred bp
0:031> bp MixFlash_helper::DoMixFlash
0:031> bp MixFlash_helper::DoMixFlash
breakpoint 1 redefined
0:031> bl
 0 eu             0001 (0001) (MixFlash_helper::DoMixFlas)
 1 e 0a35bed0     0001 (0001)  0:**** KuwatarTaskSvc!MixFlash_helper::DoMixFlash
0:031> bd 0
0:031> bl
 0 du             0001 (0001) (MixFlash_helper::DoMixFlas)
 1 e 0a35bed0     0001 (0001)  0:**** KuwatarTaskSvc!MixFlash_helper::DoMixFlash
0:031> g
(1514.df0): C++ EH exception - code e06d7363 (first chance) //有异常发生
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
Breakpoint 1 hit
eax=0a0425b8 ebx=0a3b7e08 ecx=0a3b4278 edx=00000066 esi=00000008 edi=0a3b74c8
eip=0a35bed0 esp=0ccbfe04 ebp=0a3b74c0 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
KuwatarTaskSvc!MixFlash_helper::DoMixFlash:  //第一次出现

0a35bed0 55              push    ebp
0:031> gh
(1514.df0): C++ EH exception - code e06d7363 (first chance) //从上面的堆栈MixFlash_helper::DoMixFlashcTinyFlashStreamIn::ReadString说明过程中会产生异常。
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
Breakpoint 1 hit
eax=0a0425b8 ebx=0a3b7e08 ecx=0a3b8688 edx=00000066 esi=00000008 edi=0a3b74c8
eip=0a35bed0 esp=0ccbfe04 ebp=0a3b74c0 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
KuwatarTaskSvc!MixFlash_helper::DoMixFlash: //发生异常后又回到了DoMixFlash断点处,再次出现,所以可以知道发生异常出现在这段程序代码见。

0a35bed0 55              push    ebp
0:031> k
ChildEBP RetAddr 
0ccbfe00 0a35e16b KuwatarTaskSvc!MixFlash_helper::DoMixFlash [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflash_helper.cpp @ 211]
0ccbfe74 0a35eab1 KuwatarTaskSvc!CMixFlashWorkerImpl::_DoExcute+0x16b [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflashworkerimpl.cpp @ 305]
0ccbfea0 0a359b8b KuwatarTaskSvc!CMixFlashWorkerImpl::Excute+0x141 [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflashworkerimpl.cpp @ 260]
0ccbfea8 0a35a129 KuwatarTaskSvc!CKuwatarTaskSvcImpl::_DoExcute+0x4b [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\kuwatartasksvcimpl.cpp @ 469]
0ccbfee4 0a34a349 KuwatarTaskSvc!CKuwatarTaskSvcImpl::_ThreadProc+0x109 [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\kuwatartasksvcimpl.cpp @ 335]
0ccbff24 0a34e35a KuwatarTaskSvc!boost::function0 >::operator()+0x49 [d:\boost_1_34_1\boost\function\function_template.hpp @ 692]
0ccbff70 0a34e699 KuwatarTaskSvc!CThreadRunner::_CThreadRunnerImpl::_ThreadProc+0x3a [d:\code2\version2,3,3,3-2012-05-10_18-46\helpers\threadrunner.h @ 205]
0ccbff74 0a3636f9 KuwatarTaskSvc!CThreadRunner::_CThreadRunnerImpl::_CrtThreadProc+0x9 [d:\code2\version2,3,3,3-2012-05-10_18-46\helpers\threadrunner.h @ 195]
0ccbffac 0a36379e KuwatarTaskSvc!_callthreadstartex+0x1b [f:\rtm\vctools\crt_bld\self_x86\crt\src\threadex.c @ 348]
0ccbffb4 7c80b729 KuwatarTaskSvc!_threadstartex+0x7f [f:\rtm\vctools\crt_bld\self_x86\crt\src\threadex.c @ 326]
0ccbffec 00000000 kernel32!BaseThreadStart+0x37
0:031> bd 1
0:031> bl
 0 du             0001 (0001) (MixFlash_helper::DoMixFlas)
 1 d 0a35bed0 [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflash_helper.cpp @ 211]    0001 (0001)  0:**** KuwatarTaskSvc!MixFlash_helper::DoMixFlash
0:031> g
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.13b8): Break instruction exception - code 80000003 (first chance)
eax=7ffde000 ebx=00000001 ecx=00000002 edx=00000003 esi=00000004 edi=00000005
eip=7c92120e esp=0cfcffcc ebp=0cfcfff4 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00000246
ntdll!DbgBreakPoint:
7c92120e cc              int     3
0:023> g
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.d44): Break instruction exception - code 80000003 (first chance)
eax=7ffde000 ebx=00000001 ecx=00000002 edx=00000003 esi=00000004 edi=00000005
eip=7c92120e esp=0cfcffcc ebp=0cfcfff4 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00000246
ntdll!DbgBreakPoint:
7c92120e cc              int     3
0:023> gh
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.df0): C++ EH exception - code e06d7363 (first chance)
(1514.1018): Break instruction exception - code 80000003 (first chance) //这个异常是我按下CTRL+BREAK后产生的,不用关心,上述异常实在程序执行过程中产生的。
eax=7ffde000 ebx=00000001 ecx=00000002 edx=00000003 esi=00000004 edi=00000005
eip=7c92120e esp=0cfcffcc ebp=0cfcfff4 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00000246
ntdll!DbgBreakPoint:
7c92120e cc              int     3
0:023> sxe e06d7363
0:023> gh  //对发生的异常进行监视,并在接下来执行过程中一旦发现该异常,就执行处理。(sxe 执行监听,gh 执行对所监听的异常进行相应处理)
(
1514.df0): C++ EH exception - code e06d7363 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=0ccbfb14 ebx=145c45f5 ecx=00000000 edx=7c92e514 esi=0ccbfb9c edi=0e7013e0
eip=7c812afb esp=0ccbfb10 ebp=0ccbfb64 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000206
kernel32!RaiseException+0x53:
7c812afb 5e              pop     esi
0:031> k //显示出现异常的堆栈信息
ChildEBP RetAddr 
0ccbfb64 0e618c4f kernel32!RaiseException+0x53
0ccbfb9c 0e618a8d TinyFlash!_CxxThrowException+0x46 [f:\rtm\vctools\crt_bld\self_x86\crt\prebuild\eh\throw.cpp @ 166]
0ccbfbb8 0e5f57d3 TinyFlash!operator new+0x69 [f:\rtm\vctools\crt_bld\self_x86\crt\src\new.cpp @ 63]
0ccbfbcc 0e5f61b5 TinyFlash!std::_Allocate+0x13
0ccbfc04 0e607f12 TinyFlash!std::basic_string,std::allocator >::_Copy+0x75
0ccbfc1c 0e61373e TinyFlash!std::basic_string,std::allocator >::append+0x42
0ccbfc30 0e615cad TinyFlash!cTinyFlashStreamIn::ReadString+0x3e
0ccbfc38 0e60f2c6 TinyFlash!cMetaDataTag::ReadTagBody+0xd
0ccbfc9c 0e60c25a TinyFlash!cTag::Read+0xa6
0ccbfcb8 0e60c69b TinyFlash!cTinyFlash::Parse+0x1a
0ccbfd04 0e5f7997 TinyFlash!cTinyFlash::LoadStream+0x9b
0ccbfd54 0e5f7c6b TinyFlash!cFlashMixer::MixFlash+0x177
0ccbfd88 0a35c13b TinyFlash!MixTinyFlash+0x3b
0ccbfe00 0a35e16b KuwatarTaskSvc!MixFlash_helper::DoMixFlash+0x26b [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflash_helper.cpp @ 275]
0ccbfe74 0a35eab1 KuwatarTaskSvc!CMixFlashWorkerImpl::_DoExcute+0x16b [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflashworkerimpl.cpp @ 305]
0ccbfea0 0a359b8b KuwatarTaskSvc!CMixFlashWorkerImpl::Excute+0x141 [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflashworkerimpl.cpp @ 260]
0ccbfea8 0a35a129 KuwatarTaskSvc!CKuwatarTaskSvcImpl::_DoExcute+0x4b [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\kuwatartasksvcimpl.cpp @ 469]
0ccbfee4 0a34a349 KuwatarTaskSvc!CKuwatarTaskSvcImpl::_ThreadProc+0x109 [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\kuwatartasksvcimpl.cpp @ 335]
0ccbff24 0a34e35a KuwatarTaskSvc!boost::function0 >::operator()+0x49 [d:\boost_1_34_1\boost\function\function_template.hpp @ 692]
0ccbff70 0a34e699 KuwatarTaskSvc!CThreadRunner::_CThreadRunnerImpl::_ThreadProc+0x3a [d:\code2\version2,3,3,3-2012-05-10_18-46\helpers\threadrunner.h @ 205]
0:031> gh
WARNING: Continuing a non-continuable exception
(1514.df0): Break instruction exception - code 80000003 (first chance)
eax=0ccbfb14 ebx=145c45f5 ecx=00000000 edx=7c92e514 esi=0e65f4a0 edi=0e7013e0
eip=0e618a8d esp=0ccbfbac ebp=0ccbfbb8 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000206
TinyFlash!operator new+0x69:
0e618a8d cc              int     3
0:031> k
ChildEBP RetAddr 
0ccbfbb8 0e5f57d3 TinyFlash!operator new+0x69 [f:\rtm\vctools\crt_bld\self_x86\crt\src\new.cpp @ 63]
0ccbfbcc 0e5f61b5 TinyFlash!std::_Allocate+0x13
0ccbfc04 0e607f12 TinyFlash!std::basic_string,std::allocator >::_Copy+0x75
0ccbfc1c 0e61373e TinyFlash!std::basic_string,std::allocator >::append+0x42
0ccbfc30 0e615cad TinyFlash!cTinyFlashStreamIn::ReadString+0x3e //异常是由此发生。
0ccbfc38 0e60f2c6 TinyFlash!cMetaDataTag::ReadTagBody+0xd
0ccbfc9c 0e60c25a TinyFlash!cTag::Read+0xa6
0ccbfcb8 0e60c69b TinyFlash!cTinyFlash::Parse+0x1a
0ccbfd04 0e5f7997 TinyFlash!cTinyFlash::LoadStream+0x9b
0ccbfd54 0e5f7c6b TinyFlash!cFlashMixer::MixFlash+0x177
0ccbfd88 0a35c13b TinyFlash!MixTinyFlash+0x3b
0ccbfe00 0a35e16b KuwatarTaskSvc!MixFlash_helper::DoMixFlash+0x26b [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflash_helper.cpp @ 275]
0ccbfe74 0a35eab1 KuwatarTaskSvc!CMixFlashWorkerImpl::_DoExcute+0x16b [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflashworkerimpl.cpp @ 305]
0ccbfea0 0a359b8b KuwatarTaskSvc!CMixFlashWorkerImpl::Excute+0x141 [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\mixflashworkerimpl.cpp @ 260]
0ccbfea8 0a35a129 KuwatarTaskSvc!CKuwatarTaskSvcImpl::_DoExcute+0x4b [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\kuwatartasksvcimpl.cpp @ 469]
0ccbfee4 0a34a349 KuwatarTaskSvc!CKuwatarTaskSvcImpl::_ThreadProc+0x109 [d:\code2\version2,3,3,3-2012-05-10_18-46\utilitis\kuwatartasksvc\kuwatartasksvcimpl.cpp @ 335]
0ccbff24 0a34e35a KuwatarTaskSvc!boost::function0 >::operator()+0x49 [d:\boost_1_34_1\boost\function\function_template.hpp @ 692]
0ccbff70 0a34e699 KuwatarTaskSvc!CThreadRunner::_CThreadRunnerImpl::_ThreadProc+0x3a [d:\code2\version2,3,3,3-2012-05-10_18-46\helpers\threadrunner.h @ 205]
0ccbff74 0a3636f9 KuwatarTaskSvc!CThreadRunner::_CThreadRunnerImpl::_CrtThreadProc+0x9 [d:\code2\version2,3,3,3-2012-05-10_18-46\helpers\threadrunner.h @ 195]
0ccbffac 0a36379e KuwatarTaskSvc!_callthreadstartex+0x1b [f:\rtm\vctools\crt_bld\self_x86\crt\src\threadex.c @ 348]
0:031> g
(1514.df0): Access violation - code c0000005 (first chance) //最后再次执行出现AV异常,但是这个异常时在上述发生异常之后发生的,我们应该先找最早发生异常的地方。
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00000004 ebx=00000000 ecx=00000002 edx=00000001 esi=6f6c6c61 edi=20646162
eip=0e64e27b esp=0e64e1cc ebp=69746163 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010206
TinyFlash!std::bad_alloc::`vftable'+0x7:
0e64e27b 0e              push    cs

 

你可能感兴趣的:(调试)