Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6598089

JDK 7: AWT often goes into busy loop when showing dialog

XMLWordPrintable

    • b25
    • generic, x86, sparc
    • linux, linux_ubuntu, solaris_10

        I run NetBeans development builds on JDK 7 promotions. Normally this works well. In the last few JDK 7 promotions, however, I have noticed frequent hangs of the IDE that do not obviously involve NetBeans code. The last time this occurred (forcing me to switch to JDK 6u2), I was running a NB dev build (070815) on JDK 7 b18 and invoked the Find Usages dialog on projects/projectapi/src/org/netbeans/spi/project/DataFilesProviderImplementation.java in NetBeans sources. The dialog appeared, I selected some options, and clicked Find. But instead of closing the dialog and showing the results window, the dialog window stayed open, and the application froze with 100% CPU usage. The EQ thread was consumed doing something inside Dialog.show (called from NB code); the tails of a couple of representative thread dumps:

        "AWT-EventQueue-1" prio=10 tid=0x084ee800 nid=0x113d runnable [0x86ee6000..0x86ee8030]
           java.lang.Thread.State: RUNNABLE
        at sun.awt.AppContext.get(AppContext.java:574)
        - locked <0x8bd25970> (a java.util.HashMap)
        at java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager(KeyboardFocusManager.java:190)
        - locked <0xa9a404a0> (a java.lang.Class for java.awt.KeyboardFocusManager)
        at java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager(KeyboardFocusManager.java:184)
        at java.awt.KeyboardFocusManager.getGlobalFocusedWindow(KeyboardFocusManager.java:753)
        - locked <0xa9a404a0> (a java.lang.Class for java.awt.KeyboardFocusManager)
        at java.awt.Window.isFocused(Window.java:2204)
        at sun.awt.X11.XComponentPeer.requestFocus(XComponentPeer.java:440)
        at java.awt.Component.requestFocusHelper(Component.java:7177)
        at java.awt.Component.requestFocus(Component.java:7017)
        at java.awt.DefaultKeyboardFocusManager.doRestoreFocus(DefaultKeyboardFocusManager.java:158)
        at java.awt.DefaultKeyboardFocusManager.restoreFocus(DefaultKeyboardFocusManager.java:116)
        at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:510)
        at java.awt.Component.dispatchEventImpl(Component.java:4292)
        at java.awt.Container.dispatchEventImpl(Container.java:2132)
        at java.awt.Component.dispatchEvent(Component.java:4250)
        at sun.awt.X11.XWindow$1.run(XWindow.java:378)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:227)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:610)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
        at java.awt.Dialog$1.run(Dialog.java:1069)
        at java.awt.Dialog$3.run(Dialog.java:1123)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Dialog.show(Dialog.java:1121)

        "AWT-EventQueue-1" prio=10 tid=0x084ee800 nid=0x113d runnable [0x86ee6000..0x86ee8030]
           java.lang.Thread.State: RUNNABLE
        at java.lang.reflect.Field.getFieldAccessor(Field.java:914)
        at java.lang.reflect.Field.setBoolean(Field.java:704)
        at sun.awt.X11.XWindow$1.run(XWindow.java:372)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:227)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:610)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
        at java.awt.Dialog$1.run(Dialog.java:1069)
        at java.awt.Dialog$3.run(Dialog.java:1123)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Dialog.show(Dialog.java:1121)

        The same problem occurred even after restarting the IDE. The freeze never corrects itself that I saw; the Java process must be killed from the command line. When I ran under JDK 6u2 instead, the same Find Usages call worked fine - the dialog closed quickly and results were shown as usual.

        I have observed similar freezes on a number of occasions, always involving a dialog (I think about to close), running only AWT code.

        I run on Ubuntu (7.04) with GNOME/Metacity.

              ant Anton Tarasov (Inactive)
              jglick Jesse Glick (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: