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

WebView embedded into JFXPanel throws NPE on right mouse click after jfxPanel.setScene(null)

    XMLWordPrintable

Details

    Description

      1. Run the attached test case. It shows a Swing window and JFXPanel inside it.
      2. Right click on JFXPanel

      The following exception is thrown:

      java.lang.NullPointerException
      at com.sun.webpane.sg.WebPageClientImpl.windowToScreen(WebPageClientImpl.java:124)
      at com.sun.webpane.sg.theme.PopupMenuImpl.doShow(PopupMenuImpl.java:100)
      at com.sun.webpane.sg.theme.ContextMenuImpl.show(ContextMenuImpl.java:44)
      at com.sun.webpane.platform.ContextMenu.fwkShow(ContextMenu.java:42)
      at com.sun.webpane.platform.WebPage.twkProcessMouseEvent(Native Method)
      at com.sun.webpane.platform.WebPage.dispatchMouseEvent(WebPage.java:767)
      at javafx.scene.web.WebView.processMouseEvent(WebView.java:603)
      at javafx.scene.web.WebView.access$300(WebView.java:55)
      at javafx.scene.web.WebView$11.handle(WebView.java:662)
      at javafx.scene.web.WebView$11.handle(WebView.java:660)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:56)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:162)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:115)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:47)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33)
      at javafx.event.Event.fireEvent(Event.java:171)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:2699)
      at javafx.scene.Scene$MouseHandler.process(Scene.java:2520)
      at javafx.scene.Scene$MouseHandler.access$1200(Scene.java:2493)
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1226)
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:1810)
      at com.sun.javafx.tk.quantum.EmbeddedScene$2.run(EmbeddedScene.java:316)
      at com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:108)
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
      at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
      at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:62)
      at java.lang.Thread.run(Thread.java:662)

      Attachments

        Activity

          People

            azvegint Alexander Zvegintsev
            azvegint Alexander Zvegintsev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: