RichTextArea: NPE in InputMethodRequests

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • jfx26
    • Affects Version/s: jfx25
    • Component/s: javafx
    • None
    • Fix Understood
    • generic

      An NPE gets thrown when scrolling a large model in the RichTextArea:

      Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "com.sun.jfx.incubator.scene.control.richtext.CaretInfo.getMinX()" because "ci" is null
      at jfx.incubator.richtext/com.sun.jfx.incubator.scene.control.richtext.VFlow.getImeLocationOnScreen(VFlow.java:1721)
      at jfx.incubator.richtext/jfx.incubator.scene.control.richtext.skin.RichTextAreaSkin$2.getTextLocation(RichTextAreaSkin.java:176)
      at javafx.graphics/javafx.scene.Scene$InputMethodRequestsDelegate.getTextLocation(Scene.java:4252)
      at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.getInputMethodCandidatePos(GlassViewEventHandler.java:580)
      at javafx.graphics/com.sun.glass.ui.View.getInputMethodCandidatePos(View.java:691)
      at javafx.graphics/com.sun.glass.ui.View.notifyInputMethodCandidatePosRequest(View.java:1019)

      (discovered while fixing https://github.com/openjdk/jfx/pull/1975 )

      To reproduce, run RichTextAreaDemoApp with a "2,000,000,000 Lines" model and try scrolling with the mouse wheel rapidly up and down.

            Assignee:
            Andy Goryachev
            Reporter:
            Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: