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

[TableView] NullPointerException when clicking empty area in TableView

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • emb-8u6, 8u20
    • 8
    • javafx
    • Windows 7 x64, b123 JDK8

      See https://javafx-jira.kenai.com/browse/RT-34404

      This is reproducible in the Ensemble8 application with the latest b123 of JDK8:

      * Open the Controls -> TableView example in Ensemble.
      * Make the columns smaller so that there is some part of the TableView visible that is not covered by any column.
      * Every click on the TableView that is to the right of all columns and under all rows (so the bottom right corner) raises this exception.

      This error most likely affects *every* application that uses TableView, so I consider it critical. In the ensemble application, the columns exactly fit into the TableView, but in most normal applications, the TableView will adapt to the window size and the columns will often only take part of the TableView width. So directly after opening the application, the user could raise an exception by just clicking at the right spot.


      Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
              at javafx.scene.control.TableView$TableViewArrayListSelectionModel.handleSelectedCellsListChangeEvent(TableView.java:2657)
              at javafx.scene.control.TableView$TableViewArrayListSelectionModel.clearAndSelect(TableView.java:2180)
              at javafx.scene.control.TableView$TableViewArrayListSelectionModel.clearAndSelect(TableView.java:2140)
              at com.sun.javafx.scene.control.behavior.TableRowBehavior.doSelect(TableRowBehavior.java:196)
              at com.sun.javafx.scene.control.behavior.TableRowBehavior.mousePressed(TableRowBehavior.java:88)
              at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:95)
              at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
              at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
              at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
              at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
              at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
              at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
              at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
              at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
              at javafx.event.Event.fireEvent(Event.java:204)
              at javafx.scene.Scene$MouseHandler.process(Scene.java:3689)
              at javafx.scene.Scene$MouseHandler.access$1800(Scene.java:3414)
              at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1676)
              at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2467)
              at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:314)
              at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:243)
              at java.security.AccessController.doPrivileged(Native Method)
              at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:345)
              at com.sun.glass.ui.View.handleMouseEvent(View.java:526)
              at com.sun.glass.ui.View.notifyMouse(View.java:898)
              at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
              at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
              at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)
              at java.lang.Thread.run(Thread.java:744)

            jgiles Jonathan Giles
            pkeckjfx Philipp Keck (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: