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

[TableView] NullPointerException in TableViewArrayListSelectionModel.handleSelectedCellsListChangeEvent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Incomplete
    • Affects Version/s: 8u25, 8u31
    • Fix Version/s: None
    • Component/s: javafx

      Description

      javafx.runtime.version: 8.0.31-b13

      Quite often when clicking around in a cellSelectionEnabled TableView, I get this exception:

      java.lang.NullPointerException: null
      at javafx.scene.control.TableView$TableViewArrayListSelectionModel.handleSelectedCellsListChangeEvent(TableView.java:2829) ~[jfxrt.jar:na]
      at javafx.scene.control.TableView$TableViewArrayListSelectionModel.clearAndSelect(TableView.java:2306) ~[jfxrt.jar:na]
      at javafx.scene.control.TableView$TableViewSelectionModel.clearAndSelect(TableView.java:1847) ~[jfxrt.jar:na]
      at com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.simpleSelect(TableCellBehaviorBase.java:209) ~[jfxrt.jar:na]
      at com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.doSelect(TableCellBehaviorBase.java:148) ~[jfxrt.jar:na]
      at com.sun.javafx.scene.control.behavior.CellBehaviorBase.mousePressed(CellBehaviorBase.java:132) ~[jfxrt.jar:na]
      at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:95) ~[jfxrt.jar:na]
      at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89) ~[jfxrt.jar:na]
      at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218) ~[jfxrt.jar:na]
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80) ~[jfxrt.jar:na]
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) ~[jfxrt.jar:na]
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) ~[jfxrt.jar:na]
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59) ~[jfxrt.jar:na]
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) ~[jfxrt.jar:na]
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) ~[jfxrt.jar:na]
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) ~[jfxrt.jar:na]
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) ~[jfxrt.jar:na]
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) ~[jfxrt.jar:na]
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) ~[jfxrt.jar:na]
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) ~[jfxrt.jar:na]
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) ~[jfxrt.jar:na]
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) ~[jfxrt.jar:na]
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) ~[jfxrt.jar:na]
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56) ~[jfxrt.jar:na]
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) ~[jfxrt.jar:na]
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) ~[jfxrt.jar:na]
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54) ~[jfxrt.jar:na]
      at javafx.event.Event.fireEvent(Event.java:198) ~[jfxrt.jar:na]
      at javafx.scene.Scene$MouseHandler.process(Scene.java:3724) ~[jfxrt.jar:na]
      at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3452) ~[jfxrt.jar:na]
      at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1728) ~[jfxrt.jar:na]
      at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2461) ~[jfxrt.jar:na]
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:348) ~[jfxrt.jar:na]
      at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:273) ~[jfxrt.jar:na]
      at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_31]
      at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:382) ~[jfxrt.jar:na]
      at com.sun.glass.ui.View.handleMouseEvent(View.java:553) ~[jfxrt.jar:na]
      at com.sun.glass.ui.View.notifyMouse(View.java:925) ~[jfxrt.jar:na]
      at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) [jfxrt.jar:na]
      at com.sun.glass.ui.win.WinApplication.lambda$null$141(WinApplication.java:102) [jfxrt.jar:na]
      at com.sun.glass.ui.win.WinApplication$$Lambda$37/1641808846.run(Unknown Source) [jfxrt.jar:na]
      at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31]

      Debugging shows that removed.getItem() returns null when this happens - adding a check for null before
          if (removedItem.equals(addedItem))
      would certainly fix that(?).

        Attachments

          Activity

            People

            Assignee:
            jgiles Jonathan Giles
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: