Name: gm110360 Date: 04/14/2003
FULL PRODUCT VERSION :
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)
FULL OS VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
This is a very severe bug affecting following plugins
1.4.1
1.4.1_01
1.4.1_02
1.4.2 beta
For every call to a java method from javascript a handle is created and never released. This eventually brings down the machine by exahusting memory, bringing the machine on its knees. Entire application starts to malfunction on javascript side. If the java method call is done inside a javascript eventhandler, the calls line up into the stack and blowing the browser into dust. This is a very severe bug, and I am surprised to see a basic handle management was taken bugged down on new plugins. We expect to see improvement on Sun's java plugins, not suffering. If 1.4.2 goes out with every XP machine out there, it is going to be a catastrophy for the companies which have products depending on liveconnect. 1.4.2 is still beta, you still have opportunity to correct this.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Open window task manager and observe the number of handles and memory while running the following test case
---------------------------------------------------------------------------
** The following html is used: (test1.htm)
---------------------------------------------------------------------------
<html>
<head>
<script LANGUAGE="JavaScript">
function blowHandles() {
for (var i=0;i<10000;i++) { a1.method1 (); }
window.setInterval(blowMoreHandles,5);
}
function blowMoreHandles() {
a1.method1 ();
}
</script>
</head>
<body>
<input type=button onclick="blowHandles()" value="Test"></input>
<APPLET code="test1.applet1.class" archive="test1.jar" id="a1" name="a1">
<PARAM NAME = "scriptable"VALUE="true">';
</APPLET>
</body>
</html>
---------------------------------------------------------------------------
---------------------------------------------------------------------------
** The following applet: (test1/applet1.java)
---------------------------------------------------------------------------
package test1;
import java.applet.*;
public class applet1 extends Applet {
public void method1 () {}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
Handles should not increase, and MUST be release after each java metho call from javascript.
Handles are created and never released until the computer goes out of resources.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
---------------------------------------------------------------------------
** The following html is used: (test1.htm)
---------------------------------------------------------------------------
<html>
<head>
<script LANGUAGE="JavaScript">
function blowHandles() {
for (var i=0;i<10000;i++) { a1.method1 (); }
window.setInterval(blowMoreHandles,5);
}
function blowMoreHandles() {
a1.method1 ();
}
</script>
</head>
<body>
<input type=button onclick="blowHandles()" value="Test"></input>
<APPLET code="test1.applet1.class" archive="test1.jar" id="a1" name="a1">
<PARAM NAME = "scriptable"VALUE="true">';
</APPLET>
</body>
</html>
---------------------------------------------------------------------------
---------------------------------------------------------------------------
** The following applet: (test1/applet1.java)
---------------------------------------------------------------------------
package test1;
import java.applet.*;
public class applet1 extends Applet {
public void method1 () {}
}
---------- END SOURCE ----------
(Review ID: 183999)
======================================================================