Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Exception when nattable in dialog(And the dialog is opened and closed quickly after that)
Exception when nattable in dialog [message #1091352] Wed, 21 August 2013 07:43 Go to next message
Renso Lohuis is currently offline Renso Lohuis
Messages: 44
Registered: July 2012
Member
I get an exception when a dialog with a nattable is opened and closed quickly after that.
Nattable tries to refresh the table, but the table is already disposed.
I have this problem since I work with version 1.0.1. I did not see this is version 1.0.0 or before

I get the following Exception:

org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed)
	at org.eclipse.swt.SWT.error(SWT.java:4361)
	at org.eclipse.swt.SWT.error(SWT.java:4276)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4144)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:150)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4361)
	at org.eclipse.swt.SWT.error(SWT.java:4276)
	at org.eclipse.swt.SWT.error(SWT.java:4247)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:340)
	at org.eclipse.swt.widgets.ScrollBar.getEnabled(ScrollBar.java:238)
	at org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer.recalculateVerticalScrollBar(ViewportLayer.java:707)
	at org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer.setMinimumOriginY(ViewportLayer.java:163)
	at org.eclipse.nebula.widgets.nattable.viewport.event.ViewportEventHandler.handleLayerEvent(ViewportEventHandler.java:95)
	at org.eclipse.nebula.widgets.nattable.viewport.event.ViewportEventHandler.handleLayerEvent(ViewportEventHandler.java:1)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.handleLayerEvent(AbstractLayer.java:214)
	at org.eclipse.nebula.widgets.nattable.viewport.ViewportLayer.handleLayerEvent(ViewportLayer.java:825)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.fireLayerEvent(AbstractLayer.java:242)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.handleLayerEvent(AbstractLayer.java:220)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.fireLayerEvent(AbstractLayer.java:242)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.handleLayerEvent(AbstractLayer.java:220)
	at org.eclipse.nebula.widgets.nattable.hideshow.AbstractColumnHideShowLayer.handleLayerEvent(AbstractColumnHideShowLayer.java:50)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.fireLayerEvent(AbstractLayer.java:242)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.handleLayerEvent(AbstractLayer.java:220)
	at org.eclipse.nebula.widgets.nattable.hideshow.AbstractColumnHideShowLayer.handleLayerEvent(AbstractColumnHideShowLayer.java:50)
	at org.eclipse.nebula.widgets.nattable.hideshow.ColumnHideShowLayer.handleLayerEvent(ColumnHideShowLayer.java:64)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.fireLayerEvent(AbstractLayer.java:242)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.handleLayerEvent(AbstractLayer.java:220)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.fireLayerEvent(AbstractLayer.java:242)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.handleLayerEvent(AbstractLayer.java:220)
	at org.eclipse.nebula.widgets.nattable.reorder.ColumnReorderLayer.handleLayerEvent(ColumnReorderLayer.java:95)
	at org.eclipse.nebula.widgets.nattable.layer.AbstractLayer.fireLayerEvent(AbstractLayer.java:242)
	at org.eclipse.nebula.widgets.nattable.extension.glazedlists.GlazedListsEventLayer$2.run(GlazedListsEventLayer.java:126)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	... 20 more


In the code I see of GlazedListsEventLayer I see the following:

	protected void fireEventFromSWTDisplayThread(final ILayerEvent event) {
		if (!testMode && Display.getCurrent() == null) {
			Display.getDefault().asyncExec(new Runnable() {
				public void run() {
					fireLayerEvent(event);
				}
			});
		} else {
			fireLayerEvent(event);
		}
	}


That code was not changed recently, but may be some logic behind there.

Does anybody has the same problem?
Does anybody has a workaround?
Should I file a bug?
Re: Exception when nattable in dialog [message #1091471 is a reply to message #1091352] Wed, 21 August 2013 10:56 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 789
Registered: July 2012
Senior Member
We know there is an issue caused by the scrollbar calculation. The issue you are seeing seems to be another one related to the same cause.

Edwin is currently looking at this, but it is not trivial to solve.
Re: Exception when nattable in dialog [message #1092066 is a reply to message #1091471] Thu, 22 August 2013 05:31 Go to previous messageGo to next message
Renso Lohuis is currently offline Renso Lohuis
Messages: 44
Registered: July 2012
Member
Thanks for your response!
Is there already a bug (number) I can track?

I understand that is not a real problem that occurs, but my users don't know that.
They see an exception (in a popup) and assume that something went wrong.

I don't know how I can catch the exception. Is there any way?
Or is there some other kind of workaround I can use meanwhile?
Re: Exception when nattable in dialog [message #1092109 is a reply to message #1092066] Thu, 22 August 2013 06:37 Go to previous message
Dirk Fauth is currently offline Dirk Fauth
Messages: 789
Registered: July 2012
Senior Member
I'm not sure if there is already a ticket you can track. We noticed that behavior in different scenarios.

I don't know a workaround as we don't even know what is causing the issues. We can reproduce it in several scenarios. For example if you try to resize a window so that only the column header is visible, the scrollbars go crazy as making the visible/invisible are causing resize events which will again cause recalculation of the scrollbars. Both issues doesn't seem to be related to each other, but in some way they are.
Previous Topic:Custom Painter in multi level header
Next Topic:Expected date of next release or patch
Goto Forum:
  


Current Time: Mon Oct 07 21:12:26 EDT 2013

Powered by FUDForum. Page generated in 0.01465 seconds