JDK-6394009 : REGRESSION: breakpoint in swing code locks up gnome desktop
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2006-03-04
  • Updated: 2007-10-16
  • Resolved: 2006-03-06
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-beta2-b73)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b73, mixed mode, sharing)


ADDITIONAL OS VERSION INFORMATION :
SunOS papaya1 5.10 Generic sun4u sparc SUNW,Sun-Blade-2500

EXTRA RELEVANT SYSTEM CONFIGURATION :
Uses NetBeans debugger, not jdk debugger, but the problem is probably in the debug API or JVM impl.

A DESCRIPTION OF THE PROBLEM :
I found this while using NetBeans to debug Netbeans.

Put a breakpoint in the actionPerformed event handler of a Swing JComboBox and run the program in the debugger. Change the combobox selection.  In JDK 1.5.0_06, it stops at the breakpoint, as expected.

However, in JDK 1.6.0 b70 and b73 on Solaris 10, JDS (Gnome desktop), it hangs the desktop.  In order to get my workstation back, I had to telnet to it from another machine and kill -9 the debugee process, at which point the desktop freed up.

As I said, this works fine in JDK 1.5.0_06.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a JFrame that has a combox with some items.
Add an actionPerformed handler to the combobox.
Run the JFrame in the debugger
Put a breakpoint in the actionPerformed handler.
Change the combobox selection in the running frame.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Debugger breaks at expected line.
ACTUAL -
On Solaris 10, JDS/Gnome desktop, entire desktop locks up (need to kill debugee process to unlock desktop).

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
package jdk6bug1;

public class TestFrame extends javax.swing.JFrame {
    
    public TestFrame() {
        initComponents();
    }
    
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
        jLabel1 = new javax.swing.JLabel();
        jComboBox1 = new javax.swing.JComboBox();

        getContentPane().setLayout(new java.awt.FlowLayout());

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jLabel1.setText("Change this selection:");
        getContentPane().add(jLabel1);

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jComboBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox1ActionPerformed(evt);
            }
        });

        getContentPane().add(jComboBox1);

        pack();
    }// </editor-fold>

    private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {
        Object item = jComboBox1.getSelectedItem();
        System.out.println("Selected item is " + ((item != null) ? item.toString() : "(null)"));
    }
    
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TestFrame().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration
    
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Use JDK 1.5.0_06 or don't debug combobox events under mustang.

Release Regression From : 5.0u6
The above release value was the last known release where this 
bug was known to work. Since then there has been a regression.

Comments
EVALUATION This is a duplicate of 6384219.
06-03-2006

EVALUATION This looks very similar to 6384219 "REGRESSION: When a breakpoint is hit from EventDispatchThread, GNOME hangs." As it is likely a DUPlicate report I am forwarding it to java/classes_awt.
04-03-2006