Exceptions within MSHTML using IWebBrowser2 control

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Apologies if this is the wrong group for this issue - this is the most relevant managed MSDN newsgroup I could find for MSHTML issues - if you feel I would be better posting somewhere else please tell me.

I'm having problems using the IWebBrowser2 control within my MMC snap-in as a custom OCX control. In general, it works fine, but on XPSP2 with IE7, if the user clicks repeatedly on links in the web control, I get an exception from deep inside the MSHTML component. In every case, the call stack is the same except for the last (illegal) address (the full call stack is shown below).

As there is none of my code anywhere in the call stack, I'm not sure how to go about debugging this one. It looks as if this is a race condition of some kind, as it takes about 1-2 minutes of manic clicking on links in the hosted control to get it to fail, but it is highly repeatable on XP. I have failed to reproduce the problem under Vista.

Thanks in advance,

Chris.

cf8b6c74()
mshtml.dll!CElement::Doc() + 0x7
mshtml.dll!CElement::TakeCapture() + 0xe
mshtml.dll!CAnchorElement::OnCaptureMessage() + 0x7b
mshtml.dll!CElementCapture::CallCaptureFunction() + 0x11
mshtml.dll!CDoc::PumpMessage() + 0x986ec
mshtml.dll!CDoc::OnMouseMessage() + 0x16c
mshtml.dll!CDoc::OnWindowMessage() - 0x41cea
mshtml.dll!CServer::WndProc() + 0x4c
user32.dll!_InternalCallWinProc@20() + 0x28
user32.dll!_UserCallWinProcCheckWow@32() + 0xb7
user32.dll!_DispatchMessageWorker@8() + 0xdc
user32.dll!_DispatchMessageW@4() + 0xf
mfc42u.dll!CWinThread::PumpMessage() + 0x3a
mmc.exe!CAMCApp::PumpMessage() + 0x37
mfc42u.dll!CWinThread::Run() + 0x46
mfc42u.dll!AfxWinMain() + 0x68
mmc.exe!_wWinMainCRTStartup() + 0x198
kernel32.dll!_BaseProcessStart@4() + 0x23

.



Relevant Pages

  • Re: Ares I-X flight stage separation successful???
    ... center of pressure on the stack behind the center of gravity of the ... increase aerodynamic stability and control authority (which also affects ... than aerodynamic stability considerations. ... with the mass as far back near the engine as possible so that the stack can be controlled with the minimum of control forces. ...
    (sci.space.policy)
  • Re: Local variables controversial?
    ... >> has direct and explicit control over the stack. ... NSI is neither direct or explicit control over ... > responsibility over from the programmer. ...
    (comp.lang.forth)
  • Re: Ares I-X flight stage separation successful???
    ... center of pressure on the stack behind the center of gravity of the ... increase aerodynamic stability and control authority (which also affects ... fuel efficiency) and wanting to keep the center of gravity behind the ... Upper stages are driven by mass consideration rather ...
    (sci.space.policy)
  • Re: Interpreted Basic control-flow analysis
    ... I've thought of is to avoid duplicating any (line number, control ... but I don't see how reaching definitions are ... the reaching sets in some kind of stack, ... First form the "conservative" control graph with Ends ...
    (comp.programming)
  • Re: Interpreted Basic control-flow analysis
    ... I have an apparently non-trivial problem in control-flow analysis. ... The important control structures supported by TI-83 Basic are ... the interpreter maintains a stack of all the currently ... The successors of If-Then, Else, While, and Goto are always ...
    (comp.programming)