Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334061 - NPE when importing binary plug-ins
Summary: NPE when importing binary plug-ins
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-12 04:18 EST by Dani Megert CLA
Modified: 2011-03-01 04:39 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2011-01-12 04:18:21 EST
Latest I-build but also 3.6.

1. extract workspace from attachment 186604 [details]
2. start with I20110111-0800 (3.6 has the same error)
3. File > Import...
4. select 'Plug-ins and Fragments'
5. click 'Next'
6. select radio 'Select from all plug-ins and fragments found at the...'
7. click 'Next'
8. click 'Existing Unshared'
9. click 'Finish'
10.click 'OK' on the dialog
==> error dialog reporting NPE
11.click 'OK' on the error dialog
==> workspace has tons of errors
Comment 1 Curtis Windatt CLA 2011-01-24 17:46:11 EST
To reproduce you need to be importing the plug-ins with source (not binary).  The PDERegistry should have a null check as it is possible for a plug-in model to have a null install location (the javadoc even states this).

Dani, since you marked this as critical, do you feel it needs to be addressed for M5?
Comment 2 Dani Megert CLA 2011-01-25 03:09:01 EST
(In reply to comment #1)
> To reproduce you need to be importing the plug-ins with source (not binary). 
That's not what I see. Please try again with the given steps from comment 0. I just verified them again using I20110124-1800 and the log below clearly indicates a binary import:

>org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.importAsBinar
>y(PluginImportOperation.java:380)


!ENTRY org.eclipse.core.jobs 4 2 2011-01-25 09:06:29.788
!MESSAGE An internal error occurred during: "Import Plug-ins and Fragments".
!STACK 0
java.lang.NullPointerException
	at java.io.File.<init>(File.java:222)
	at org.eclipse.pde.internal.core.PDERegistryStrategy.getFile(PDERegistryStrategy.java:244)
	at org.eclipse.pde.internal.core.PDERegistryStrategy.addBundle(PDERegistryStrategy.java:189)
	at org.eclipse.pde.internal.core.PDERegistryStrategy.addBundles(PDERegistryStrategy.java:179)
	at org.eclipse.pde.internal.core.PDERegistryStrategy.processBundles(PDERegistryStrategy.java:174)
	at org.eclipse.pde.internal.core.PDERegistryStrategy.onStart(PDERegistryStrategy.java:154)
	at org.eclipse.core.internal.registry.ExtensionRegistry.<init>(ExtensionRegistry.java:725)
	at org.eclipse.core.runtime.RegistryFactory.createRegistry(RegistryFactory.java:58)
	at org.eclipse.pde.internal.core.PDEExtensionRegistry.createRegistry(PDEExtensionRegistry.java:85)
	at org.eclipse.pde.internal.core.PDEExtensionRegistry.getRegistry(PDEExtensionRegistry.java:77)
	at org.eclipse.pde.internal.core.PDEExtensionRegistry.getExtensionPoint(PDEExtensionRegistry.java:134)
	at org.eclipse.pde.internal.core.PDEExtensionRegistry.findExtensions(PDEExtensionRegistry.java:205)
	at org.eclipse.pde.internal.core.SourceLocationManager.processExtensions(SourceLocationManager.java:342)
	at org.eclipse.pde.internal.core.SourceLocationManager.getExtensionLocations(SourceLocationManager.java:192)
	at org.eclipse.pde.internal.core.SourceLocationManager.searchExtensionLocations(SourceLocationManager.java:273)
	at org.eclipse.pde.internal.core.SourceLocationManager.findSourcePath(SourceLocationManager.java:60)
	at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.getSourceManager(PluginImportOperation.java:706)
	at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.importSourceArchives(PluginImportOperation.java:774)
	at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.importAsBinary(PluginImportOperation.java:380)
	at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.importPlugin(PluginImportOperation.java:342)
	at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.runInWorkspace(PluginImportOperation.java:147)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 3 Dani Megert CLA 2011-01-25 03:10:00 EST
> Dani, since you marked this as critical, do you feel it needs to be addressed
> for M5?
Nope, it's there since 3.6 and we shouldn't touch the importer so close before a milestone.
Comment 4 Curtis Windatt CLA 2011-02-28 13:12:18 EST
Added a null check.  Fixed in HEAD.
Comment 5 Dani Megert CLA 2011-03-01 04:39:05 EST
(In reply to comment #4)
> Added a null check.  Fixed in HEAD.
Verified in N20110228-2000.