本文介绍了在COleClientItem :: DoVerb API之后导致未处理的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



我正面临一个罕见的事件,在使用我的应用程序执行Renorex Automation工具期间得到了无瑕疵的例外。



当此工具选择要激活的OLE对象时,抛出一个无法访问的访问冲突异常。

如果没有问题,如果同样的方案将手动执行。



我试图设置Windbg找出它发生的代码,并发现它在执行

Dear Friends,

I am facing a rare incident, getting unhanded exception during Renorex Automation tool execution with my application.

When this tool select OLE object to activate, throw a unhanded access violation exception.
while there is no issue if same scenario will be executed manually.

I tried to setup Windbg to find out the code where it was happening, and found that it will be crashing after executing

COleClientItem::DoVerb(InPlaceActivation, (CView*)myPage);





但如果手动执行相同的代码,则表示没有Renorex自动化工具。



我认为它可能是Renorex工具或Windows bug但没有找到任何正确的根本原因。


这里有一些Windbg详细转储分析,请仔细阅读并告诉我你是否找到了解决根本原因的重要事项。







.

but same code is working if executed manually, mean without Renorex automation tool.

I assumes that it could be Renorex tool or Windows bug but didn't find any proper root cause.

Here is some Windbg verbose dump analyze, please go through it and let me know if you find anything important to find the root cause.



Comment: 'SecondChance_star_UnknownException'
Windows 7 Version 7601 (Service Pack 1) MP (24 procs) Free x86 compatible
Product: WinNt, suite: SingleUserTS
Built by: 6.1.7601.17965 (win7sp1_gdr.121004-0333)
Machine Name:
Debug session time: Mon Mar 10 15:49:01.000 2014 (UTC + 5:30)
System Uptime: 0 days 1:10:15.019
Process Uptime: 0 days 0:03:21.000
................................................................
...............................................
Loading unloaded module list
.
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(3830.3834): Unknown exception - code c0150010 (first/second chance not available)
eax=00000000 ebx=0018e4b0 ecx=00000000 edx=005c5d78 esi=00000000 edi=005a07d0
eip=77d215de esp=0018e49c ebp=0018e9cc iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
ntdll!NtRaiseException+0x12:
77d215de 83c404          add     esp,4
0:000> .ecxr
eax=00000000 ebx=0018e4b0 ecx=00000000 edx=005c5d78 esi=00000000 edi=005a07d0
eip=77d215de esp=0018e49c ebp=0018e9cc iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
ntdll!NtRaiseException+0x12:
77d215de 83c404          add     esp,4
0:000> !analyze -v
*******************************************************************************
*                                                                             *
*                        Exception Analysis                                   *
*                                                                             *
*******************************************************************************
Unloaded PrintControl.ocx
GetUrlPageData2 (WinHttp) failed: 12002.

FAULTING_IP:
mfc90u!AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2+34
73a1ba77 83b89800000000  cmp     dword ptr [eax+98h],0

EXCEPTION_RECORD:  0018ef68 -- (.exr 0x18ef68)
ExceptionAddress: 73a1ba77 (mfc90u!AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2+0x00000034)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 08f4f600
Attempt to read from address 08f4f600

PROCESS_NAME:  PrintDisplay.exe

ERROR_CODE: (NTSTATUS) 0xc0150010 - The activation context being deactivated is not active for the current thread of execution.

EXCEPTION_CODE: (NTSTATUS) 0xc0150010 - The activation context being deactivated is not active for the current thread of execution.

EXCEPTION_PARAMETER1:  00000003

EXCEPTION_PARAMETER2:  0018fd04

EXCEPTION_PARAMETER3:  005c5d78

NTGLOBALFLAG:  0

APPLICATION_VERIFIER_FLAGS:  0

APP:  PrintDisplay.exe

CONTEXT:  0018efb8 -- (.cxr 0x18efb8)
eax=08f4f568 ebx=00000000 ecx=73a1cde7 edx=739d52c0 esi=0018f444 edi=08f4f568
eip=73a1ba77 esp=0018f41c ebp=0018f424 iopl=0         nv up ei pl nz na po nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010202
mfc90u!AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2+0x34:
73a1ba77 83b89800000000  cmp     dword ptr [eax+98h],0 ds:002b:08f4f600=????????
Resetting default scope

