Sample application is attached.
java.lang.NullPointerException
at javafx.scene.control.ListCell$5.invalidated(ListCell.java:131)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:62)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:116)
at javafx.scene.control.ListCell.setListView(ListCell.java:89)
at javafx.scene.control.ListCell.impl_updateListView(ListCell.java:252)
at com.sun.javafx.scene.control.skin.ListViewSkin.updateCellCount(ListViewSkin.java:149)
at com.sun.javafx.scene.control.skin.ListViewSkin.access$600(ListViewSkin.java:26)
at com.sun.javafx.scene.control.skin.ListViewSkin$12.onChanged(ListViewSkin.java:119)
at com.sun.javafx.collections.ObservableListWrapper.callObservers(ObservableListWrapper.java:62)
at com.sun.javafx.collections.ObservableListWrapper.clear(ObservableListWrapper.java:101)
at main.Main$MainScene$1.handle(Main.java:38)
at main.Main$MainScene$1.handle(Main.java:35)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:59)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:161)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:114)
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:44)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:27)
at javafx.event.Event.fireEvent(Event.java:156)
at javafx.scene.Node.fireEvent(Node.java:5138)
at javafx.scene.control.Button.fire(Button.java:138)
at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:166)
at com.sun.javafx.scene.control.skin.SkinBase$4.handle(SkinBase.java:272)
at com.sun.javafx.scene.control.skin.SkinBase$4.handle(SkinBase.java:265)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:55)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:161)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:114)
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.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:44)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33)
at javafx.event.Event.fireEvent(Event.java:156)
at javafx.scene.Scene$MouseHandler.process(Scene.java:2341)
at javafx.scene.Scene$MouseHandler.process(Scene.java:2164)
at javafx.scene.Scene$MouseHandler.access$1000(Scene.java:2136)
at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1095)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:1636)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:180)
at com.sun.glass.ui.View.handleMouseEvent(View.java:244)
at com.sun.glass.ui.View.notifyMouse(View.java:496)
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$1$1.run(WinApplication.java:49)
at java.lang.Thread.run(Thread.java:662)
Exception in thread "JavaFX Application Thread" BUILD SUCCESSFUL (total time: 5 seconds)
java.lang.NullPointerException
at javafx.scene.control.ListCell$5.invalidated(ListCell.java:131)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:62)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:116)
at javafx.scene.control.ListCell.setListView(ListCell.java:89)
at javafx.scene.control.ListCell.impl_updateListView(ListCell.java:252)
at com.sun.javafx.scene.control.skin.ListViewSkin.updateCellCount(ListViewSkin.java:149)
at com.sun.javafx.scene.control.skin.ListViewSkin.access$600(ListViewSkin.java:26)
at com.sun.javafx.scene.control.skin.ListViewSkin$12.onChanged(ListViewSkin.java:119)
at com.sun.javafx.collections.ObservableListWrapper.callObservers(ObservableListWrapper.java:62)
at com.sun.javafx.collections.ObservableListWrapper.clear(ObservableListWrapper.java:101)
at main.Main$MainScene$1.handle(Main.java:38)
at main.Main$MainScene$1.handle(Main.java:35)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:59)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:161)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:114)
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:44)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:27)
at javafx.event.Event.fireEvent(Event.java:156)
at javafx.scene.Node.fireEvent(Node.java:5138)
at javafx.scene.control.Button.fire(Button.java:138)
at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:166)
at com.sun.javafx.scene.control.skin.SkinBase$4.handle(SkinBase.java:272)
at com.sun.javafx.scene.control.skin.SkinBase$4.handle(SkinBase.java:265)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:55)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:161)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:114)
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.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:44)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33)
at javafx.event.Event.fireEvent(Event.java:156)
at javafx.scene.Scene$MouseHandler.process(Scene.java:2341)
at javafx.scene.Scene$MouseHandler.process(Scene.java:2164)
at javafx.scene.Scene$MouseHandler.access$1000(Scene.java:2136)
at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1095)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:1636)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:180)
at com.sun.glass.ui.View.handleMouseEvent(View.java:244)
at com.sun.glass.ui.View.notifyMouse(View.java:496)
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$1$1.run(WinApplication.java:49)
at java.lang.Thread.run(Thread.java:662)
Exception in thread "JavaFX Application Thread" BUILD SUCCESSFUL (total time: 5 seconds)