
Crash at exit in WB on IE 5.5 SP2
Hi,
My application is a VB EXE which hosts a WebBrowser
control. I load to the browser an HTML file which has
embedded an OCX control created in VB (using the <OBJECT>
tag).
Everything works fine except machines where IE 5.5 SP2 is
installed. In this case, the application works fine but it
crashes with Access Violation after clicking the Close (X)
box. The problem seems to not appear on any other version
of IE (5.0, 5.5 no-SP, 5.5 SP1, 6.0).
It sounds like some incompatibility between VB OCXs and
this particular version of IE.
I'm able to reproduce this behaviour in a minimal
application:
1. Create a new VB ActiveX control project. Simply compile
the empty OCX - this thing happens even with a no-op
control.
2. Create another VB project for EXE application. Put a
WebBrowser control on the form. Under some button put
WebBrowser1.Navigate2 "Path_to_html_file"
where Path_to_html_file points to a HTML file hosting the
OCX. Make the EXE file.
3. Create the following HTML file (referenced above):
<HTML>
<BODY>
<OBJECT height=100% width=100% classid="clsid:80BE36B9-
58C4-4491-9BC1-DB41ACD39CE5" id="lv"></OBJECT>
</BODY>
</HTML>
Of course the CLSID should be replaced with the one for
your control.
4. Run the application on a machine with IE 5.5 SP2.
Click the button - the control should be loaded.
Now close the application.
That's all. I have been able to repeat the test on several
machines and it always crashes.
Some more hints:
The problem does not appear when the HTML is loaded into
IE instead of my application hosting a WebBrowser.
The problem does not appear when tested with an OCX
created using ATL.
Any comments/ideas/workarounds?
Best regards,
Jakub