Details
-
Bug
-
Resolution: Fixed
-
P2
-
6u10
Description
FULL PRODUCT VERSION :
JRE version 6 Update 10 (build 1.6.0_10-rc-b28)
ADDITIONAL OS VERSION INFORMATION :
Windows XP Professional, version 5.1, (2600.xpsp_gfe.070227-2300:Service Pack 2)
A DESCRIPTION OF THE PROBLEM :
When JApplet uses netscape.javascript.JSObject.call()-function, Internet Explorer 6 stucks. Javascript method eval functions normally. I use Microsoft Visual Web Developer 2008 to launch the aspx-page. The web page-applet system works normally in JRE 1.6.0_05 and also worked normally in JRE 6 update 10 build 14 (beta) before I updated to RC.
ACTUAL -
IE 6 gets stucked. Only Windows Task Manager can stop html-page.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.JLabel;
import javax.swing.JPanel;
import netscape.javascript.JSObject;//...jre/lib/plugin.jar
public class TestApplet extends javax.swing.JApplet{
public void init() {
try {
java.awt.EventQueue.invokeAndWait(new Runnable() {
public void run() {
System.err.println("Thread = " + Thread.currentThread());
initComponents();
startProgram();
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
}
public void startProgram(){
try {
JSObject win = JSObject.getWindow(this);
if (win != null){
win.eval("alert('Javascript Alert')");
win.call("FunctionX", null);// Call FunctionX() in HTML page
}
}
catch (Exception ex) {
System.err.println("This browser may not support Java to Javascript communication");
}
}
private void initComponents() {
JPanel jp = new JPanel();
JLabel jl = new JLabel("This is JLabel");
jp.add(jl);
this.getContentPane().add(jp);
}
public void myFunction(){
try {
JSObject win = JSObject.getWindow(this);
if (win != null){
win.eval("alert('I got the message')");
}
}
catch (Exception ex) {
System.err.println("This browser may not support Java to Javascript communication");
}
}
}
and html-page
<body>
<form id="form1">
<div>
<H1> Test Applet
</H1>
<br />
<script>
functionX(){
document.TestApplet.myFunction();
}
</script>
<APPLET MAYSCRIPT CODE=TestApplet.class NAME=TestApplet archive="TestApplet.jar" WIDTH=100% HEIGHT=90%
</APPLET>
</div>
</form>
</body>
</html>
---------- END SOURCE ----------
Release Regression From : 6u7
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.
JRE version 6 Update 10 (build 1.6.0_10-rc-b28)
ADDITIONAL OS VERSION INFORMATION :
Windows XP Professional, version 5.1, (2600.xpsp_gfe.070227-2300:Service Pack 2)
A DESCRIPTION OF THE PROBLEM :
When JApplet uses netscape.javascript.JSObject.call()-function, Internet Explorer 6 stucks. Javascript method eval functions normally. I use Microsoft Visual Web Developer 2008 to launch the aspx-page. The web page-applet system works normally in JRE 1.6.0_05 and also worked normally in JRE 6 update 10 build 14 (beta) before I updated to RC.
ACTUAL -
IE 6 gets stucked. Only Windows Task Manager can stop html-page.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.JLabel;
import javax.swing.JPanel;
import netscape.javascript.JSObject;//...jre/lib/plugin.jar
public class TestApplet extends javax.swing.JApplet{
public void init() {
try {
java.awt.EventQueue.invokeAndWait(new Runnable() {
public void run() {
System.err.println("Thread = " + Thread.currentThread());
initComponents();
startProgram();
}
});
} catch (Exception ex) {
ex.printStackTrace();
}
}
public void startProgram(){
try {
JSObject win = JSObject.getWindow(this);
if (win != null){
win.eval("alert('Javascript Alert')");
win.call("FunctionX", null);// Call FunctionX() in HTML page
}
}
catch (Exception ex) {
System.err.println("This browser may not support Java to Javascript communication");
}
}
private void initComponents() {
JPanel jp = new JPanel();
JLabel jl = new JLabel("This is JLabel");
jp.add(jl);
this.getContentPane().add(jp);
}
public void myFunction(){
try {
JSObject win = JSObject.getWindow(this);
if (win != null){
win.eval("alert('I got the message')");
}
}
catch (Exception ex) {
System.err.println("This browser may not support Java to Javascript communication");
}
}
}
and html-page
<body>
<form id="form1">
<div>
<H1> Test Applet
</H1>
<br />
<script>
functionX(){
document.TestApplet.myFunction();
}
</script>
<APPLET MAYSCRIPT CODE=TestApplet.class NAME=TestApplet archive="TestApplet.jar" WIDTH=100% HEIGHT=90%
</APPLET>
</div>
</form>
</body>
</html>
---------- END SOURCE ----------
Release Regression From : 6u7
The above release value was the last known release where this
bug was not reproducible. Since then there has been a regression.
Attachments
Issue Links
- relates to
-
JDK-6675834 (Nightly) : Some of the Liveconnect scenarios are making browser to hang when run with new Plug-in
- Closed
-
JDK-6706305 JavaScript -> Java calls are being allowed against the applet too early
- Closed
-
JDK-6691927 Java console goes blank when opened from Java Tray icon in case of IE6
- Closed
-
JDK-6727020 Intermittent reliability problems related to applet relaunching
- Closed
-
JDK-6663106 JNLP applet re-launch freezes FF3 due to pending LiveConnect messages
- Closed