| Summary: | NPE in SelectionLayerPainter#isInCurrentLayer() | ||
|---|---|---|---|
| Product: | [Technology] NatTable | Reporter: | Dirk Fauth <dirk.fauth> |
| Component: | Core | Assignee: | Dirk Fauth <dirk.fauth> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 2.0.5 | ||
| Target Milestone: | 2.1.0 | ||
| Hardware: | PC | ||
| OS: | Windows 10 | ||
| See Also: |
https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/199816 https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=f0dedb4add30dcfd29931b876bd42ebe35f1de38 |
||
| Whiteboard: | |||
New Gerrit change created: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/199816 Gerrit change https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/199816 was merged to [master]. Commit: http://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=f0dedb4add30dcfd29931b876bd42ebe35f1de38 Fixed with 2.1.0 |
In the following scenario it can happen that a NPE is thrown in SelectionLayerPainter#isInCurrentLayer(). - open a filterable example (e.g. _6031_GlazedListsFilterExample) - have a size that a horizontal scrollbar exists - scroll down a bit - apply a filter to reduce the list size so that the horizontal scrollbar disappears In the back the following exception is thrown: [main] ERROR org.eclipse.nebula.widgets.nattable.painter.layer.NatLayerPainter - Error while painting table java.lang.NullPointerException at org.eclipse.nebula.widgets.nattable.selection.SelectionLayerPainter.isInCurrentLayer(SelectionLayerPainter.java:343) at org.eclipse.nebula.widgets.nattable.selection.SelectionLayerPainter.getBorderCells(SelectionLayerPainter.java:219) at org.eclipse.nebula.widgets.nattable.selection.SelectionLayerPainter.paintLayer(SelectionLayerPainter.java:125) at org.eclipse.nebula.widgets.nattable.layer.CompositeLayer$CompositeLayerPainter.paintLayer(CompositeLayer.java:1069) at org.eclipse.nebula.widgets.nattable.painter.layer.NatLayerPainter.paintLayer(NatLayerPainter.java:61) at org.eclipse.nebula.widgets.nattable.NatTable.paintNatTable(NatTable.java:519) at org.eclipse.nebula.widgets.nattable.NatTable.paintControl(NatTable.java:514) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4173) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1081) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1563) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4818) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:348) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4812) at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3583) at org.eclipse.nebula.widgets.nattable.examples.runner.StandaloneNatExampleRunner.run(StandaloneNatExampleRunner.java:45) at org.eclipse.nebula.widgets.nattable.examples.runner.StandaloneNatExampleRunner.run(StandaloneNatExampleRunner.java:25) at org.eclipse.nebula.widgets.nattable.examples._600_GlazedLists._603_Filter._6031_GlazedListsFilterExample.main(_6031_GlazedListsFilterExample.java:84) This can happen if an area is painted that is bigger than the new NatTable. In this case the BorderCell array contains null values. To fix this null checks need to be added in the BorderCell bounds checks.