Community
Participate
Working Groups
I noticed that an exception is thrown at the moment you shut down Eclipse if you have an unfolded processes list in your connection.The same happens for files subsystem. Here is the stack for processes: !ENTRY org.eclipse.rse.ui 4 0 2010-11-08 13:47:52.760 !MESSAGE Error disconnecting for org.eclipse.tm.tcf.rse.Processes !STACK 0 java.lang.IllegalStateException: TCF event dispatcher has shut down at org.eclipse.tm.tcf.EventQueue.invokeLater(EventQueue.java:110) at org.eclipse.tm.tcf.protocol.Protocol.invokeAndWait(Protocol.java:219) at org.eclipse.tm.internal.tcf.rse.TCFConnectorService.isConnected(TCFConnectorService.java:122) at org.eclipse.rse.core.subsystems.SubSystem.isConnected(SubSystem.java:2086) at org.eclipse.rse.core.subsystems.SubSystemConfiguration.disconnectAllSubSystems(SubSystemConfiguration.java:1478) at org.eclipse.rse.ui.RSEUIPlugin.disconnectAll(RSEUIPlugin.java:534) at org.eclipse.rse.ui.RSEUIPlugin.stop(RSEUIPlugin.java:506) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:843) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:836) at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:474) at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:546) at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1098) at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(StartLevelManager.java:593) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:261) at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(StartLevelManager.java:216) at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.suspend(InternalSystemBundle.java:266) at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:685) at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:583) at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:409) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:200) 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:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311) at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Created attachment 194241 [details] Catching the exception in isConnected() Eclipse does not guarantee an order while shutting down the plug-in's/bundles. In this case, the TCF core plug-in wen't down before the RSE UI plug-in. The most obvious patch for this case, to avoid the exception thrown to the users attention, is to catch it in "TCFConnectorService.isConnected()" (see attached patch). The more desirable way would be to have a callback like the "startup" extension point, where plug-in's can register and get called back once the TCF core plug-in is shut down. Or extending the "startup" extension point to serve both start and stop. Probably worth a separate enhancement request.
I have committed the patch. > The more desirable way would be to have a callback like the "startup" extension point, where plug-in's can register and get called back once the TCF core plug-in is shut down. Such callback is already provided by OSGi API (e.g. BundleListener). Implementing another one in TCF would be redundant.
Comment on attachment 194241 [details] Catching the exception in isConnected() Uwe has been a committer since 2011-09-30 , thus marking attached patch as iplog-
https://git.eclipse.org/c/tcf/org.eclipse.tcf.git/commit/?h=1.0&id=a94ee9ff72a58bc5054fb6bf7da874c2f42ca2e2