-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.4.2
-
x86
-
linux
Name: rmT116609 Date: 08/21/2003
FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
AND
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
AND
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
FULL OS VERSION :
Linux linux801 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
Also locks Windows 2000
EXTRA RELEVANT SYSTEM CONFIGURATION :
all (tested) configurations
A DESCRIPTION OF THE PROBLEM :
When using JApplet on Netscape, modal dialogs can fall "behind" the browser window. For this reason, I am trying to use showInternalXDialog in JOptionPane, passing the contentPane of the JApplet as the parent component.
THis works fine, and a JInternalFrame is shown to the user, HOWEVER, if the user attempts to navigate off the applet page whilst the modal internal frame is visible, the JVM (and the browser) lock up...
This occurs on both Linux and Windows, Netscape 6, IE 5, IE 5.5, and IE 6
(I haven't been able to test on Mac, or other browsers)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile this class, and view the applet using the attatched HTML. Click the button so that the internal message box becomes visible, then try to navigate to another page (whilst it is still visible)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would have expected the JVM to exit normally, and stop the applet...
ACTUAL -
JVM locks, browser locks, browser will not close, or navigate
ERROR MESSAGES/STACK TRACES THAT OCCUR :
None...
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
-------------JAVA CODE--------------
/**
* <p>Title: JInternal Frame JVM Crash Example</p>
* <p>Description: Shows how JVM can lock when JApplet showing JInternalFrame</p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: Paterson Institute for Cancer Research</p>
* @author Tim Yates
* @version 1.0
*/
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
public class CrashApplet extends JApplet
{
JButton jButton1 = new JButton();
public void init()
{
try
{
jbInit();
}
catch(Exception e)
{
e.printStackTrace();
}
}
private void jbInit() throws Exception
{
jButton1.setText("Launch Modal Internal Frame");
jButton1.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
jButton1_actionPerformed(e);
}
});
this.getContentPane().add(jButton1, BorderLayout.NORTH);
}
void jButton1_actionPerformed(ActionEvent e)
{
JOptionPane.showInternalMessageDialog( this.getContentPane(), "Now try to navigate to another page... JVM will lock" );
}
}
----------------HTML----------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ASCII">
<title>
Crash Test
</title>
</head>
<body>
CrashApplet will appear below in a Java enabled browser.<br>
<applet
codebase = "."
code = "CrashApplet.class"
name = "CrashApplet"
width = "600"
height = "400"
hspace = "0"
vspace = "0"
align = "middle"
>
</applet>
</body>
</html>
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None that I can think of...
(Incident Review ID: 188582)
======================================================================
FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
AND
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)
AND
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
FULL OS VERSION :
Linux linux801 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux
Also locks Windows 2000
EXTRA RELEVANT SYSTEM CONFIGURATION :
all (tested) configurations
A DESCRIPTION OF THE PROBLEM :
When using JApplet on Netscape, modal dialogs can fall "behind" the browser window. For this reason, I am trying to use showInternalXDialog in JOptionPane, passing the contentPane of the JApplet as the parent component.
THis works fine, and a JInternalFrame is shown to the user, HOWEVER, if the user attempts to navigate off the applet page whilst the modal internal frame is visible, the JVM (and the browser) lock up...
This occurs on both Linux and Windows, Netscape 6, IE 5, IE 5.5, and IE 6
(I haven't been able to test on Mac, or other browsers)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile this class, and view the applet using the attatched HTML. Click the button so that the internal message box becomes visible, then try to navigate to another page (whilst it is still visible)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would have expected the JVM to exit normally, and stop the applet...
ACTUAL -
JVM locks, browser locks, browser will not close, or navigate
ERROR MESSAGES/STACK TRACES THAT OCCUR :
None...
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
-------------JAVA CODE--------------
/**
* <p>Title: JInternal Frame JVM Crash Example</p>
* <p>Description: Shows how JVM can lock when JApplet showing JInternalFrame</p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: Paterson Institute for Cancer Research</p>
* @author Tim Yates
* @version 1.0
*/
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
public class CrashApplet extends JApplet
{
JButton jButton1 = new JButton();
public void init()
{
try
{
jbInit();
}
catch(Exception e)
{
e.printStackTrace();
}
}
private void jbInit() throws Exception
{
jButton1.setText("Launch Modal Internal Frame");
jButton1.addActionListener(new java.awt.event.ActionListener()
{
public void actionPerformed(ActionEvent e)
{
jButton1_actionPerformed(e);
}
});
this.getContentPane().add(jButton1, BorderLayout.NORTH);
}
void jButton1_actionPerformed(ActionEvent e)
{
JOptionPane.showInternalMessageDialog( this.getContentPane(), "Now try to navigate to another page... JVM will lock" );
}
}
----------------HTML----------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ASCII">
<title>
Crash Test
</title>
</head>
<body>
CrashApplet will appear below in a Java enabled browser.<br>
<applet
codebase = "."
code = "CrashApplet.class"
name = "CrashApplet"
width = "600"
height = "400"
hspace = "0"
vspace = "0"
align = "middle"
>
</applet>
</body>
</html>
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
None that I can think of...
(Incident Review ID: 188582)
======================================================================
- duplicates
-
JDK-6399750 RFE: Improve applet lifecycle and LiveConnect support in Java Plug-in
- Closed