FaqDebuggingAWTXWindows

Debugging in AWT hangs the X Window System

Description

It is not possible to grab focus of the blocked Java application in X Window System.

This problem is resolved in NetBeans 7.1 and newer by bug #93076. The bug persists in older NetBeans versions.

Example

  1. Use a j2se project
  2. Select a package and invoke New | JFrame Form ... in its popup menu
  3. Press Finish
  4. Go to Design view of opened editor
  5. Choose Combo Box in Palette an put it into the form
  6. Double click on the combo box in Inspector window
  7. In opened Java editor insert System.out.println("selected"); into the created jComboBox1ActionPerformed method
  8. Toggle line breakpoint on the inserted line
  9. Invoke Debug File on the created form from Projects view
  10. In opened frame select an item in the combo box

Result

IDE will show frozen debugged application with combobox popup menu holding system focus. To fix the issue debugged application process must be killed remotely or from textual console.

Solution

  1. Displaying your debug process to another screen avoids this kind of problems.
  2. Another solution is to set AllowDeactivateGrabs option in xorg.conf and then use Ctrl+Alt+Keypad-Divide key sequence to deactivate any active keyboard and mouse grabs. See man xorg.conf for details.

Bug Reports

This problem was reported as bug #6517045.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo