Community
Participate
Working Groups
I have a job that sets the IProgressConstants.ACTION_PROPERTY. The action opens a blocking dialog. After the dialog is closed I get the exception shown below. The link widget is disposed for some reason. Not sure if this has any relevance here, KEEP_PROPERTY and KEEPONE_PROPERTY are set to Boolean.TRUE. In case of a COMMAND_PROPERTY updateTrigger() isn't called after the command was executed. I am wondering if calling updateTrigger() after the action was run is necessary at all? If so, I suggest to guard the access to the link widget with an link.isDisposed() check. Exception stacktrace: org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:4282) at org.eclipse.swt.SWT.error(SWT.java:4197) at org.eclipse.swt.SWT.error(SWT.java:4168) 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.Widget.setData(Widget.java:1220) at org.eclipse.ui.internal.progress.ProgressInfoItem.updateTrigger(ProgressInfoItem.java:882) at org.eclipse.ui.internal.progress.ProgressInfoItem.executeTrigger(ProgressInfoItem.java:832) at org.eclipse.ui.internal.progress.ProgressInfoItem$4.widgetSelected(ProgressInfoItem.java:778) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendSelectionEvent(Widget.java:1094) at org.eclipse.swt.widgets.Link.wmNotifyChild(Link.java:1071) at org.eclipse.swt.widgets.Control.wmNotify(Control.java:5534) at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1896) at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:5086) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4584) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4985) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2425) at org.eclipse.swt.widgets.Link.callWindowProc(Link.java:172) at org.eclipse.swt.widgets.Widget.wmLButtonUp(Widget.java:2057) at org.eclipse.swt.widgets.Control.WM_LBUTTONUP(Control.java:4912) at org.eclipse.swt.widgets.Link.WM_LBUTTONUP(Link.java:909) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4565) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4985) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) 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:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
I confirm this bug on Linux/GTK too. It relates to how the disposal of the Link is scheduled, because closing my blocking dialog right after it opens does not cause the bug. Hence, a workaround is to make the dialog non-blocking.
I've uploaded a fix https://git.eclipse.org/r/19995 Does that allow your progress to work and avoid the exception? PW
I can't test the bugfix, since I use a packaged version of Eclipse. But it looks right :-)
(In reply to Paul Webster from comment #2) > I've uploaded a fix https://git.eclipse.org/r/19995 > > Does that allow your progress to work and avoid the exception? > > PW Thanks for looking into this. It solves the problem at hand. I can confirm that the exception is gone after I applied the changes.
Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=470f2747e7f4f598aa34b2b109a0bd833dbab942 PW
In 4.4.0.I20140120-2000 PW