Original report by Brandon M (Bitbucket: bmagliano, GitHub: Unknown).
If I randomly click around in cells, resize them, change values continuously I am able to make the cells shift and remain that way until the application is closed. This also throws some nullpointerexceptions. I have tried to narrow down the behavior that causes this but I am unable. I essentially keep clicking, change cell sizes and throw a cell value change here and there. Once it goes in start exceptioning there is no going back. I have been able to recreate this three times with the following code.
controlsfx 8.40.9 maven java 8_45
#!java
TabPane tabPane = new TabPane();
Tab tab = new Tab("Test");
int rowCount = 15;
int columnCount = 10;
GridBase grid = new GridBase(rowCount, columnCount);
ObservableList<observablelist>> rows = FXCollections.observableArrayList();
for (int row = 0; row < grid.getRowCount(); ++row) {
final ObservableList<spreadsheetcell> list = FXCollections.observableArrayList();
for (int column = 0; column < grid.getColumnCount(); ++column) {
list.add(SpreadsheetCellType.STRING.createCell(row, column, 1, 1,"value"));
}
rows.add(list);
}
grid.setRows(rows);
SpreadsheetView spv = new SpreadsheetView(grid);
tab.setContent(spv);
tabPane.getTabs().add(tab);
AnchorPane root = new AnchorPane();
root.getChildren().add(tabPane);
Scene scene = new Scene(root, 1024, 768);
stage.setTitle("Hello SpreadsheetView!");
stage.setScene(scene);
stage.show();
</spreadsheetcell></observablelist>
#!java
Jul 21, 2015 4:54:41 PM impl.org.controlsfx.spreadsheet.CellView getEditor
WARNING: The cell at row 4 and column 1 was in edition and cell at row 4 and column 1 requested edition. This situation should not happen as the previous cell should not be in edition.
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at javafx.scene.control.TableColumn.lambda$new$32(TableColumn.java:281)
at javafx.scene.control.TableColumn$$Lambda$108/620359622.handle(Unknown Source)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
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.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
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:49)
at javafx.event.Event.fireEvent(Event.java:198)
at javafx.scene.control.TableCell.commitEdit(TableCell.java:349)
at impl.org.controlsfx.spreadsheet.CellView.commitEdit(CellView.java:174)
at impl.org.controlsfx.spreadsheet.GridCellEditor.endEdit(GridCellEditor.java:132)
at impl.org.controlsfx.spreadsheet.GridCellEditor$2.changed(GridCellEditor.java:253)
at impl.org.controlsfx.spreadsheet.GridCellEditor$2.changed(GridCellEditor.java:249)
at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:361)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
at javafx.beans.property.ReadOnlyBooleanPropertyBase.fireValueChangedEvent(ReadOnlyBooleanPropertyBase.java:72)
at javafx.scene.Node$FocusedProperty.notifyListeners(Node.java:7697)
at javafx.scene.Scene$13.invalidated(Scene.java:2077)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:111)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146)
at javafx.scene.Scene$KeyHandler.setFocusOwner(Scene.java:3925)
at javafx.scene.Scene$KeyHandler.requestFocus(Scene.java:3972)
at javafx.scene.Scene$KeyHandler.access$1900(Scene.java:3911)
at javafx.scene.Scene.requestFocus(Scene.java:2044)
at javafx.scene.Node.requestFocus(Node.java:7858)
at com.sun.javafx.scene.control.behavior.TableViewBehaviorBase.mousePressed(TableViewBehaviorBase.java:454)
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:198)
at javafx.scene.Scene$MouseHandler.process(Scene.java:3758)
at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3486)
at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2495)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:350)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:275)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$350(GlassViewEventHandler.java:385)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$241/469044592.get(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:404)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:384)
at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
at com.sun.glass.ui.View.notifyMouse(View.java:927)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$145(WinApplication.java:101)
at com.sun.glass.ui.win.WinApplication$$Lambda$36/1963387170.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Jul 21, 2015 4:54:42 PM impl.org.controlsfx.spreadsheet.CellView getEditor
WARNING: The cell at row 4 and column 4 was in edition and cell at row 4 and column 4 requested edition. This situation should not happen as the previous cell should not be in edition.
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at javafx.scene.control.TableColumn.lambda$new$32(TableColumn.java:281)
at javafx.scene.control.TableColumn$$Lambda$108/620359622.handle(Unknown Source)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
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.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
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:198)
at javafx.scene.control.TableCell.commitEdit(TableCell.java:349)
at impl.org.controlsfx.spreadsheet.CellView.commitEdit(CellView.java:174)
at impl.org.controlsfx.spreadsheet.GridCellEditor.endEdit(GridCellEditor.java:132)
at impl.org.controlsfx.spreadsheet.GridCellEditor$2.changed(GridCellEditor.java:253)
at impl.org.controlsfx.spreadsheet.GridCellEditor$2.changed(GridCellEditor.java:249)
at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:361)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
at javafx.beans.property.ReadOnlyBooleanPropertyBase.fireValueChangedEvent(ReadOnlyBooleanPropertyBase.java:72)
at javafx.scene.Node$FocusedProperty.notifyListeners(Node.java:7697)
at javafx.scene.Node.setFocused(Node.java:7750)
at javafx.scene.Scene$KeyHandler.setWindowFocused(Scene.java:3933)
at javafx.scene.Scene$KeyHandler.lambda$new$11(Scene.java:3955)
at javafx.scene.Scene$KeyHandler$$Lambda$105/1757727197.invalidated(Unknown Source)
at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:137)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
at javafx.beans.property.ReadOnlyBooleanWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyBooleanWrapper.java:178)
at javafx.beans.property.ReadOnlyBooleanWrapper$ReadOnlyPropertyImpl.access$100(ReadOnlyBooleanWrapper.java:148)
at javafx.beans.property.ReadOnlyBooleanWrapper.fireValueChangedEvent(ReadOnlyBooleanWrapper.java:144)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
at javafx.stage.Window.setFocused(Window.java:427)
at com.sun.javafx.stage.WindowPeerListener.changedFocused(WindowPeerListener.java:59)
at com.sun.javafx.tk.quantum.GlassWindowEventHandler.run(GlassWindowEventHandler.java:88)
at com.sun.javafx.tk.quantum.GlassWindowEventHandler.run(GlassWindowEventHandler.java:40)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassWindowEventHandler.lambda$handleWindowEvent$419(GlassWindowEventHandler.java:138)
at com.sun.javafx.tk.quantum.GlassWindowEventHandler$$Lambda$129/2125460557.get(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:404)
at com.sun.javafx.tk.quantum.GlassWindowEventHandler.handleWindowEvent(GlassWindowEventHandler.java:136)
at com.sun.glass.ui.Window.handleWindowEvent(Window.java:1229)
at com.sun.glass.ui.Window.notifyFocus(Window.java:1208)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$145(WinApplication.java:101)
at com.sun.glass.ui.win.WinApplication$$Lambda$36/1963387170.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
该提问来源于开源项目:controlsfx/controlsfx