READ_ADDRESS:  08f4f600

FOLLOWUP_IP:
mfc90u!AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2+34
73a1ba77 83b89800000000  cmp     dword ptr [eax+98h],0

ADDITIONAL_DEBUG_TEXT:  Followup set based on attribute [UnloadedModule_Arch_BP] from Frame:[0] on thread:[3834] ; Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]

LAST_CONTROL_TRANSFER:  from 73aae762 to 73a1ba77

FAULTING_THREAD:  ffffffff

BUGCHECK_STR:  APPLICATION_FAULT_INVALID_POINTER_READ_AFTER_CALL

PRIMARY_PROBLEM_CLASS:  INVALID_POINTER_READ_AFTER_CALL

DEFAULT_BUCKET_ID:  INVALID_POINTER_READ_AFTER_CALL

STACK_TEXT:
00000000 00000000 PrintControl!afxModuleState+0x0


STACK_COMMAND:  .cxr 0018EFB8 ; kb ; ** Pseudo Context ** ; kb

SYMBOL_STACK_INDEX:  0

SYMBOL_NAME:  PrintControl!afxModuleState

FOLLOWUP_NAME:  MachineOwner

MODULE_NAME: PrintControl

DEBUG_FLR_IMAGE_TIMESTAMP:  0

FAILURE_BUCKET_ID:  INVALID_POINTER_READ_AFTER_CALL_c0150010_PrintControl.ocx!afxModuleState

BUCKET_ID:  APPLICATION_FAULT_INVALID_POINTER_READ_AFTER_CALL_PrintControl!afxModuleState

IMAGE_NAME:  PrintControl.ocx

WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/PrintDisplay_exe/77_0_14_60/531d9066/ntdll_dll/6_1_7601_17725/4ec49b8f/c0150010/000847db.htm?Retriage=1

Followup: MachineOwner
---------

