This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 405216 - Widget disposed exception in ProgressInfoItem.updateTrigger()
Summary: Widget disposed exception in ProgressInfoItem.updateTrigger()
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.8.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.4 M5   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-08 18:21 EDT by Rüdiger Herrmann CLA
Modified: 2014-01-21 14:22 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rüdiger Herrmann CLA 2013-04-08 18:21:10 EDT
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)
Comment 1 Clément Hurlin CLA 2013-12-16 05:54:54 EST
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.
Comment 2 Paul Webster CLA 2013-12-18 11:45:21 EST
I've uploaded a fix https://git.eclipse.org/r/19995

Does that allow your progress to work and avoid the exception?

PW
Comment 3 Clément Hurlin CLA 2013-12-19 07:11:46 EST
I can't test the bugfix, since I use a packaged version of Eclipse. But it looks right :-)
Comment 4 Rüdiger Herrmann CLA 2013-12-30 13:17:07 EST
(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.
Comment 6 Paul Webster CLA 2014-01-21 14:22:35 EST
In 4.4.0.I20140120-2000

PW