JDK-6657505 : DEA: JFileChooser deadlocks IE under dual core
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2008-01-31
  • Updated: 2011-02-16
  • Resolved: 2008-02-13
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
J2SE Runtime Environment 5.0 Update 13,
J2SE Runtime Environment 5.0 Update 14
J2SE Runtime Environment 5.0 Update 11

ADDITIONAL OS VERSION INFORMATION :
windows XP professional

believe this can be replicated in all windows OS

A DESCRIPTION OF THE PROBLEM :
I was trying the code below in jre-1_5_0_14-windows-i586-p.exe  and IE ,*under dual processor* ,
The system get hung if the applet is reloaded 2-3 times .
Not able to replicate in single processor.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.Just run the applet in IE
2.Reload the age 3-4 times

IE got crashed.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The code should work
ACTUAL -
IE crashes

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Found one Java-level deadlock:
=============================
"thread applet-applettest/MyApplet.class":
 waiting to lock monitor 0x01ec6e74 (object 0x050cfa38, a sun.awt.windows.WDesk
topProperties),
 which is held by "AWT-EventQueue-0"
"AWT-EventQueue-0":
 waiting to lock monitor 0x01ec6e94 (object 0x05090800, a sun.awt.windows.WTool
kit),
 which is held by "thread applet-applettest/MyApplet.class"

Java stack information for the threads listed above:
===================================================
"thread applet-applettest/MyApplet.class":
       at sun.awt.windows.WDesktopProperties.addPropertyChangeListener(Unknown
Source)
       - waiting to lock <0x050cfa38> (a sun.awt.windows.WDesktopProperties)
       at sun.awt.windows.WToolkit.addPropertyChangeListener(Unknown Source)
       - locked <0x05090800> (a sun.awt.windows.WToolkit)
       at com.sun.java.swing.plaf.windows.DesktopProperty.getValueFromDesktop(U
nknown Source)
       at com.sun.java.swing.plaf.windows.DesktopProperty.createValue(Unknown S
ource)
       at javax.swing.UIDefaults.getFromHashtable(Unknown Source)
       at javax.swing.UIDefaults.get(Unknown Source)
       at javax.swing.MultiUIDefaults.get(Unknown Source)
       at javax.swing.UIDefaults.getColor(Unknown Source)
       at javax.swing.UIManager.getColor(Unknown Source)
       at javax.swing.LookAndFeel.installColors(Unknown Source)
       at javax.swing.LookAndFeel.installColorsAndFont(Unknown Source)
       at javax.swing.plaf.basic.BasicPopupMenuUI.installDefaults(Unknown Sourc
e)
       at javax.swing.plaf.basic.BasicPopupMenuUI.installUI(Unknown Source)
       at javax.swing.JComponent.setUI(Unknown Source)
       at javax.swing.JPopupMenu.setUI(Unknown Source)
       at javax.swing.JPopupMenu.updateUI(Unknown Source)
       at javax.swing.JPopupMenu.<init>(Unknown Source)
       at javax.swing.JPopupMenu.<init>(Unknown Source)
       at javax.swing.plaf.basic.BasicComboPopup.<init>(Unknown Source)
       at javax.swing.plaf.basic.BasicComboBoxUI.createPopup(Unknown Source)
       at com.sun.java.swing.plaf.windows.WindowsComboBoxUI.createPopup(Unknown
Source)
       at javax.swing.plaf.basic.BasicComboBoxUI.installUI(Unknown Source)
       at com.sun.java.swing.plaf.windows.WindowsComboBoxUI.installUI(Unknown S
ource)
       at javax.swing.JComponent.setUI(Unknown Source)
       at javax.swing.JComboBox.setUI(Unknown Source)
       at javax.swing.JComboBox.updateUI(Unknown Source)
       at javax.swing.JComboBox.init(Unknown Source)
       at javax.swing.JComboBox.<init>(Unknown Source)
       at com.sun.java.swing.plaf.windows.WindowsFileChooserUI$2.<init>(Unknown
Source)
       at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponent
s(Unknown Source)
       at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
       at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(Unknow
n Source)
       at javax.swing.JComponent.setUI(Unknown Source)
       at javax.swing.JFileChooser.updateUI(Unknown Source)
       at javax.swing.JFileChooser.setup(Unknown Source)
       at javax.swing.JFileChooser.<init>(Unknown Source)
       at javax.swing.JFileChooser.<init>(Unknown Source)
       at applettest.MyApplet.init(MyApplet.java:50)
       at sun.applet.AppletPanel.run(Unknown Source)
       at java.lang.Thread.run(Unknown Source)
"AWT-EventQueue-0":
       at sun.awt.windows.WToolkit.clearDesktopProperty(Unknown Source)
       - waiting to lock <0x05090800> (a sun.awt.windows.WToolkit)
       at sun.awt.windows.WDesktopProperties.diffPropertyChanges(Unknown Source
)
       - locked <0x050cfa38> (a sun.awt.windows.WDesktopProperties)
       at sun.awt.windows.WDesktopProperties.access$100(Unknown Source)
       at sun.awt.windows.WDesktopProperties$DiffPropertyChanges.run(Unknown So
urce)
       at java.awt.event.InvocationEvent.dispatch(Unknown Source)
       at java.awt.EventQueue.dispatchEvent(Unknown Source)
       at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

       at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
       at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
       at java.awt.EventDispatchThread.run(Unknown Source)

Found 1 deadlock.

[Loaded sun.awt.datatransfer.SunClipboard$2 from C:\PROGRA~1\Java\JRE15~1.0_1\li
b\rt.jar]


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package applettest;

import java.io.IOException;
import javax.swing.JApplet;
import javax.swing.JFileChooser;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

public class MyApplet extends JApplet {


  private JTextArea log;

  private static final DateFormat FORMAT = new SimpleDateFormat("HH:mm:ss.SSS");

  @Override
  public void init() {
      this.log = new JTextArea();
      this.setContentPane(new JScrollPane(this.log));
                           // if (args.length > 0) {                  //if (args[0].equals("win")) {
              try{
                  UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());                        } catch (ClassNotFoundException cnfe) {
                  System.out.println("ClassNotFoundException caught!");
              } catch (InstantiationException iex) {
                  System.out.println("InstantiationException caught!");
              } catch (IllegalAccessException iaex) {
                  System.out.println("IllegalAccessException caught!");
              } catch (UnsupportedLookAndFeelException ulfex) {
                  System.out.println("UnsupportedLookAndFeelException caught!");
              }
          //}
      //}
      System.out.println("Hello World!");
      System.out.println(UIManager.getSystemLookAndFeelClassName());
      JFileChooser jfc = new JFileChooser();
      jfc.showOpenDialog(null);
      System.out.println("OK");


  }

  @Override
  public void start() {

  }
} 
---------- END SOURCE ----------

Comments
EVALUATION This is a duplicate to CR 6513156 that is fixed jdk 7 and 6u10. Please escalate to sustaining if the fix is needed in 1.4.2 and 5.0 update releases.
13-02-2008