Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347668 - [target] NPE in LoadTargetDefinitionJob#handleReload
Summary: [target] NPE in LoadTargetDefinitionJob#handleReload
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.8 M1   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 352804
  Show dependency tree
 
Reported: 2011-05-30 11:38 EDT by Nicolas Bros CLA
Modified: 2011-08-03 09:22 EDT (History)
1 user (show)

See Also:


Attachments
Fix (5.50 KB, patch)
2011-07-21 16:58 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 Nicolas Bros CLA 2011-05-30 11:38:59 EDT
I opened a target platform editor (org.eclipse.pde.internal.ui.editor.targetdefinition.TargetEditor).

I got:
Communication with repository at http://download.eclipse.org/eclipse/updates/3.6/R-3.6-201006080911 failed.
java.net.SocketTimeoutException: Read timed out

And then this NPE from PDE:

java.lang.NullPointerException
at org.eclipse.pde.internal.core.target.provisional.LoadTargetDefinitionJob.handleReload(LoadTargetDefinitionJob.java:375)
at org.eclipse.pde.internal.core.target.provisional.LoadTargetDefinitionJob.loadPlugins(LoadTargetDefinitionJob.java:284)
at org.eclipse.pde.internal.core.target.provisional.LoadTargetDefinitionJob.runInWorkspace(LoadTargetDefinitionJob.java:141)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Eclipse Platform
Version: 3.6.2
Build id: M20110210-1200
Comment 1 Curtis Windatt CLA 2011-05-30 16:56:43 EDT
If there is a problem resolving, the getBundles call could return null.  We should handle this case better.
Comment 2 Curtis Windatt CLA 2011-07-21 16:58:10 EDT
Created attachment 200123 [details]
Fix

There are three methods that the target may return null for if there is a problem resolving.  Since we don't want to interrupt the user with the error dialog, this patch will set the results of the three methods to empty arrays.
Comment 3 Curtis Windatt CLA 2011-07-21 17:00:14 EDT
Fixed in HEAD.  See bug 352804 for backport to 3.7.1.
Comment 4 Ankur Sharma CLA 2011-08-03 09:22:12 EDT
Steps to repro not known.
Verifiying by checking the build has the new code in I20110802-2000