Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334059 - Tons of errors after plug-in import
Summary: Tons of errors after plug-in import
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 3.7 RC1   Edit
Assignee: Dani Megert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-12 03:31 EST by Dani Megert CLA
Modified: 2011-05-16 13:33 EDT (History)
3 users (show)

See Also:
curtis.windatt.public: review+


Attachments
Test workspace (16.10 MB, image/zip)
2011-01-12 04:12 EST, Dani Megert CLA
no flags Details
Fix (1.23 KB, patch)
2011-05-03 08:40 EDT, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2011-01-12 03:31:39 EST
I20110111-0800.

After importing all required binary plug-ins I had tons of errors after plug-in import. It looks like it failed to update the PDE container correctly regarding the SWT bundles.

The importer used to work pretty well for quite some time up to now. I suspect that this might be caused by recent changes either for bug 332765 or bug 330047.
Comment 1 Dani Megert CLA 2011-01-12 03:37:28 EST
> I suspect
> that this might be caused by recent changes either for bug 332765 or bug
> 330047.
Bug 330047 was in HEAD for some time, so this one is out of the loop.
Comment 2 Dani Megert CLA 2011-01-12 03:41:54 EST
Tried again on a simpler workspace: when drying to re-import I got:

!ENTRY org.eclipse.core.jobs 4 2 2011-01-12 09:40:52.086
!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.getContributionsTimestamp(PDERegistryStrategy.java:300)
	at org.eclipse.core.internal.registry.ExtensionRegistry.<init>(ExtensionRegistry.java:682)
	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-12 03:42:40 EST
Trying a second time (without restart) works without exception.
Comment 4 Dani Megert CLA 2011-01-12 04:12:27 EST
Created attachment 186604 [details]
Test workspace
Comment 5 Dani Megert CLA 2011-01-12 11:00:09 EST
The NPE is probably unrelated since it's there since at least 3.6 (filed bug 334061) and I did not get the NPE in my dev workspace where I first encountered the issue.

Also, I now tried several times in my dev workspace and could not reproduce. It would still be good to review the recent (e.g. since M4) PDE UI code changes.
Comment 6 Curtis Windatt CLA 2011-01-24 17:20:14 EST
(In reply to comment #5)
> The NPE is probably unrelated since it's there since at least 3.6 (filed bug
> 334061) and I did not get the NPE in my dev workspace where I first encountered
> the issue.
> 
> Also, I now tried several times in my dev workspace and could not reproduce. It
> would still be good to review the recent (e.g. since M4) PDE UI code changes.

Import is working fine for me in I20110118-0800

The import operation code hasn't changed since August.  I can't see how Bug 330047 would change anything related to this (same state is created, if the contents of the array differed then the new array list, you would get an NPE).

Can we mark this as WORKSFORME?
Comment 7 Dani Megert CLA 2011-01-25 07:12:40 EST
Couldn't reproduce in recent builds, including I20110124-1800.
Comment 8 Markus Keller CLA 2011-03-15 04:52:39 EDT
I just had this again with I20110308-2000:

Error
Tue Mar 15 09:43:07 CET 2011
An internal error occurred during: "Import Plug-ins and Fragments".

java.lang.NullPointerException
at java.io.File.<init>(File.java:222)
at org.eclipse.pde.internal.core.PDERegistryStrategy.getContributionsTimestamp(PDERegistryStrategy.java:303)
at org.eclipse.core.internal.registry.ExtensionRegistry.<init>(ExtensionRegistry.java:682)
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:709)
at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.importSourceArchives(PluginImportOperation.java:777)
at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.importAsBinary(PluginImportOperation.java:383)
at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.importPlugin(PluginImportOperation.java:345)
at org.eclipse.pde.internal.ui.wizards.imports.PluginImportOperation.runInWorkspace(PluginImportOperation.java:145)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 9 Markus Keller CLA 2011-03-15 05:21:07 EDT
The plug-in where the import crashed was org.eclipse.core.filesystem.linux.x86. A plug-in test was running before, but it had been terminated for a few minutes before I started the import. But it's possible that a Synchronize Workspace operation was still running in the background.
Comment 10 Markus Keller CLA 2011-05-03 06:36:14 EDT
Even if we can't reproduce, it would still be good to at least fix the NPE:
ISharedPluginModel#getInstallLocation() can return null, so callers should protect against this.
Comment 11 Dani Megert CLA 2011-05-03 08:39:49 EDT
Curtis, can you +1 the bug for RC1 and review my patch?
Comment 12 Dani Megert CLA 2011-05-03 08:40:16 EDT
Created attachment 194568 [details]
Fix
Comment 13 Curtis Windatt CLA 2011-05-05 11:58:49 EDT
+1.  Patch applied for RC1.

Thanks for the patch Dani, didn't realize it was so trivial of a fix otherwise I would have looked at it sooner.
Comment 14 Dani Megert CLA 2011-05-05 12:10:13 EDT
(In reply to comment #13)
> +1.  Patch applied for RC1.
> 
> Thanks for the patch Dani, didn't realize it was so trivial of a fix otherwise
> I would have looked at it sooner.

Curtis, you should only REVIEW the patch. The committer who prepared it should commit it then to HEAD. But thanks anyway.
Comment 15 Curtis Windatt CLA 2011-05-05 12:20:28 EDT
(In reply to comment #14)
> Curtis, you should only REVIEW the patch. The committer who prepared it should
> commit it then to HEAD. But thanks anyway.

The style we have followed in PDE is as follows:

1) Set the milestone
2) Attach your patch
3) Use the flags to request a review (or multiple reviews).
4) Check that all reviewers are cc'd so they receive bug updates
5) Comment the bug asking for review
6) Assign the bug to yourself
7) Once all reviews are +1, the final reviewer can commit (commit comment must include bug number for tracking)

In addition for contributed patches:

1) Bug is assigned to the person who commits the code
2) Bug is marked with keyword 'contributed' and iplog updated as necessary.

If you would like this changed, we should discuss on Monday.
Comment 16 Dani Megert CLA 2011-05-05 12:24:38 EDT
(In reply to comment #15)
> (In reply to comment #14)
> > Curtis, you should only REVIEW the patch. The committer who prepared it should
> > commit it then to HEAD. But thanks anyway.
> 
> The style we have followed in PDE is as follows:
> 
> 1) Set the milestone
> 2) Attach your patch
> 3) Use the flags to request a review (or multiple reviews).
> 4) Check that all reviewers are cc'd so they receive bug updates
> 5) Comment the bug asking for review
> 6) Assign the bug to yourself
> 7) Once all reviews are +1, the final reviewer can commit (commit comment must
> include bug number for tracking)
> 
> In addition for contributed patches:
> 
> 1) Bug is assigned to the person who commits the code
> 2) Bug is marked with keyword 'contributed' and iplog updated as necessary.
> 
> If you would like this changed, we should discuss on Monday.

Yes, please. I personally find it somewhat offending if my work gets "stolen" from someone.
Comment 17 Markus Keller CLA 2011-05-16 13:33:37 EDT
This bug could not be reproduced, but I verified that the null check has been released into the build.