Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 276804 - [DynamicGUI] InvalidRegistryObjectException applying changes
Summary: [DynamicGUI] InvalidRegistryObjectException applying changes
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 278187 (view as bug list)
Depends on: 277136 277480
Blocks:
  Show dependency tree
 
Reported: 2009-05-18 21:54 EDT by Pascal Rapicault CLA
Modified: 2021-10-24 15:09 EDT (History)
9 users (show)

See Also:


Attachments
Log after installing EMF++ into Eclipse SDK (99.28 KB, text/plain)
2009-05-19 16:04 EDT, Oleg Besedin CLA
no flags Details
Sample update site (7.23 KB, application/x-zip-compressed)
2009-05-21 11:26 EDT, Oleg Besedin CLA
no flags Details
Full console log with OSGi and registry events (262.38 KB, text/plain)
2009-05-21 11:32 EDT, Oleg Besedin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2009-05-18 21:54:00 EDT
RC1
- Install eclemma 1.2.2 (or similar) from http://update.eclemma.org
- Apply changes, everything is fine
- Check for updates and install eclemma 1.4.1, apply changes, you get the following exception:

org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry object
at org.eclipse.core.internal.registry.TemporaryObjectManager.getObject(TemporaryObjectManager.java:98)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getConfigurationElement(ConfigurationElementHandle.java:26)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.getContributor(ConfigurationElementHandle.java:126)
at org.eclipse.ui.internal.PluginAction.isOkToCreateDelegate(PluginAction.java:194)
at org.eclipse.ui.internal.WWinPluginAction.isOkToCreateDelegate(WWinPluginAction.java:220)
at org.eclipse.ui.internal.PluginAction.selectionChanged(PluginAction.java:274)
at org.eclipse.ui.internal.PluginAction.selectionChanged(PluginAction.java:299)
at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156)
at org.eclipse.ui.internal.AbstractSelectionService.setActivePart(AbstractSelectionService.java:282)
at org.eclipse.ui.internal.WWinPartService.updateActivePart(WWinPartService.java:132)
at org.eclipse.ui.internal.WWinPartService.access$0(WWinPartService.java:122)
at org.eclipse.ui.internal.WWinPartService$WWinListener.partDeactivated(WWinPartService.java:50)
at org.eclipse.ui.internal.PartListenerList2$4.run(PartListenerList2.java:115)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:55)
at org.eclipse.ui.internal.PartListenerList2.firePartDeactivated(PartListenerList2.java:113)
at org.eclipse.ui.internal.PartService.firePartDeactivated(PartService.java:242)
at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:300)
at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:57)
at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:136)
at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3531)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:614)
at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1092)
at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1069)
at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3816)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3813)
at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3789)
at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager$7.widgetSelected(WorkbenchStatusDialogManager.java:1507)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3539)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1246)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1269)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1254)
at org.eclipse.swt.widgets.Link.textView_clickOnLink_atIndex(Link.java:116)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4835)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:201)
at org.eclipse.swt.widgets.Widget.mouseDown(Widget.java:916)
at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2157)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4637)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:201)
at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:1742)
at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:1814)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4697)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4269)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4336)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:101)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3093)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:585)
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)
Comment 1 Boris Bokowski CLA 2009-05-19 13:50:45 EDT
Adding Oleg since this is registry-related.
Comment 2 Paul Webster CLA 2009-05-19 14:24:34 EDT
I can sometimes see this applying the Releng tools on I20090518-2000 from http://download.eclipse.org/eclipse/updates/3.5-I-builds, and definitely if you download and apply EMF SDK (which shouldn't replace any core plugins, it should be all *add ons*)

PW
Comment 3 Oleg Besedin CLA 2009-05-19 16:04:01 EDT
Created attachment 136377 [details]
Log after installing EMF++ into Eclipse SDK

Hmm I've got about 20 exceptions in the log after installing EMF + EMF Compare SDK + EMF Model Query SDK into the Eclipse SDK. (Using I20090518-2000.)

The first exception was "java.net.SocketTimeoutException: Read timed out" which might explain some of the rest (and the fact that Update dialog lost all text labels for about half the install) but still...
Comment 4 Oleg Besedin CLA 2009-05-20 10:31:04 EDT
For the Working Sets exceptions I opened bug 277136. 
Comment 5 Oleg Besedin CLA 2009-05-20 16:00:09 EDT
On attempts to reproduce this so far:

I can reproduce registry exceptions installing a simple sample plugin with P2. However, using OSGi console to manually refresh / install / uninstall the same plugin produces no regstry exceptions (but has exceptions as in the bug 272685).

Comment 6 Oleg Besedin CLA 2009-05-21 10:59:26 EDT
Getting closer to the core of the problem: at the end of "Apply" processing P2 restarts bunch of interestig bundles. Here is the console log:

Trying to suspend bundle org.eclipse.sdk_3.5.0.v200905182000 [146]
->stopped org.eclipse.sdk_3.5.0.v200905182000 [146]
Trying to suspend bundle org.eclipse.pde.ua.ui_1.0.0.v20090511 [139]
->stopped org.eclipse.pde.ua.ui_1.0.0.v20090511 [139]

