Bug 178956 [Preferences] Preferences Dialog does not protect against exceptions on close
3.3 M5eh I can't close my preference dialog anymore. I press 'Cancel' and nothing happens, well, an exception is logged. Looks like I have a broken preference page (the Subsclipse plug-in in my case) that throws a runtime exception in the dispose method. I'll report that separately. Here is the stack trace: !ENTRY org.eclipse.ui 4 0 2007-03-23 09:52:17.125 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.IllegalArgumentException at org.eclipse.core.runtime.ListenerList.remove(ListenerList.java:155) at org.eclipse.core.commands.common.EventManager.removeListenerObject(EventManager.java:99) at org.eclipse.ui.internal.themes.WorkbenchThemeManager.removePropertyChangeListener(WorkbenchThemeManager.java:218) at org.tigris.subversion.subclipse.ui.preferences.SVNDecoratorPreferencesPage.dispose(SVNDecoratorPreferencesPage.java:478) at org.eclipse.jface.preference.PreferenceNode.disposeResources(PreferenceNode.java:173) at org.eclipse.ui.internal.preferences.WorkbenchPreferenceExtensionNode.disposeResources(WorkbenchPreferenceExtensionNode.java:134) at org.eclipse.jface.preference.PreferenceDialog.close(PreferenceDialog.java:289) at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.close(FilteredPreferenceDialog.java:446) 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:215) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3490) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3104) 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.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3490) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3104) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2264) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2228) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2103) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:457) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:452) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1124)
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
/*******************************************************************************
 * Copyright (c) 2000, 2007 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jface.preference;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.ListenerList;