Community
Participate
Working Groups
RC1 - lock workspace - select some text in editor - execute edit->Task Tag observe: the workbench dialog pops up to create task tags - press OK observe: nothing happens - press Cancel You get the following exception in the log: !ENTRY org.eclipse.ui 4 0 Jun 01, 2004 12:32:42.886 !MESSAGE Widget is disposed !STACK 0 org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:2691) at org.eclipse.swt.SWT.error(SWT.java(Inlined Compiled Code)) at org.eclipse.swt.SWT.error(SWT.java(Inlined Compiled Code)) at org.eclipse.swt.widgets.Widget.error(Widget.java(Inlined Compiled Code)) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Control.getMonitor(Control.java:851) at org.eclipse.jface.window.Window.getInitialLocation(Window.java:473) at org.eclipse.jface.window.Window.initializeBounds(Window.java:615) at org.eclipse.jface.dialogs.Dialog.initializeBounds(Dialog.java:590) at org.eclipse.jface.window.Window.create(Window.java:351) at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:925) at org.eclipse.jface.window.Window.open(Window.java:637) at org.eclipse.ui.internal.progress.BlockedJobsDialog$1.runInUIThread (BlockedJobsDialog.java:206) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java(Compiled Code)) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java(Inlined Compiled Code)) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java (Inlined Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.runEventLoop (EventLoopProgressMonitor.java(Compiled Code)) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.isCanceled (EventLoopProgressMonitor.java:90) at org.eclipse.core.internal.jobs.ThreadJob.isCanceled (ThreadJob.java:116) at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:146) at org.eclipse.core.internal.jobs.ImplicitJobs.begin (ImplicitJobs.java:87) at org.eclipse.core.internal.jobs.JobManager.beginRule (JobManager.java:170) at org.eclipse.core.internal.resources.WorkManager.checkIn (WorkManager.java:95) at org.eclipse.core.internal.resources.Workspace.prepareOperation (Workspace.java:1628) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1668) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1693) at org.eclipse.ui.views.tasklist.TaskPropertiesDialog.saveChanges (TaskPropertiesDialog.java:514) at org.eclipse.ui.views.tasklist.TaskPropertiesDialog.okPressed (TaskPropertiesDialog.java:476) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:365) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:506) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.runEventLoop (EventLoopProgressMonitor.java(Compiled Code)) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.isCanceled (EventLoopProgressMonitor.java:90) at org.eclipse.core.internal.jobs.ThreadJob.isCanceled (ThreadJob.java:116) at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:146) at org.eclipse.core.internal.jobs.ImplicitJobs.begin (ImplicitJobs.java:87) at org.eclipse.core.internal.jobs.JobManager.beginRule (JobManager.java:170) at org.eclipse.core.internal.resources.WorkManager.checkIn (WorkManager.java:95) at org.eclipse.core.internal.resources.Workspace.prepareOperation (Workspace.java:1628) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1668) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1693) at org.eclipse.ui.views.tasklist.TaskPropertiesDialog.saveChanges (TaskPropertiesDialog.java:514) at org.eclipse.ui.views.tasklist.TaskPropertiesDialog.okPressed (TaskPropertiesDialog.java:476) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:365) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:506) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.runEventLoop (EventLoopProgressMonitor.java(Compiled Code)) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.isCanceled (EventLoopProgressMonitor.java:90) at org.eclipse.core.internal.jobs.ThreadJob.isCanceled (ThreadJob.java:116) at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:146) at org.eclipse.core.internal.jobs.ImplicitJobs.begin (ImplicitJobs.java:87) at org.eclipse.core.internal.jobs.JobManager.beginRule (JobManager.java:170) at org.eclipse.core.internal.resources.WorkManager.checkIn (WorkManager.java:95) at org.eclipse.core.internal.resources.Workspace.prepareOperation (Workspace.java:1628) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1668) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1693) at org.eclipse.ui.views.tasklist.TaskPropertiesDialog.saveChanges (TaskPropertiesDialog.java:514) at org.eclipse.ui.views.tasklist.TaskPropertiesDialog.okPressed (TaskPropertiesDialog.java:476) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:365) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:506) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.runEventLoop (EventLoopProgressMonitor.java(Compiled Code)) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.isCanceled (EventLoopProgressMonitor.java:90) at org.eclipse.core.internal.jobs.ThreadJob.isCanceled (ThreadJob.java:116) at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:146) at org.eclipse.core.internal.jobs.ImplicitJobs.begin (ImplicitJobs.java:87) at org.eclipse.core.internal.jobs.JobManager.beginRule (JobManager.java:170) at org.eclipse.core.internal.resources.WorkManager.checkIn (WorkManager.java:95) at org.eclipse.core.internal.resources.Workspace.prepareOperation (Workspace.java:1628) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1668) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1693) at org.eclipse.ui.views.tasklist.TaskPropertiesDialog.saveChanges (TaskPropertiesDialog.java:514) at org.eclipse.ui.views.tasklist.TaskPropertiesDialog.okPressed (TaskPropertiesDialog.java:476) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:365) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:506) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.runEventLoop (EventLoopProgressMonitor.java(Compiled Code)) at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.isCanceled (EventLoopProgressMonitor.java:90) at org.eclipse.core.internal.jobs.ThreadJob.isCanceled (ThreadJob.java:116) at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:146) at org.eclipse.core.internal.jobs.ImplicitJobs.begin (ImplicitJobs.java:87) at org.eclipse.core.internal.jobs.JobManager.beginRule (JobManager.java:170) at org.eclipse.core.internal.resources.WorkManager.checkIn (WorkManager.java:95) at org.eclipse.core.internal.resources.Workspace.prepareOperation (Workspace.java:1628) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1668) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1693) at org.eclipse.ui.views.tasklist.TaskPropertiesDialog.saveChanges (TaskPropertiesDialog.java:514) at org.eclipse.ui.views.tasklist.TaskPropertiesDialog.okPressed (TaskPropertiesDialog.java:476) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:365) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:506) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java (Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled Code)) at org.eclipse.jface.window.Window.open(Window.java:648) at org.eclipse.ui.texteditor.AddTaskAction.run(AddTaskAction.java:58) at org.eclipse.jface.action.Action.runWithEvent(Action.java:881) at org.eclipse.ui.actions.RetargetAction.runWithEvent (RetargetAction.java:212) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:915) at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionContributionItem.java:866) at org.eclipse.jface.action.ActionContributionItem$7.handleEvent (ActionContributionItem.java:785) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java (Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:253) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:334) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:41) at java.lang.reflect.Method.invoke(Method.java:386) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:638) at org.eclipse.core.launcher.Main.main(Main.java:622)
After running into this scenario the blocked dialog seems to be corrupted. Every subsequent action which enters a blocked scenario doesn't show the blocked dialog anymore, but allows arbitrary stacking of operations. Raising severity since this brings the workspace into a dangerous state.
I have logged the problem with the BlockedJobsDialog in Bug 65160. The TaskPropertiesDialog is relying on the operation being faster than the user can click. This was always an issue but it is easier to make happen now (see Dirks steps). The best bet is either 1) disable the buttons on the dialog when running. The only downside of this is that you won't get blockages reported 2) Run it as a Job which locks the resource only and collect up the information you need before you run it. schedule the job then close the dialog 3) collect up the information you need before the WorkspaceModifyOperation and then process the button pressed first. I think 2 is the best option
P.S. the easiest way to lock the workspace to test this is to do it self hosted with org.eclipse.ui.examples.jobs loaded. Open the JobFactory and select Lock workspace before running the job
One cause of this problem is that the TaskPropertiesDialog is executing the operation with a null progress monitor (see below). Using null progress monitors should be avoided and instead the IProgressService.busyCursorWhile() should be used. Once bug# 64937 is addressed then IProgressService.busyCursorWhile() can also be used from dialogs (in fact this would be a good test case). TaskPropertiesDialog.saveChanges(): ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) throws CoreException { createOrUpdateMarker(); } }, null);
Moved to busyCursorWhile as suggested by Erich. Fixed in build >20040607
This working when you add task from an editor but not from the TasksView. Reopening to investigate the difference.
*** This bug has been marked as a duplicate of 65813 ***
Not a dup
It turns out that these two operations have totally different dialogs - see Bug 66375 for a better description. I have fixed this so that both use the progress service now.
*** Bug 66484 has been marked as a duplicate of this bug. ***
Verified both from the tasks view and the editor in 20040610-1700