JDK-6517045 : Debugging JComboBox with Java 6 hangs X-windows.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: linux
  • CPU: x86
  • Submitted: 2007-01-24
  • Updated: 2010-09-29
  • Resolved: 2007-05-31
Related Reports
Duplicate :  
Relates :  
Description
See http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=77365, http://www.netbeans.org/issues/show_bug.cgi?id=91602 and http://www.netbeans.org/issues/show_bug.cgi?id=93076

When there is a breakpoint in the action performer of a combo box, then when the breakpoint is hit, all X-windows ignores any mouse or keyboard input, because the suspended application grabs the focus. The only way to recover is to kill the debuggee from a console.
This happens in JDK 1.6 only, in JDK 1.5 it works fine, so it's a regression.

To reproduce:
- unzip the attached zip file ComboCrash.zip
- $ jdb
- > run debuggertest1.ComboCrash
- > stop at debuggertest1.ComboCrash:44
- then select an arbitrary item from the combo box
- the breakpoint is hit and under JDK 1.6 X-windows are frozen

See the original description at http://www.netbeans.org/issues/show_bug.cgi?id=93076

Comments
EVALUATION Once the native grab (which is now using in JDK) is being activated (this might be a popup menu or a ComboBox menu) none of the windows could accept pointer or keyboard events. So, if a debugger is triggered that time there are no chances to force ungrab because every Java thread become frozen. This is not the same as mentioned in 6384219 where the ungrab happened before the new window is about to appear but Flush is required for commiting it.
03-09-2007

EVALUATION after discussion we came to conclusion that this is just one more place when it is not wise to stop in debugger (the same is true for DnD, fullscreen). Thus we will not try to fix this, but document in troubleshooting guide.
31-05-2007

EVALUATION As I can see, the problem appears with different Swing components like combo boxes or popup menus. Most probably it is caused by X grab - this is the only thing I know that may result in all the keyboard and mouse for all the applications to be blocked. I don't know how debuggers deal with X grab. I also met the same problems when debugging native X applications. And I doubt that AWT can help with this.
05-02-2007