JDK-6603561 : Plugin2: Multiple applets making liveconnect calls hangs the browser
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows
  • CPU: generic
  • Submitted: 2007-09-11
  • Updated: 2010-04-04
  • Resolved: 2007-10-31
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.
JDK 6
6u10Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Try loading any of the applet given below and wait for applets to get loaded inside the page properly. Try to refresh or do page switch, if brower hangs then bug is reproduced.

http://sqeweb.sfbay.sun.com/deployment2/jitu/deployment_JDK7_int_ws/deployment/src/plugin/manual/html/MultipleAppTest.html
http://sqeweb.sfbay.sun.com/deployment2/jitu/deployment_JDK7_int_ws/deployment/src/plugin/manual/html/MultipleAppTestOE.html

Comments
EVALUATION This bug is being marked as a duplicate of 6622332 for bookkeeping purposes and does not need to be re-verified independently. In the case of a regression please file a new bug.
31-10-2007

EVALUATION This test case uncovered several lurking problems in the new plugin's shutdown sequence, mostly related to LiveConnect calls. First, there was a blocking call to the applet's Event Dispatch Thread from the main thread on the client side (the JVM instance executing the applet), which was a potential source of deadlocks and which was what made this test case appear to hang the browser. In fact, the browser would recover after some 20 seconds, but would thereafter be unable to execute any more applets since the subordinate JVM would be deadlocked. Second, LiveConnect capabilities were being shut down for applets too early; applets need to be able to make LiveConnect calls during Applet.stop(), though according to current specifications should not be able to do so afterward, for example, in Applet.destroy(). Third, on the browser (server) side, the sending of the StopAppletMessage and waiting for its acknowledgment were blocking without processing incoming messages from the client, also preventing Java-to-JavaScript calls from being made during Applet.stop(). The latter was the deepest root cause for the behavior seen originally. The Applet.stop() handling on the browser side has been split into two portions with platform-dependent code run in the middle to process incoming requests, in similar fashion to how JavaScript-to-Java calls work. On the client side the termination of LiveConnect capabilities has been moved to the correct place in the shutdown sequence. A lurking potential problem in the implementation of MozillaPlugin.invokeLater() on Unix platforms (which may soon be used on Windows as well) has been fixed. Other associated fixes and cleanups have been made. Tested with IE and Firefox on Windows and Firefox on Solaris/x86.
14-09-2007

SUGGESTED FIX http://analemma.sfbay.sun.com/net/jano2/export2/hotspot/users/kbr/webrevs/mjre/6603561_liveconnect_hangs/
14-09-2007