Community
Participate
Working Groups
Build ID: 3.3.0M7 Steps To Reproduce: 1.Run attached sample code 2.Use button to delete tree items from bottom until exception is thrown. 3. More information: M6 does not exhibit this behavior. Exception in thread "main" org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:3547) at org.eclipse.swt.SWT.error(SWT.java:3465) at org.eclipse.swt.SWT.error(SWT.java:3436) at org.eclipse.swt.widgets.Widget.error(Widget.java:432) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:325) at org.eclipse.swt.widgets.TreeItem.getBounds(TreeItem.java:401) at org.eclipse.jface.viewers.TreeViewerRow.getBounds(TreeViewerRow.java:48) at org.eclipse.jface.viewers.ViewerCell.getBounds(ViewerCell.java:83) at org.eclipse.jface.viewers.FocusCellOwnerDrawHighlighter.focusCellChanged(FocusCellOwnerDrawHighlighter.java:147) at org.eclipse.jface.viewers.SWTFocusCellManager.setFocusCell(SWTFocusCellManager.java:151) at org.eclipse.jface.viewers.SWTFocusCellManager.handleSelection(SWTFocusCellManager.java:101) at org.eclipse.jface.viewers.SWTFocusCellManager.access$2(SWTFocusCellManager.java:92) at org.eclipse.jface.viewers.SWTFocusCellManager$1.handleEvent(SWTFocusCellManager.java:126)
Created attachment 67355 [details] Sample code to reproduce bug
My editor application contains table with typically just a couple of items. Whenever an item is deleted in M7 a Widget disposed exception is thrown. 3.2 and 3.3M6 do not have this problem.
Ok. There are multiple problems I forgot to check: - a "null" check if there hasn't oldCell is null - a dispose check if the item is removed but old cell is still there (I think the main problem is that if the current item is removed the current focus cell should be set to null. I need to investigate how we can detect this situation adding a disposeListener might be the solution but I we need to discuss, Boris?)
Hm. I can't reproduce the the NPE now although I'm fairly sure I saw one before. The dispose Exception needs investigation as said above.
Tom, are you looking into this?
(In reply to comment #5) > Tom, are you looking into this? > yes. I just started.
Created attachment 67555 [details] Fix for Problem
+1 for RC1. Released >20070516.
marking as fixed...
When running the snippet, the cell editor stays around after deleting for the second time. Tom, is this a separate bug?
This is a seperate one but I can't remember having filed one. I'd day that we have this problem everywhere. We need to cancle-Editors before refreshing.
problem tracked in bug #187826
Verified the is disposed bug using I20070517-1700 on Windows XP.