Crash at exit in WB on IE 5.5 SP2 
Author Message
 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



Fri, 21 Oct 2005 19:21:08 GMT  
 Crash at exit in WB on IE 5.5 SP2

Quote:
>-----Original Message-----
>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).

>[...]

I forgot to mention: I'm using VB6 SP5

Jakub



Fri, 21 Oct 2005 21:28:21 GMT  
 Crash at exit in WB on IE 5.5 SP2
This is a known issue of IE 5.5 sp2. There are two work arounds for it:

1. Upgrade to IE 6
2. Add following code in your application:

Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA"
(ByVal lpLibFileName As String) As Long    

Private Sub Form_Load()

Dim hLib As Long
hLib = LoadLibrary("mshtml.dll")

End Sub  

Luke

(This posting is provided "AS IS", with no warranties, and confers no
rights.)



Sat, 22 Oct 2005 16:53:27 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. IE 5.01/IE 5.5?

2. Active X controls not working in IE 5.5 but works in IE 6.0

3. ASP with I.E. 5.5 problem

4. ActiveX Document crashes upon exiting IE

5. IE Crashes on exit

6. VBScript 5.5 Crashes on Script Error in Script Event

7. VBScript 5.5 Crashes on Script Error in Script Event

8. Excel workbbok in IE 5.5

9. Help, ie 5.5 made references disappear.

10. Webform fonts mis-sized in IE 5.5

11. Inter Explorer 4.0 vs IE 5.5

12. preventing print scrn and drag and drop of image in IE 5.5

 

 
Powered by phpBB® Forum Software