Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Widget is disposed error in TableViewer
Widget is disposed error in TableViewer [message #657160] Tue, 01 March 2011 13:38
Albert  is currently offline Albert
Messages: 2
Registered: March 2011
Junior Member
Hi, I have an RCP application based on eclipse 3.5.2 plugins, running on windows 7. maybe once a day in production there is a widget is disposed error from a table.

Usage of the application involves the contents of the table being changed entirely depending on what is selected in another view or items may be updated/added/removed one at a time.

This is handled by a "ContentProvider" class that extends AbstractContentProvider and implements IStructuredContentProvider, IItemListViewer. It makes calls to a org.eclipse.jface.viewers.TableViewer object such as add(), remove(), update(). refresh()

Only a couple of method calls are ever made directly on the table from our code:
table.redraw(clientArea.x, clientArea.y, clientArea.width, clientArea.height, true);
table.update();

It looks like somehow the underlying TableViewer is getting into an illegal state where the data on a TableItem is null. Has anyone had this case before and is there something specific I should look out for that might cause this symptom? I don't know how to reproduce the error so it's difficult to debug what's going on.


org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:3884)
at org.eclipse.swt.SWT.error(SWT.java:3799)
at org.eclipse.swt.SWT.error(SWT.java:3770)
at org.eclipse.swt.widgets.Widget.error(Widget.java:463)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:336)
at org.eclipse.swt.widgets.Widget.getData(Widget.java:521)
at
org.eclipse.jface.viewers.AbstractTableViewer.setSelectionTo Widget(AbstractTableViewer.java:921)
at
org.eclipse.jface.viewers.StructuredViewer.setSelectionToWid get(StructuredViewer.java:1711)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1399)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1353)
at
org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1455)
at
org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer. java:537)
at
org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1414)
at
.....
org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchroniz er.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4342)
at


Here's another different trace that seems to stem from the same problem:


org.eclipse.swt.SWTException: Failed to execute runnable
(org.eclipse.core.runtime.AssertionFailedException: null argument:)
at org.eclipse.swt.SWT.error(SWT.java:3884)
at org.eclipse.swt.SWT.error(SWT.java:3799)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.j ava:195)
at
org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchroniz er.java:150)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4342)
.....
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(U nknown
Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.core.runtime.AssertionFailedException: null argument:
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
at
org.eclipse.jface.viewers.StructuredViewer.disassociate(Stru cturedViewer.java:640)
at
org.eclipse.jface.viewers.AbstractTableViewer.internalRefres hAll(AbstractTableViewer.java:727)
at
org.eclipse.jface.viewers.AbstractTableViewer.internalRefres h(AbstractTableViewer.java:649)
at
org.eclipse.jface.viewers.AbstractTableViewer.internalRefres h(AbstractTableViewer.java:636)
at
org.eclipse.jface.viewers.StructuredViewer$7.run(StructuredV iewer.java:1457)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1392)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1353)
at
org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1455)
at
org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer. java:537)
at
org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1414)
at

.....

org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3885)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3506)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 21)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)


I'm really stumped on this one so any help is greatly appreciated.

[Updated on: Wed, 02 March 2011 07:18]

Report message to a moderator

Previous Topic:whole word file search
Next Topic:plug-in development - automatically download required bundles first
Goto Forum:
  


Current Time: Wed Apr 16 16:11:16 EDT 2014

Powered by FUDForum. Page generated in 0.01962 seconds