Community
Participate
Working Groups
I do not have steps to reproduce, it is a single Eclipse installation that on every restart fails to restore the editor that was active before shutdown. In this specific case, the problem is reproducible with these steps: - open Java editor A - open Java editor B - Java editor B is active - restart - Java editor B is broken with Invalid registry object - switch to editor A - Java editor A is OK All other editors but the last one are completely functional. eclipse.buildId=4.10.0.I20181010-1800 java.version=1.8.0_181 java.vendor=Oracle Corporation BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US Framework arguments: -product org.eclipse.epp.package.committers.product Command-line arguments: -data file://eclipse-workspace/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.committers.product org.eclipse.ui Error Wed Nov 07 14:39:09 EET 2018 Unable to initialize part org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry object at org.eclipse.core.internal.registry.RegistryObjectManager.basicGetObject(RegistryObjectManager.java:277) at org.eclipse.core.internal.registry.RegistryObjectManager.getObject(RegistryObjectManager.java:267) at org.eclipse.core.internal.registry.ConfigurationElementHandle.getConfigurationElement(ConfigurationElementHandle.java:29) at org.eclipse.core.internal.registry.ConfigurationElementHandle.getChildren(ConfigurationElementHandle.java:53) at org.eclipse.core.internal.adapter.AdapterFactoryProxy.getAdapterNames(AdapterFactoryProxy.java:97) at org.eclipse.core.internal.runtime.AdapterManager.addFactoriesFor(AdapterManager.java:109) at org.eclipse.core.internal.runtime.AdapterManager.getFactories(AdapterManager.java:212) at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:295) at org.eclipse.core.runtime.PlatformObject.getAdapter(PlatformObject.java:71) at org.eclipse.ui.part.FileEditorInput.getAdapter(FileEditorInput.java:242) The cause of this is bug 540888 - PlatformObject's getAdapter(Class<T>) leaks InvalidRegistryObjectException, which is an PlatformObject's implementation detail that client should not care about. FileEditorInput's getAdapter(Class<T>) shold catch InvalidRegistryObjectException and return null instead.
New Gerrit change created: https://git.eclipse.org/r/133453
(In reply to Mykola Nikishov from comment #0) > The cause of this is bug 540888 - PlatformObject's getAdapter(Class<T>) leaks > InvalidRegistryObjectException, which is an PlatformObject's > implementation detail that client should not care about. Exact, and therefore no client has to deal with that exception in PlatformObject.getAdapter() code. I would argue that this is the super class responsibility to catch and log the broken registry state, and return null instead. > FileEditorInput's getAdapter(Class<T>) shold catch > InvalidRegistryObjectException and return null instead. No, see above.