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

GUI hangs when focus is moved by arrow key in jdk5u32

XMLWordPrintable

    • x86
    • linux_redhat_6.1

      A JavaSE licensee reproted hang-up problem.

      CONFIGURATION:
      OS : RHEL6.1
      JDK : JDK5u32-b02

      REPRODUCE:
      1. Compile the attached java program.
      $ javac SimpleMenuFrame.java

      2. Execute the problem.
      $ java SimpleMenuFrame

      You will see a window which has 2 puldown menu.

      3. Select either of menu0 or memu1 (Keep the pull down menu selected)
      4. Move focus by pressing cursor key( "<-" or "->" arrow key)

      The following stack trace shows up.
      ----------------------------
      "AWT-EventQueue-0" prio=1 tid=0x8fafe698 nid=0x1b8b runnable [0x8f7d6000..0x8f7d7030]
      at sun.awt.X11.XMenuPeer.getDownSelected(XMenuPeer.java:709)
      at sun.awt.X11.XMenuBarPeer.selectMenuByKeyPress(XMenuBarPeer.java:231)
      at sun.awt.X11.XMenuBarPeer.handleKeyPressOnEDT(XMenuBarPeer.java:551)
      at sun.awt.X11.XMenuBarPeer$1.run(XMenuBarPeer.java:515)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:499)
      at java.awt.EventQueue.access$000(EventQueue.java:80)
      at java.awt.EventQueue$1.run(EventQueue.java:462)
      at java.awt.EventQueue$1.run(EventQueue.java:461)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:84)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:471)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)


      According to the licensss's investigation, this hang seem to occur between line#706 and line#709.
      ----------------------------
      <j2se/src/solaris/classes/sun/awt/X11/XMenuPeer.java of JDK5u32>
         698 int getDownSelected() {
         699 XMenuItemPeer[] localItems = copyItems();
         700 int nitems = localItems.length;
         701 if (nitems == 0) {
         702 return -1;
         703 }
         704 XMenuItemPeer mi;
         705 int sel = getSelected();
         706 do {
         707 sel = (sel+1) % nitems;
         708 mi = localItems[sel];
         709 } while ((!mi.isEnabled()) || (mi.getLabel() != null && mi.getLabel().equals("-")));
         710 return sel;
         711 }

            dbuck David Buck
            tbaba Tadayuki Baba (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: