United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4838000 : Applet hanging in MS IE when creating/closing windows

Details
Type:
Bug
Submit Date:
2003-03-26
Status:
Closed
Updated Date:
2003-09-25
Project Name:
JDK
Resolved Date:
2003-09-25
Component:
deploy
OS:
windows_xp
Sub-Component:
plugin
CPU:
x86
Priority:
P3
Resolution:
Duplicate
Affected Versions:
1.4.1_02
Fixed Versions:

Related Reports

Sub Tasks

Description
Creating a JFrame from an applet then closing the browser window while the JFrame has focus seems to cause a deadlock.

This seems only to happens on WinXP and IE6 and 1.4.1+

Using the testcase below you can reproduce this by:
1. start Internet Explorer, open url of the page with the Applet
2. maximize the browser window
3. open 20-30 browser windows with file->new->window menu (or Ctrl+N) - they
all should be running the applet and be maximized

4. now click on the button in the applet - a new frame should open in the
upper-left corner, it should be the active window now
5. while this external frame remains active, press directly the close button
of the browser window, the X button in the top-right corner
6. repeat this procedure starting with step 4 until all browser windows are
closed

<HTML>
<HEAD>
<TITLE>Swing Applet Test</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<BODY>
<OBJECT height="100%" width="100%" classid=clsid:CAFEEFAC-0014-0001-0002-ABCDEFFEDCBA>
	<PARAM NAME="code" VALUE="SwingAppletTest.class">
	<COMMENT>
	    <APPLET type="application/x-java-applet;version=1.4.1_02" width="100%" height="100%">            
	      <PARAM NAME="code" VALUE="SwingAppletTest.class">          
	     </applet>    
	</COMMENT>
	
</OBJECT>
</BODY>
</HTML>

import javax.swing.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class SwingAppletTest extends JApplet {
    public void start() {
        JButton button = new JButton("Press ME!");
        button.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JFrame frame = new JFrame();
                frame.getContentPane().add(new JLabel("External"));
                frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                frame.pack();
                frame.setVisible(true);
            }
        });
        getContentPane().add(button);
    }
}

                                    

Comments
EVALUATION

Tool late for mantis, commit to tiger.

###@###.### 2003-03-26

Can not reproduce on 1.4.2 so far.

###@###.### 2003-03-28

From JDC comment, I believe this is the same problem reported by Amdocs. The root of the problem is plugin open another message pump during shutdown, that can cause browser exit before plugin is ready. As result, plugin does not have chance to call CoUninitialize() when browser is exiting.

Waiting for Amdocs to test the workaround.

###@###.### 2003-09-02

part of 4918282
###@###.### 2003-09-25
                                     
2003-09-02



Hardware and Software, Engineered to Work Together