... -> dozen more bundles are stopped presumably to be be restarted later (org.eclipse.pde.*, UA, help, Jetty, etc.)

This is for installing a feature with a single bundle that simply adds a few menu entries.

====

To see this output create ".options" file in your Eclipse directory with:

org.eclipse.osgi/debug=true
org.eclipse.equinox.registry/debug/events=true

and run from the command line "eclipsec.exe -debug > out.txt".
Comment 7 Oleg Besedin CLA 2009-05-21 11:26:11 EDT
Created attachment 136662 [details]
Sample update site

This is the update site I used: one bundle mostly made from example templates that adds a menu, a toolbar, and a working set, exported with PDE.
Comment 8 Oleg Besedin CLA 2009-05-21 11:32:23 EDT
Created attachment 136664 [details]
Full console log with OSGi and registry events
Comment 9 Susan McCourt CLA 2009-05-21 11:48:26 EDT
Simon/Pascal - have we somehow broken the ability to apply the configuration even for a simple install?
Comment 10 Thomas Watson CLA 2009-05-21 11:54:16 EDT
(In reply to comment #9)
> Simon/Pascal - have we somehow broken the ability to apply the configuration
> even for a simple install?
> 

I'm going to look at this and will report back.
Comment 11 Oleg Besedin CLA 2009-05-21 12:09:06 EDT
Same problem on I20090520-2000. 

If other people can duplicate this problem, it means that functionality behind "Apply changes" doesn't work for the vast majority of cases. 

Comment 12 Thomas Watson CLA 2009-05-21 12:42:23 EDT
(In reply to comment #11)
> Same problem on I20090520-2000. 
> 
> If other people can duplicate this problem, it means that functionality behind
> "Apply changes" doesn't work for the vast majority of cases. 
> 

I reproduced on MacOSX on the I20090520-2000 build also.  The first time I tried this I did not see the exception.  Here is what I did:

1) Bring up Eclipse for the first time, closed welcome, exit to get cache saved
2) Add test update site and disable all other sites
3) Install test feature and hit apply now button.
4) Everything looked fine and I did not see any exceptions

Second attempt I started with a fresh install again and did the following:
1) Bring up Eclipse for the first time, closed welcome, and did NOT exit.
2) Add test update site and did NOT disable any other sites (Galileo etc.).
3) Installed test feature and hit apply now button.

I'm not sure if the Galileo site caused p2 to add other bundles that caused additional churn.  But that is my theory.  Now off to debug (but after I get something to eat).
Comment 13 Thomas Watson CLA 2009-05-21 14:25:35 EDT
As Oleg observed in bug 276133 comment 22.  The fact that the galileo site is enabled causes the following bundles to be installed:

slf4j.api
slf4j.jcl
org.mortbay.management

I am told this is because the Galileo site has some old IUs for jetty that still have the encoding issue.

This causes issues because of the solution we have in simpleconfigurator for bug 176872.  In bug 176872 we needed to force bundles with optional dependencies to be re-resolved if a provider became available to resolve the optional dependencies.  Here both org.mortbay.jetty.util_6.1.15.v200905182336 [186] and org.mortbay.jetty.server_6.1.15.v200905151201 contain optional dependencies on things available in org.mortbay.management.  This causes these two bundles to be pulled into the refresh operation.

This causes a hole chain of bundles to be refresh which transitively depend on the jetty bundles.
Comment 14 Oleg Besedin CLA 2009-05-21 15:06:55 EDT
(In reply to comment #13)
> The fact that the galileo site is enabled causes the following bundles
> to be installed:
> slf4j.api
> slf4j.jcl
> org.mortbay.management
...
> This causes a hole chain of bundles to be refresh which transitively
> depend on the jetty bundles.

Yes, I can duplicate this. With default update sites disabled there are no extension registry removal events, and, hence, no "invalid registry object" exceptions.
Comment 15 Oleg Besedin CLA 2009-05-22 11:09:09 EDT
I can reproduce both Working Set exceptions and isOkToCreateDelegate exceptions by simply refreshing bundles. 

I added steps to reproduce Working Set exception in the bug 277136 comment 2 and opened bug 277480 for the isOkToCreateDelegate exceptions.
Comment 16 Oleg Besedin CLA 2009-05-25 14:14:31 EDT
As for the 3.5 end-user impact, the cause of the extra bundle updates should be fixed in Galileo RC2 (Swordfish is updating the dependency to align with the platform). If that goes as planned we'll see "Apply" button behavior going to what is was in 3.4. (However, we won't be able to verify this until Eclipse SDK's RC4.)
Comment 17 Boris Bokowski CLA 2009-05-28 15:14:54 EDT
*** Bug 278187 has been marked as a duplicate of this bug. ***
Comment 18 Eclipse Webmaster CLA 2019-09-06 16:14:09 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 19 Eclipse Genie CLA 2021-10-24 15:09:30 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.