Community
Participate
Working Groups
When switching between two ETFw configurations with the TAU workflow selected an exception may occur with the stack trace given below. It's easy enough to check the widget for the disposed state and return if it isn't valid but I'm not sure if there's a more general problem that needs to be fixed here. !ENTRY org.eclipse.ui 4 0 2013-05-02 13:40:28.792 !MESSAGE Unhandled event loop exception !STACK 0 org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed) at org.eclipse.swt.SWT.error(SWT.java:4392) at org.eclipse.swt.SWT.error(SWT.java:4307) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3692) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3341) at org.eclipse.jface.window.Window.runEventLoop(Window.java:826) at org.eclipse.jface.window.Window.open(Window.java:802) at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1134) at org.eclipse.debug.ui.DebugUITools$2.run(DebugUITools.java:604) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:612) at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:546) at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:81) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1392) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3717) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1108) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:992) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:137) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:600) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:555) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) 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:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450) at org.eclipse.equinox.launcher.Main.main(Main.java:1426) Caused by: org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:4392) at org.eclipse.swt.SWT.error(SWT.java:4307) at org.eclipse.swt.SWT.error(SWT.java:4278) at org.eclipse.swt.widgets.Widget.error(Widget.java:481) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:418) at org.eclipse.swt.widgets.Combo.setItems(Combo.java:1847) at org.eclipse.ptp.etfw.tau.ui.TAUMakefileCombo.updateMakefileCombo(TAUMakefileCombo.java:172) at org.eclipse.ptp.etfw.tau.ui.TAUMakefileCombo.access$1(TAUMakefileCombo.java:152) at org.eclipse.ptp.etfw.tau.ui.TAUMakefileCombo$1$1.run(TAUMakefileCombo.java:116) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) ... 40 more
I added a dispose listener to the combo box that calls cancel on the background job that is fetching the list of TAU makefiles. Can you test this and see if it fixes the issue you see? As a side note, I could not reproduce this dispose exception you see (using Trestles) where I switched between 2 launch configurations multiple times in succession with the performance analysis tab selected. However, I did see a bunch of background jobs that were still running since there wasn't a listener checking to see if the widget was disposed. I'm curious to see if this job cancel also fixes this issue you're seeing. If not, I'll try to dig into it further.
I added a check for disposed at TAUMakefileCombo.java:118 so this specific error should no longer occur, but it is possible that the check is just catching the tail of the problem and missing the root (to mix my animal and vegetable metaphors).
I this still a problem?