Bug 473929 - NPE in RegistryListener.bundleChanged(PluginRegistry.java:191)
Summary: NPE in RegistryListener.bundleChanged(PluginRegistry.java:191)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.8.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.6 M2   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-30 09:16 EDT by Andrey Loskutov CLA
Modified: 2015-08-10 04:04 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2015-07-30 09:16:30 EDT
We observe the error below in our automated tests on Eclipse 3.8.2. The stack is still valid for Eclipse 4.5, there were no changes in that area.

The problem is that code in PluginRegistry synchronizes in multiple places on the "descriptors" field which can be set to null. This is known anti-pattern and should be fixed.

Stack:
java.lang.NullPointerException
	at org.eclipse.core.internal.plugins.PluginRegistry$RegistryListener.bundleChanged(PluginRegistry.java:191)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

Patch follows.
Comment 1 Eclipse Genie CLA 2015-07-30 09:19:10 EDT
New Gerrit change created: https://git.eclipse.org/r/52858
Comment 3 Dani Megert CLA 2015-08-10 03:59:17 EDT
(In reply to Eclipse Genie from comment #2)
> Gerrit change https://git.eclipse.org/r/52858 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.runtime.git/commit/?id=513f1277bc46baf9407b99b22febef4e5e049e9d
> 

Thanks Andrey.
Comment 4 Lars Vogel CLA 2015-08-10 04:04:03 EDT
FYI - If we are lucky, we can will be able to delete org.eclipse.core.runtime.compatibility in this milestone, which should also remove this fix and the error caused by this plug-in