| Summary: | NPE at org.eclipse.pde.internal.core.target.provisional.LoadTargetDefinitionJob.handleReload(LoadTargetDefinitionJob.java:370) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Philippe Coucaud <phil_fj12> | ||||||
| Component: | UI | Assignee: | PDE-UI-Inbox <pde-ui-inbox> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | curtis.windatt.public, darin.eclipse, deboer, makandre | ||||||
| Version: | 3.6 | Flags: | darin.eclipse:
review+
|
||||||
| Target Milestone: | 3.6.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Philippe Coucaud
I ran into this exact NPE, but not from going through the UI. We have some code that kicks off 2 of these jobs, and even though the javadoc says starting the second job will cancel the previous one, if the 2 jobs are started fairly close together it seems they'll trip over each other causing this NPE. Investigate for 3.6.1 There are a couple things we can do to improve this: 1) Always use the load job to cancel other load jobs. I see that TargetRepositorySearchHandler doesn't do this correctly. We also do it in AbstractTargetTest, but that isn't as much of an issue. 2) Respect cancellation. If one job is started to resolve the target and a second job is started, we request that the first job gets cancelled. However, we don't check for cancellation in the load target job after the resolve has started. We assume it completed successfully. In fact we should probably check that the resolution was successful and throw the core exception from the status if not. Created attachment 176189 [details]
3.6.1 Patch
I have put in the fix to HEAD. I also updated TargetRepositorySearchHandler and AbstractTargetTest, but those changes don't need to be backported.
Created attachment 176194 [details]
Additional 3.6.1 Patch
This patch ignores errors during the resolution. At one point we threw an exception to tell the user that their target had a problem, but it was eventually decided that it was better not to interupt the user.
Fixed in 3.6.1. Darin, please review. Verified. *** Bug 316210 has been marked as a duplicate of this bug. *** |