0:000> kb
ChildEBP RetAddr  Args to Child
0018e49c 77d1014d 0018e4b0 0018e500 00000000 ntdll!NtRaiseException+0x12
0018e49c 77d847db 0018e4b0 0018e500 00000000 ntdll!KiUserExceptionDispatcher+0x29
0018e9cc 77476d91 774a2855 774a277d 0018ea5c ntdll!RtlDeactivateActivationContextUnsafeFast+0x209
0018e9d0 774a2855 774a277d 0018ea5c 774a278d user32!UserCallWinProcCheckWow+0x13d
0018e9d4 774a277d 0018ea5c 774a278d 15ea3540 user32!_NLG_Return2
0018ea00 774a282d 774e0720 0018fd38 fffffffe user32!_local_unwind4+0x80
0018ea14 774da76c 0018fd48 774e0720 00000000 user32!_EH4_LocalUnwind+0x10
0018ea44 77d5b459 0018eab4 0018fd38 0018eb60 user32!_except_handler4+0x14f
0018ea68 77d5b42b 0018eab4 0018fd38 0018eb60 ntdll!ExecuteHandler2+0x26
0018ea8c 77d5b7d2 0018eab4 0018fd38 0018eb60 ntdll!ExecuteHandler+0x24
0018ee30 77d773ef 0018ffc4 77d773ef 00000000 ntdll!RtlUnwind+0x147
0018ee54 77d7727b 00000000 00000000 00000000 ntdll!_EH4_GlobalUnwind+0x15
0018ee7c 77d5b459 fffffffe 0018ffc4 0018efb8 ntdll!_except_handler4+0xe7
0018eea0 77d5b42b 0018ef68 0018ffc4 0018efb8 ntdll!ExecuteHandler2+0x26
0018eec4 77d5b3ce 0018ef68 0018ffc4 0018efb8 ntdll!ExecuteHandler+0x24
0018ef50 77d10133 0018ef68 0018efb8 0018ef68 ntdll!RtlDispatchException+0x127
0018ef50 73a1ba77 0018ef68 0018efb8 0018ef68 ntdll!KiUserExceptionDispatcher+0xf
0018f424 73aae762 08f4f568 15ea26b3 08692250 mfc90u!AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2+0x34
0018f464 73a7dbcf 0337d2d0 fffffffb 00000000 mfc90u!COleControl::XOleObject::DoVerb+0x20
0018f4ac 73a91cc9 fffffffb 00060772 00000000 mfc90u!COleClientItem::Activate+0x98
0018f4ec 0041526f fffffffb 03410e70 00000000 mfc90u!COleClientItem::DoVerb+0x21
0018f518 0041d2c5 00000000 03410e70 00000001 PrintDisplay!DisplayObject::SetEditMode+0x7f [d: \source\PrintDisplay\displayobject.cpp @ 634]
0018f534 0041969d 00000000 0337f2d0 03410e70 PrintDisplay!Page::SetEditMode+0x95 [d:\ \source\PrintDisplay\page.cpp @ 554]
0018f558 004194e8 00000000 0337f2d0 0018f5b0 PrintDisplay!DisplayView::SetEditMode+0xcd [d:\ source\PrintDisplay\displayview.cpp @ 1819]
0018f570 00402ef6 0000d431 0337a670 0018f590 PrintDisplay!DisplayView::EndEditMode+0x48 [d:\ source\PrintDisplay\displayview.cpp @ 1767]
0018f580 73a4d387 0000d431 0337a670 0018f5ac PrintDisplay!DisplayDoc::OnEditTool+0x46 [d:\source\PrintDisplay\displaydoc.cpp @ 1025]
0018f590 73a4d55e 0000d431 0000003b 033824f0 mfc90u!_AfxDispatchCmdMsg+0x46
0018f5ac 73a4eb08 0000d431 00000000 00000000 mfc90u!CCmdTarget::OnCmdMsg+0x124
0018f5c8 73a91db1 0000d431 00000000 00000000 mfc90u!CDocument::OnCmdMsg+0x19
0018f5fc 73a51632 0000d431 00000000 00000000 mfc90u!COleDocument::OnCmdMsg+0x85
0018f63c 73a25312 0000d431 00000000 00000000 mfc90u!CView::OnCmdMsg+0x73
0018f67c 10022b8f 0000d431 00000000 00000000 mfc90u!CFrameWnd::OnCmdMsg+0x37
WARNING: Stack unwind information not available. Following frames may be wrong.
0018f6a0 73a1ff71 0000d431 00000000 00000000 Framework!FDoc::ActivityDeleted+0x1f1a5
0018f6f0 73a24822 00000000 00020832 033824f0 mfc90u!CWnd::OnCommand+0x92
0018f70c 73a1f759 0000d431 00020832 15ea25f7 mfc90u!CFrameWnd::OnCommand+0x7b
0018f7b8 73a1f6cc 00000111 0000d431 00020832 mfc90u!CWnd::OnWndMsg+0x66
0018f7d8 73a1e2f2 00000111 0000d431 00020832 mfc90u!CWnd::WindowProc+0x24
0018f840 73a1e57e 00000000 0002084c 00000111 mfc90u!AfxCallWndProc+0xa3
0018f864 73a1c234 0002084c 00000111 0000d431 mfc90u!AfxWndProc+0x37
0018f8a8 774762fa 0002084c 00000111 0000d431 mfc90u!AfxWndProcBase+0x56
0018f8d4 77476d3a 73a1c1de 0002084c 00000111 user32!InternalCallWinProc+0x23
0018f94c 7747965e 005b8b74 73a1c1de 0002084c user32!UserCallWinProcCheckWow+0x109
0018f990 774796c5 01b563c0 00000000 73a1c1de user32!SendMessageWorker+0x581
0018f9b4 7395ce28 0002084c 00000111 0000d431 user32!SendMessageW+0x7f
0018f9f8 7393b01f 00693fa8 00020832 00000202 comctl32!TBOnLButtonUp+0x131
0018fa74 774762fa 00020832 00000202 00000000 comctl32!ToolbarWndProc+0xa1d
0018faa0 77476d3a 739380bb 00020832 00000202 user32!InternalCallWinProc+0x23
0018fb18 77480d27 005b8b74 739380bb 00020832 user32!UserCallWinProcCheckWow+0x109
0018fb50 77480d4d 739380bb 00020832 00000202 user32!CallWindowProcAorW+0xab
0018fb70 73a1edcb 739380bb 00020832 00000202 user32!CallWindowProcW+0x1b
0018fb90 73a1f6e3 00000202 00000000 00150016 mfc90u!CWnd::DefWindowProcW+0x44
0018fbac 73a2b798 00000202 00000000 00150016 mfc90u!CWnd::WindowProc+0x3b
0018fbd0 73a1e2f2 00000202 00000000 00150016 mfc90u!CControlBar::WindowProc+0xe4
0018fc38 73a1e57e 00000000 00020832 00000202 mfc90u!AfxCallWndProc+0xa3
0018fc5c 73a1c234 00020832 00000202 00000000 mfc90u!AfxWndProc+0x37
0018fca4 774762fa 00020832 00000202 00000000 mfc90u!AfxWndProcBase+0x56
0018fcd0 77476d3a 73a1c1de 00020832 00000202 user32!InternalCallWinProc+0x23
0018fd48 774777c4 005b8b74 73a1c1de 00020832 user32!UserCallWinProcCheckWow+0x109
0018fda8 7747788a 73a1c1de 00000000 0018fde4 user32!DispatchMessageWorker+0x3bc
0018fdb8 7749c81f 005c2618 00000201 03382cac user32!DispatchMessageW+0xf
0018fde4 73a4c46a 00020832 00000000 03382cac user32!IsDialogMessageW+0x5f6
0018fdf8 73a22737 005c2618 0018fe6c 73a2b6a2 mfc90u!CWnd::IsDialogMessageW+0x32
0018fe04 73a2b6a2 005c2618 005c2618 00020832 mfc90u!CWnd::PreTranslateInput+0x2d
0018fe6c 73a20972 005c2618 005c2618 033824f0 mfc90u!CControlBar::PreTranslateMessage+0x221
0018fe80 73a5e549 0002084c 005c2618 005c25e8 mfc90u!CWnd::WalkPreTranslateTree+0x23
0018fe98 73a5ed4a 005c2618 0018feb0 73a5e599 mfc90u!AfxInternalPreTranslateMessage+0x41
0018fea4 73a5e599 005c2618 0018fee0 73a5e47e mfc90u!CWinThread::PreTranslateMessage+0xd
0018feb0 73a5e47e 005c2618 00000000 0043e3c8 mfc90u!AfxPreTranslateMessage+0x19
0018fec0 73a5eb18 0043e3c8 0043e3c8 ffffffff mfc90u!AfxInternalPumpMessage+0x2d
0018fee0 73a2af81 0043e9a8 00000001 00000000 mfc90u!CWinThread::Run+0x5b
0018fef4 00426b76 00400000 00000000 005a32aa mfc90u!AfxWinMain+0x6a
0018ff88 75db33aa fffde000 0018ffd4 77d39ef2 PrintDisplay!__tmainCRTStartup+0x150 [f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c @ 578]
0018ff94 77d39ef2 fffde000 77c5e338 00000000 kernel32!BaseThreadInitThunk+0xe
0018ffd4 77d39ec5 00426d44 fffde000 00000000 ntdll!__RtlUserThreadStart+0x70
0018ffec 00000000 00426d44 fffde000 00000000 ntdll!_RtlUserThreadStart+0x1b
0:000> dv
Unable to enumerate locals, HRESULT 0x80004005
Private symbols (symbols.pri) are required for locals.
0:000> .frame 1
01 0018e49c 77d847db ntdll!KiUserExceptionDispatcher+0x29
0:000> .frame1
01 0018e49c 77d847db ntdll!KiUserExceptionDispatcher+0x29
0:000> .exr 0x18ef68
ExceptionAddress: 73a1ba77 (mfc90u!AFX_MAINTAIN_STATE2::AFX_MAINTAIN_STATE2+0x00000034)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 00000000
   Parameter[1]: 08f4f600
Attempt to read from address 08f4f600

推荐答案

这篇关于在COleClientItem :: DoVerb API之后导致未处理的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 00:39