JDK-5072892 : multiple applets making liveconnect calls hang browser
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Cannot Reproduce
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2004-07-12
  • Updated: 2015-03-27
  • Resolved: 2015-03-27
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
tbd_minorResolved
Related Reports
Relates :  
Description
Name: gm110360			Date: 07/12/2004


FULL PRODUCT VERSION :
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Windows 2000 (SP 4)

EXTRA RELEVANT SYSTEM CONFIGURATION :
IE 6.0.2800.1106

A DESCRIPTION OF THE PROBLEM :

We're trying to track down why our custom applets are crashing IE so often.

I've come up with a test case that will crash the browser everytime. It has a simple applet that does a live connect call in every paint. Then I put 28 of these applets in a page.

the page never completes loading, I usually only see the 1st applet display.

REGRESSION.  Last worked in version tiger-beta2

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create an applet that makes a call to Window.eval() in it's paint method.

Put many of these applets in an HTML page.

Try and load this page.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The page should come up and display.
ACTUAL -
IE hangs, I have to kill iexplore.exe

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.applet.Applet;
import java.awt.Graphics;

import netscape.javascript.*;

public class Simple2 extends Applet {

	JSObject window;
	String myString;
	String myString2;
    public void init() {
		this.window = JSObject.getWindow(this);
    	myString = this.getParameter("text");
    	//myString2 = String.valueOf(window.eval("'" + myString + "'"));
    }

    public void start() {
    }

    public void stop() {
    }

    public void destroy() {
    }

    public void paint(Graphics g) {
    	
    	g.drawString(myString, 5, 10);
    	myString2 = String.valueOf(window.eval("'" + myString + "'"));
    	g.drawString(String.valueOf(myString2), 5, 30);
    	if ( ! String.valueOf(myString2).equals(myString) )
    	{
    		System.out.println("Recieved Error [" + myString + "] [" + myString2 + "]");
    		g.drawString("ERROR!", 5, 50);
    	}
    		
    }
}

html:

<html>

<body>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111111111111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="122221111111111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111333311111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111444441111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<br>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111111111111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="122221111111111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111333311111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111444441111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<br>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111111111111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="122221111111111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111333311111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111444441111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<br>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111111111111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="122221111111111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111333311111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111444441111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<br>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111111111111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="122221111111111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111333311111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111444441111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<br>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111111111111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="oiuyoiuyoiuyouiyouiyouy">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="1111133331111poiupoiu1111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="1111144444111pppppp1111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<br>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111111116666666666666661111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="122221111ZAAAAAAAAAAAAAAAAAAAAa111111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11111333666666666666666666666666311111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" name="corda0" width="150" height="150" align="middle" >
<PARAM name="code" value="Simple2.class">
<PARAM name="text" value="11115555441111111111111111">
<PARAM name="codebase" value="http://pdxboss02:7099/">
</OBJECT>&nbsp;
<br>

</body>
</html>
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
don't use liveconnect
(Incident Review ID: 282342) 
======================================================================

Comments
EVALUATION sumbitter's testcase cannot be reproduced in mustang b48. I will try Caplin's case later
2005-08-26

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mustang
2004-10-02

EVALUATION When page containing multiple applets are refreshed quickly, because the applet initialization is done asynchronously, we may have a situation where in multiple applets are in different phases of initialization. In this scenario, there is a chance that the browser thread may be blocked waiting for applet to finish certain task. At the same time we can have a EDT or other thread blocking on browser thread to process some messages, resulting in deadlock. This problem exists in previous releases of Java Plug-in. ###@###.### 2004-07-15 This maybe related to applet lifecycle work in Mustang. ###@###.### 2004-12-01 02:55:43 GMT
2004-07-15