JDK-6370565 : IE browser hangs when multiple applets are reloaded several times
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.4.2,1.4.2_12,5.0u4
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000,windows_xp
  • CPU: other,x86
  • Submitted: 2006-01-10
  • Updated: 2011-02-28
  • Resolved: 2006-02-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
1.4.2_12 b01Fixed 6-poolResolved
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
Reloading multiple applets continously causes IE to hang.

Details for the Bug:
1. Browser: IE6.0 
2. OS: Windows XP/Windows 2000

To reproduce this bug, have a page having multiple applets and try to reload several times. You will witness a hung IE browser with in minutes. The thread dump seems to suggest the plugin is waiting for the disposal of previouslt loaded applets. Bug is also reproducible in Tiger.
This bug is specific about a hang scenario that the plugin main thread is waiting for a native platform signal that never arrives. The signal is supposed to set when the Java level embedded frame is closed.

The main thread is responsible to create and close the activeX components in IE browser. Blocking main thread causes the browser window unresponsive.

The right synchronization has to be implemented to make sure the main thread is signaled before the applet's thread group is disposed.

Comments
EVALUATION Planning to forward port all the changes in build 2 of 5.0u7 also. Hao has raised the code review request for the same. Once approved I will putback all the changes.
2006-02-02

EVALUATION There is a racing condition in plugin's diposing applets. AppletViewer starts a new thread to stop/destroy/quit applet. The thread disposes applet's threadgroup including the applet's Event Dispatcher Thread (EDT) The main thread is waiting for the embeded frame's destroy() to complete. The embedded frame calls windowClosing on the applet's EDT. The racing between the two threads (disposing applet's thread group and windowClosing on the EDT) can cause browser hang when the EDT is stopped before the windowClosing is called. To address this problem, I make the sendEvent(APPLET_QUIT) call (this call is to dispose the applet's threadgroup) to wait for signals from embedded frame.destroy().
2006-01-10