Community
Participate
Working Groups
Install Eclipse 3.0 GA with CDT 2.0 GA on Linux and launch eclipse. Create a Java project and a C++ Project with a couple of classes. Exit Eclipse Actual: an error is thrown by CDT. The error is: !SESSION Jul 14, 2004 13:14:10.562 --------------------------------------------- eclipse.buildId=I200406192000 java.fullversion=J2RE 1.4.2 IBM J9 build 20040610 (JIT enabled) BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US !ENTRY org.eclipse.ui.intro 4 0 Jul 14, 2004 13:14:10.562 !MESSAGE Error generating HTML !ENTRY org.eclipse.osgi Jul 14, 2004 13:18:46.539 !MESSAGE Error while stopping "org.eclipse.cdt.debug.ui_2.0.0". !STACK 0 org.osgi.framework.BundleException: Exception in org.eclipse.cdt.debug.ui.CDebugUIPlugin.stop() of bundle org.eclipse.cdt.debug.ui. at java.lang.Throwable.<init>(Throwable.java) at org.osgi.framework.BundleException.<init>(BundleException.java:59) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop (BundleContextImpl.java:1010) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker (BundleHost.java:502) at org.eclipse.osgi.framework.internal.core.AbstractBundle.stop (AbstractBundle.java:437) at org.eclipse.core.runtime.adaptor.BundleStopper.basicStopBundles (BundleStopper.java:75) at org.eclipse.core.runtime.adaptor.BundleStopper.stopBundles (BundleStopper.java:62) at org.eclipse.core.runtime.adaptor.EclipseAdaptor.frameworkStopping (EclipseAdaptor.java:551) at org.eclipse.osgi.framework.internal.core.Framework.shutdown (Framework.java:457) at org.eclipse.osgi.framework.internal.core.SystemBundle$1.run (SystemBundle.java:182) at java.lang.Thread.run(Thread.java:806) Caused by: org.eclipse.swt.SWTException: Device is disposed at java.lang.Throwable.<init>(Throwable.java) at org.eclipse.swt.SWTException.<init>(SWTException.java:81) at org.eclipse.swt.SWT.error(SWT.java:2691) at org.eclipse.swt.SWT.error(SWT.java:2616) at org.eclipse.swt.SWT.error(SWT.java:2587) at org.eclipse.swt.widgets.Display.error(Display.java:736) at org.eclipse.swt.widgets.Display.asyncExec(Display.java:525) at org.eclipse.cdt.debug.ui.CDebugUIPlugin.listenSelection (CDebugUIPlugin.java:345) at org.eclipse.cdt.debug.ui.CDebugUIPlugin.stop(CDebugUIPlugin.java:325) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run (BundleContextImpl.java:994) at java.security.AccessController.doPrivileged (AccessController.java:189) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop (BundleContextImpl.java:990) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker (BundleHost.java:502) at org.eclipse.osgi.framework.internal.core.AbstractBundle.stop (AbstractBundle.java:437) at org.eclipse.core.runtime.adaptor.BundleStopper.basicStopBundles (BundleStopper.java:75) at org.eclipse.core.runtime.adaptor.BundleStopper.stopBundles (BundleStopper.java:62) at org.eclipse.core.runtime.adaptor.EclipseAdaptor.frameworkStopping (EclipseAdaptor.java:551) at org.eclipse.osgi.framework.internal.core.Framework.shutdown (Framework.java:457) at org.eclipse.osgi.framework.internal.core.SystemBundle$1.run (SystemBundle.java:182) at java.lang.Thread.run(Thread.java:806) Root exception: org.eclipse.swt.SWTException: Device is disposed at java.lang.Throwable.<init>(Throwable.java) at org.eclipse.swt.SWTException.<init>(SWTException.java:81) at org.eclipse.swt.SWT.error(SWT.java:2691) at org.eclipse.swt.SWT.error(SWT.java:2616) at org.eclipse.swt.SWT.error(SWT.java:2587) at org.eclipse.swt.widgets.Display.error(Display.java:736) at org.eclipse.swt.widgets.Display.asyncExec(Display.java:525) at org.eclipse.cdt.debug.ui.CDebugUIPlugin.listenSelection (CDebugUIPlugin.java:345) at org.eclipse.cdt.debug.ui.CDebugUIPlugin.stop(CDebugUIPlugin.java:325) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run (BundleContextImpl.java:994) at java.security.AccessController.doPrivileged (AccessController.java:189) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop (BundleContextImpl.java:990) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker (BundleHost.java:502) at org.eclipse.osgi.framework.internal.core.AbstractBundle.stop (AbstractBundle.java:437) at org.eclipse.core.runtime.adaptor.BundleStopper.basicStopBundles (BundleStopper.java:75) at org.eclipse.core.runtime.adaptor.BundleStopper.stopBundles (BundleStopper.java:62) at org.eclipse.core.runtime.adaptor.EclipseAdaptor.frameworkStopping (EclipseAdaptor.java:551) at org.eclipse.osgi.framework.internal.core.Framework.shutdown (Framework.java:457) at org.eclipse.osgi.framework.internal.core.SystemBundle$1.run (SystemBundle.java:182) at java.lang.Thread.run(Thread.java:806) !ENTRY org.eclipse.osgi Jul 14, 2004 13:18:46.919 !MESSAGE The class "com.ibm.wtp.common.ui.UITesterImpl" cannot be loaded because the system is shutting down and the plug-in "com.ibm.wtp.common.ui" has already been stopped. !STACK 0 java.lang.ClassNotFoundException: The class "com.ibm.wtp.common.ui.UITesterImpl" cannot be loaded because the system is shutting down and the plug-in "com.ibm.wtp.common.ui" has already been stopped. at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java) at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java) at org.eclipse.core.runtime.adaptor.EclipseClassLoader.shouldActivateFor (EclipseClassLoader.java) at org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLocalClass (EclipseClassLoader.java) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass (BundleLoader.java) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass (BundleLoader.java) at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass (AbstractClassLoader.java) at java.lang.ClassLoader.loadClass(ClassLoader.java) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass (BundleLoader.java) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass (BundleHost.java) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass (AbstractBundle.java) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtensio n(ConfigurationElement.java:131) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtensio n(ConfigurationElement.java:124) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtensio n(ConfigurationElement.java) at com.ibm.wtp.common.UIContextDetermination$UITesterRegistryReader.readElement (UIContextDetermination.java:153) at com.ibm.wtp.common.RegistryReader.internalReadElement (RegistryReader.java:61) at com.ibm.wtp.common.RegistryReader.readRegistry (RegistryReader.java:99) at com.ibm.wtp.common.UIContextDetermination.getCurrentContext (UIContextDetermination.java:69) at com.ibm.etools.validate.internal.EventManager.isHeadless (EventManager.java:431) at com.ibm.etools.validate.internal.EventManager.shutdown (EventManager.java:323) at com.ibm.etools.validate.plugin.ValidationPlugin.shutdown (ValidationPlugin.java:136) at org.eclipse.core.internal.compatibility.PluginActivator.stop (PluginActivator.java:74) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run (BundleContextImpl.java:994) at java.security.AccessController.doPrivileged (AccessController.java:189) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop (BundleContextImpl.java:990) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker (BundleHost.java:502) at org.eclipse.osgi.framework.internal.core.AbstractBundle.stop (AbstractBundle.java) at org.eclipse.core.runtime.adaptor.BundleStopper.basicStopBundles (BundleStopper.java:75) at org.eclipse.core.runtime.adaptor.BundleStopper.stopBundles (BundleStopper.java:62) at org.eclipse.core.runtime.adaptor.EclipseAdaptor.frameworkStopping (EclipseAdaptor.java:551) at org.eclipse.osgi.framework.internal.core.Framework.shutdown (Framework.java:457) at org.eclipse.osgi.framework.internal.core.SystemBundle$1.run (SystemBundle.java:182) at java.lang.Thread.run(Thread.java:806) !ENTRY org.eclipse.core.runtime 4 1 Jul 14, 2004 13:18:46.989 !MESSAGE Plug-in com.ibm.wtp.common.ui was unable to load class com.ibm.wtp.common.ui.UITesterImpl. !STACK 0 java.lang.ClassNotFoundException: com.ibm.wtp.common.ui.UITesterImpl at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java) at java.lang.ClassNotFoundException.<init>(ClassNotFoundException.java) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass (BundleLoader.java) at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass (AbstractClassLoader.java) at java.lang.ClassLoader.loadClass(ClassLoader.java) at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass (BundleLoader.java) at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass (BundleHost.java) at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass (AbstractBundle.java) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtensio n(ConfigurationElement.java:131) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtensio n(ConfigurationElement.java:124) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtensio n(ConfigurationElement.java) at com.ibm.wtp.common.UIContextDetermination$UITesterRegistryReader.readElement (UIContextDetermination.java:153) at com.ibm.wtp.common.RegistryReader.internalReadElement (RegistryReader.java:61) at com.ibm.wtp.common.RegistryReader.readRegistry (RegistryReader.java:99) at com.ibm.wtp.common.UIContextDetermination.getCurrentContext (UIContextDetermination.java:69) at com.ibm.etools.validate.internal.EventManager.isHeadless (EventManager.java:431) at com.ibm.etools.validate.internal.EventManager.shutdown (EventManager.java:323) at com.ibm.etools.validate.plugin.ValidationPlugin.shutdown (ValidationPlugin.java:136) at org.eclipse.core.internal.compatibility.PluginActivator.stop (PluginActivator.java:74) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run (BundleContextImpl.java:994) at java.security.AccessController.doPrivileged (AccessController.java:189) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop (BundleContextImpl.java:990) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker (BundleHost.java:502) at org.eclipse.osgi.framework.internal.core.AbstractBundle.stop (AbstractBundle.java) at org.eclipse.core.runtime.adaptor.BundleStopper.basicStopBundles (BundleStopper.java:75) at org.eclipse.core.runtime.adaptor.BundleStopper.stopBundles (BundleStopper.java:62) at org.eclipse.core.runtime.adaptor.EclipseAdaptor.frameworkStopping (EclipseAdaptor.java:551) at org.eclipse.osgi.framework.internal.core.Framework.shutdown (Framework.java:457) at org.eclipse.osgi.framework.internal.core.SystemBundle$1.run (SystemBundle.java:182) at java.lang.Thread.run(Thread.java:806)
public void stop( BundleContext context ) throws Exception { <snip> listenSelection( false, this ); <snip> } is the problem. The asynExec call can throw an SWT exception if the dispaly has been disposed. Since that exception is not caught, the osgi bundle manager is logging the error in the log and proceeding. The error is bothering the testers, so the call should be wrapped in a try-catch block so the shutdown can proceed cleanly. Rather than me posting a patch, could you just do this for us Mikhail? If not, let me know and I'll create a patch for 2.0.1 and head. Thanks.
Sorry, I just wanted to point out that it is important for us that this get fixed in 2.0.1 for product purposes, so if you can't get to it, please let me know and I'll create a patch for you.
Created attachment 13890 [details] Exception patch
Sean, this problem is a result of the temporary fix for bug 68915. I believe that Alain is working on it and I hope we are not going to release 2.0.1 without fixing it, but who knows... Anyway, I'll aply the changes you are suggesting to the both branches.
Applied to the HEAD and 2.0.1 branches. Please, verify.