Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 344800 - NPE in AbstractTable
Summary: NPE in AbstractTable
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-05 04:12 EDT by Matthias Zimmermann CLA
Modified: 2021-08-19 11:28 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Zimmermann CLA 2011-05-05 04:12:45 EDT
PROBLEM DESCRIPTION:
Occasionally, we get a NullPointerException in AbstractTable. Unfortunately, the exception is not reproducable reliably, but we see the problem mostly while quickly switching between different tree nodes or typing text very fast.

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
  at org.eclipse.scout.rt.client.ui.basic.table.AbstractTable.getFilteredRows(AbstractTable.java:1478)
  at org.eclipse.scout.rt.client.ui.basic.table.AbstractTable.getFilteredRowCount(AbstractTable.java:1498)
  at org.eclipse.scout.rt.ui.swing.basic.table.SwingTableModel.getRowCount(SwingTableModel.java:41)
  at javax.swing.JTable.getRowCount(JTable.java:2640)
  at javax.swing.JTable.getCellRect(JTable.java:2910)
  at org.eclipse.scout.rt.ui.swing.ext.JTableEx.getCellRect(JTableEx.java:295)
  at com.bsiag.swing.plaf.synth.SynthTableUI.paintCells(SynthTableUI.java:511)
  at com.bsiag.swing.plaf.synth.SynthTableUI.paint(SynthTableUI.java:300)
  at com.bsiag.swing.plaf.synth.SynthTableUI.update(SynthTableUI.java:226)
  at javax.swing.JComponent.paintComponent(JComponent.java:751)
  at javax.swing.JComponent.paint(JComponent.java:1017)
  at javax.swing.JComponent.paintChildren(JComponent.java:852)
  at javax.swing.JComponent.paint(JComponent.java:1026)
  at javax.swing.JViewport.paint(JViewport.java:747)
  at javax.swing.JComponent.paintToOffscreen(JComponent.java:5112)
  at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:278)
  at javax.swing.RepaintManager.paint(RepaintManager.java:1220)
  at javax.swing.JComponent._paintImmediately(JComponent.java:5060)
  at javax.swing.JComponent.paintImmediately(JComponent.java:4870)
  at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:803)
  at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
  at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
  at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:125)
  at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
  at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
  at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
  at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
  at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
  at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

EVALUATION:
The NPE is thrown because one of the rows is null. If this is a valid case, a null-check has to be introduced.
Otherwise, we suggest checking if all operations in AbstractTable really are thread-safe (because the problem often occurs while making many very fast user inputs).
We have the impression that the problem was introduced with the "row filter cache" feature.

PROPOSED SOLUTION:
-
Comment 1 Matthias Zimmermann CLA 2011-05-05 04:13:24 EDT
fixed on 8.2.2011, #96148
Comment 2 Matthias Zimmermann CLA 2011-06-28 08:30:34 EDT
shipped with eclipse scout 3.7.0