Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345007 - NPE browsing external plugin on search path
Summary: NPE browsing external plugin on search path
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 3.7 RC1   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-06 14:21 EDT by John Arthorne CLA
Modified: 2011-05-16 17:31 EDT (History)
2 users (show)

See Also:
ankur_sharma: review+


Attachments
Fix (3.50 KB, patch)
2011-05-06 15:11 EDT, Curtis Windatt CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2011-05-06 14:21:22 EDT
Build:

- Running the SDK, added all plug-ins to the search path
- Opened a class in an external plugin (Help from org.eclipse.help.base) in my case

-> Error occurred:

Caused by: java.lang.NullPointerException
	at org.eclipse.pde.internal.runtime.registry.model.ServiceRegistration.getUsingBundles(ServiceRegistration.java:76)
	at org.eclipse.pde.internal.runtime.registry.RegistryBrowserModelChangeListener.getTopLevelElement(RegistryBrowserModelChangeListener.java:63)
	at org.eclipse.pde.internal.runtime.registry.RegistryBrowserModelChangeListener.refreshTopLevelElements(RegistryBrowserModelChangeListener.java:99)
	at org.eclipse.pde.internal.runtime.registry.RegistryBrowserModelChangeListener.update(RegistryBrowserModelChangeListener.java:129)
	at org.eclipse.pde.internal.runtime.registry.RegistryBrowserModelChangeListener$1.run(RegistryBrowserModelChangeListener.java:26)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
Comment 1 John Arthorne CLA 2011-05-06 14:21:38 EDT
eclipse.buildId=I20110428-0200
java.version=1.6.0_22
Comment 2 John Arthorne CLA 2011-05-06 14:25:22 EDT
I kept getting this exception every couple of seconds until eventually I restarted to get rid of it.
Comment 3 Curtis Windatt CLA 2011-05-06 15:11:58 EDT
Created attachment 194975 [details]
Fix
Comment 4 Curtis Windatt CLA 2011-05-06 15:13:57 EDT
Anytime we access the registry model there is the possibility of it being null.  We check for null in most cases, but I found two cases where we do not (one of which is the one John is encountering).  I also commented the variable to remind future developers to check for it.

Ankur, please review for RC1.
Comment 5 Ankur Sharma CLA 2011-05-08 02:13:01 EDT
Applied to HEAD
Comment 6 Curtis Windatt CLA 2011-05-16 17:31:08 EDT
Verified the code change is in I20110514-0800