Project: SWT
Bug 168821 Eclipse will crash with message "Widget is disposed".
Reported: 2006-12-21 03:24:43 | Status: resolved fixed

Environment: MacOSX 10.4.8(PowerPC), java 1.5.0_06, Eclipse SDK 3.3M3 Steps to reproduce bug: 1. Eclipse > Preferences... > Team > CVS > SSH2 Connection Method > Key Management 2. Press "Generate DSA Key..." 3. Select the textfield for "Confirm passphrase:". 4. Press "Ok" button The error log has following line, !MESSAGE Unhandled event loop exception !STACK 0 org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:3450) at org.eclipse.swt.SWT.error(SWT.java:3373) at org.eclipse.swt.SWT.error(SWT.java:3344) at org.eclipse.swt.widgets.Widget.error(Widget.java:663) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:332) at org.eclipse.swt.widgets.Control.setVisible(Control.java:3164) at org.eclipse.jface.dialogs.DialogMessageArea.restoreTitle(DialogMessageArea.java:129) at org.eclipse.jface.dialogs.DialogMessageArea.updateText(DialogMessageArea.java:151) at org.eclipse.jface.preference.PreferenceDialog.updateMessage(PreferenceDialog.java:1323) at org.eclipse.jface.preference.PreferencePage.setErrorMessage(PreferencePage.java:640) at org.eclipse.team.internal.ccvs.ssh2.CVSSSH2PreferencePage$6.focusLost(CVSSSH2PreferencePage.java:428) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:109) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1527) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1551) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1532) at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2367) at org.eclipse.swt.widgets.Control.forceFocus(Control.java:827) at org.eclipse.swt.widgets.Control.setFocus(Control.java:2817) at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:892) at org.eclipse.swt.widgets.Control.fixFocus(Control.java:775) at org.eclipse.swt.widgets.Control.setVisible(Control.java:3208) at org.eclipse.swt.widgets.TabItem.releaseWidget(TabItem.java:195) at org.eclipse.swt.widgets.Widget.release(Widget.java:1417) at org.eclipse.swt.widgets.TabFolder.releaseChildren(TabFolder.java:507) at org.eclipse.swt.widgets.Widget.release(Widget.java:1408) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:820) at org.eclipse.swt.widgets.Widget.release(Widget.java:1408) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:820) at org.eclipse.swt.widgets.Widget.release(Widget.java:1408) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:820) at org.eclipse.swt.widgets.Widget.release(Widget.java:1408) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:820) at org.eclipse.swt.widgets.Widget.release(Widget.java:1408) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:820) at org.eclipse.swt.widgets.Widget.release(Widget.java:1408) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:820) at org.eclipse.swt.widgets.Widget.release(Widget.java:1408) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:820) at org.eclipse.swt.widgets.Widget.release(Widget.java:1408) at org.eclipse.swt.widgets.Composite.releaseChildren(Composite.java:820) at org.eclipse.swt.widgets.Canvas.releaseChildren(Canvas.java:177) at org.eclipse.swt.widgets.Decorations.releaseChildren(Decorations.java:365) at org.eclipse.swt.widgets.Shell.releaseChildren(Shell.java:1201) at org.eclipse.swt.widgets.Widget.release(Widget.java:1408) at org.eclipse.swt.widgets.Widget.dispose(Widget.java:652) at org.eclipse.jface.window.Window.close(Window.java:330) at org.eclipse.jface.dialogs.Dialog.close(Dialog.java:1001) at org.eclipse.jface.dialogs.TrayDialog.close(TrayDialog.java:143) at org.eclipse.jface.preference.PreferenceDialog.close(PreferenceDialog.java:291) at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.close(FilteredPreferenceDialog.java:452) at org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog.close(WorkbenchPreferenceDialog.java:140) at org.eclipse.jface.preference.PreferenceDialog.cancelPressed(PreferenceDialog.java:269) at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:238) at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:638) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1527) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1551) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1536) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1310) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3369) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2994) at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65) at org.eclipse.ui.carbon.CarbonUIEnhancer.runAction(CarbonUIEnhancer.java:280) at org.eclipse.ui.carbon.CarbonUIEnhancer.access$0(CarbonUIEnhancer.java:274) at org.eclipse.ui.carbon.CarbonUIEnhancer$Target.commandProc(CarbonUIEnhancer.java:79) at org.eclipse.swt.internal.carbon.OS.MenuSelect(Native Method) at org.eclipse.swt.widgets.Display.mouseProc(Display.java:2786) at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Native Method) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2963) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1945) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1909) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:425) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) 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:585) at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethod(EclipseAppContainer.java:522) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:147) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:170) 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:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:339) at org.eclipse.core.launcher.Main.basicRun(Main.java:283) at org.eclipse.core.launcher.Main.run(Main.java:984) at org.eclipse.core.launcher.Main.main(Main.java:959) This crash also occurs on Eclipse SDK 3.2.1 on MacOSX, but I have not been able to reproduce this bug on WindowsXP and GNU/Linux.

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabItem.java