eclipse-platform / eclipse.platform

https://eclipse.dev/eclipse/
Eclipse Public License 2.0
73 stars 105 forks source link

Invalid registry object on workbench shutdown #1561

Open Holzmacher opened 1 week ago

Holzmacher commented 1 week ago

I use eclipse rcp 4.33 (https://download.eclipse.org/eclipse/updates/4.33/). When i close the program i get the following error:

org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry object at org.eclipse.core.internal.registry.RegistryObjectManager.basicGetObject(RegistryObjectManager.java:293) at org.eclipse.core.internal.registry.RegistryObjectManager.getObject(RegistryObjectManager.java:283) at org.eclipse.core.internal.registry.ConfigurationElementHandle.getConfigurationElement(ConfigurationElementHandle.java:29) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:65) at org.eclipse.ui.internal.commands.CommandStateProxy.loadState(CommandStateProxy.java:177) at org.eclipse.ui.internal.commands.CommandStateProxy.loadState(CommandStateProxy.java:161) at org.eclipse.ui.internal.commands.CommandStateProxy.shouldPersist(CommandStateProxy.java:255) at org.eclipse.ui.internal.commands.CommandService.dispose(CommandService.java:142) at org.eclipse.ui.internal.services.ServiceLocator$3.run(ServiceLocator.java:180) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47) at org.eclipse.ui.internal.services.ServiceLocator.disposeServices(ServiceLocator.java:177) at org.eclipse.ui.internal.services.ServiceLocator.dispose(ServiceLocator.java:150) at org.eclipse.ui.internal.Workbench.shutdown(Workbench.java:3040) at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:1141) at org.eclipse.ui.internal.Workbench.lambda$4(Workbench.java:1414) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.internal.Workbench.close(Workbench.java:1414) at org.eclipse.ui.internal.Workbench.close(Workbench.java:1385) at org.eclipse.ui.internal.WorkbenchWindow.busyClose(WorkbenchWindow.java:1720) at org.eclipse.ui.internal.WorkbenchWindow.lambda$5(WorkbenchWindow.java:1747) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)

It looks like the error doesn't apear with all Eclipse RCP. But I haven't figured out why this happens in my application yet.

For me it seems there is something wrong with the order of dispose of shutdown. Maybe the registry object is disposed too fast.

jukzi commented 1 week ago

could you please contribute a fix?