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

Mac: Holding a key down throws exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u20
    • 8
    • javafx
    • MacOSX

      Running a simple Swing/JFXPanel with key pressed throws exception.

      1) Launch the program below
      2) click in the window
      3) press and hold the 'a' key

      /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/bin/java
      java.lang.reflect.InvocationTargetException
      at sun.lwawt.macosx.LWCToolkit.invokeAndWait(LWCToolkit.java:582)
      at sun.lwawt.macosx.CInputMethod.selectedRange(CInputMethod.java:638)
      Caused by: java.lang.NullPointerException
      at java.text.AttributedString.<init>(AttributedString.java:127)
      at javafx.embed.swing.InputMethodSupport$InputMethodRequestsAdapter.getSelectedText(InputMethodSupport.java:106)
      at sun.awt.im.InputMethodContext.getSelectedText(InputMethodContext.java:323)
      at sun.lwawt.macosx.CInputMethod$4.run(CInputMethod.java:640)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
      at java.awt.EventQueue.access$400(EventQueue.java:97)
      at java.awt.EventQueue$3.run(EventQueue.java:697)
      at java.awt.EventQueue$3.run(EventQueue.java:691)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
      at java.awt.EventQueue$4.run(EventQueue.java:719)
      at java.awt.EventQueue$4.run(EventQueue.java:717)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
      at snap.swing.RibsEventQueue.dispatchEvent(RibsEventQueue.java:87)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

            anthony Anthony Petrov (Inactive)
            jmartinjfx Jeff Martin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: