-
Bug
-
Resolution: Fixed
-
P4
-
8
-
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)
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)
- relates to
-
JDK-8087881 JFXPanel: InputMethods are enabled unconditionally
- Closed