United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6517045 Debugging JComboBox with Java 6 hangs X-windows.
JDK-6517045 : Debugging JComboBox with Java 6 hangs X-windows.

Details
Type:
Bug
Submit Date:
2007-01-24
Status:
Closed
Updated Date:
2010-09-29
Project Name:
JDK
Resolved Date:
2007-05-31
Component:
client-libs
OS:
linux
Sub-Component:
java.awt
CPU:
x86
Priority:
P2
Resolution:
Won't Fix
Affected Versions:
6
Fixed Versions:

Related Reports
Duplicate:
Relates:

Sub Tasks

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

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.
                                     
2007-02-05
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.
                                     
2007-05-31
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.
                                     
2007-09-03



Hardware and Software, Engineered to Work Together