This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
ISSUE Debugging JComboBox's in a Java 6 application are very difficult because the debugger kills all X input. Only way to recover is by rebooting or pressing Ctrl-Alt-Backspace to restart X. REPRODUCIBILITY ALWAYS OCCURS with J2SE 6 JDK. DOES NOT occur with J2SE 5 JDK. This ALWAYS reproduces on 3 different machines: 1) Ubuntu 6.10 running GNOME 2.16.1; 2) openSuSE 10.2 GNOME 2.16.1; 3) openSuSE 10.2 KDE (the default version of KDE for openSuSE 10.2). The fact that it occurs on KDE as well leads me to believe this bug occurs with J2SE 6 debugging and X rather than a specific window manager. I am not sure if this is a J2SE 6 bug or Netbeans 5.5 debugger running J2SE 6 bug. STEPS TO REPRODUCE 1) Compile the following program (Netbeans comments/tags stripped for brevity): [CODE] public class ComboCrash extends javax.swing.JFrame { public ComboCrash() { initComponents(); } private void initComponents() { cboCrash = new javax.swing.JComboBox(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); cboCrash.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); cboCrash.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboCrashActionPerformed(evt); } }); getContentPane().add(cboCrash, java.awt.BorderLayout.CENTER); pack(); } private void cboCrashActionPerformed(java.awt.event.ActionEvent evt) { int PLACE_BREAK_POINT_HERE_TO_DEADLOCK_X11 = 0; } private javax.swing.JComboBox cboCrash; } [/CODE] 2) Place a breakpoint inside the "cboCrashActionPerformed" method on the "PLACE_BREAK_POINT_HERE_TO_DEADLOCK_X11" line. 3) Compile & Run 4) Change the ComboBox entry to hit the breakpoint. 5) Netbeans 5.5 shows the break-point being hit, but input to X is dead... Keyboard input is ignored, Mouse clicks are ignored, etc. The mouse cursor can be moved and applications seem to continue running (the GNOME System Monitor still updates as well as any music I am playing in the background.), although I can't interact with any of them.
This is not NetBeans bug. I've reproduced this with jdb. It's true that on JDK 1.5 it works fine, but on JDK 1.6 it blocks X server. To resurrect from this state it's enough to switch to console (CTRL-ALT-F1), kill the Java app and switch back (CTRL-ALT-F7). I'll file an issue for JDK... Resolving as invalid - not a NetBeans bug.
I've submitted a defect #6517045 for JDK.
*** Issue 112589 has been marked as a duplicate of this issue. ***
Reopening, should not be invalid, but wontfix.
Wontfix
*** Issue 91602 has been marked as a duplicate of this issue. ***
*** Issue 112977 has been marked as a duplicate of this issue. ***
*** Issue 141428 has been marked as a duplicate of this issue. ***
*** Issue 145263 has been marked as a duplicate of this issue. ***
*** Issue 161715 has been marked as a duplicate of this issue. ***
*** Issue 167156 has been marked as a duplicate of this issue. ***
My work-around is to switch to a different virtual console in gnome using Cntl-Alt-F1, then kill the java process I'm debugging. Then at least you don't have to restart the X server and you don't loose your place in Netbeans. Is it possible to make my default platform java 5 (for debugging) but still run Netbeans under java 6?
Yes, you can add JDK 5 into the Java Platforms (Tools -> Java Platforms) and then set the project you're debugging to use that JDK 5. You can also have a look at http://wingware.com/doc/howtos/debug-x-grab Specifically, under (2): Setting option "AllowDeactivateGrabs" "true" in xorg.conf.
*** Issue 168572 has been marked as a duplicate of this issue. ***
*** Issue 172531 has been marked as a duplicate of this issue. ***
*** Issue 174291 has been marked as a duplicate of this issue. ***
*** Bug 178685 has been marked as a duplicate of this bug. ***
*** Bug 180714 has been marked as a duplicate of this bug. ***
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.
*** Bug 185263 has been marked as a duplicate of this bug. ***
*** Bug 192425 has been marked as a duplicate of this bug. ***
*** Bug 194839 has been marked as a duplicate of this bug. ***
Just for reference, as an easy workaround, this property prevent from the GUI freeze when set to the program being debugged: -Dsun.awt.disablegrab=true As a side-effect some pop-up menus might not be closed, so use it for the debugging only.
*** Bug 197220 has been marked as a duplicate of this bug. ***
*** Bug 203221 has been marked as a duplicate of this bug. ***
As I've mentioned in issue #203221, I've managed to hack into X11 code and find a solution to this problem of locked X server. It's possible to release the window grab via debugger. That allows debugging of the JComboBox. Fixed by changeset: 204876:5aa81c3749e4 http://hg.netbeans.org/main/rev/5aa81c3749e4
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/5aa81c3749e4 User: mentlicher@netbeans.org Log: #93076, #203221 Detection of paused threads of applications that holds grabbed window implemented via direct access to X serevr routines. The grab is either released, or application is resumed to prevent from frozen X server.