| Summary: | Add src workspace to a target workspace fails | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Ian Bull <irbull> | ||||||
| Component: | UI | Assignee: | Curtis Windatt <curtis.windatt.public> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | caniszczyk, curtis.windatt.public | ||||||
| Version: | 3.4 | ||||||||
| Target Milestone: | 3.4 M7 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Ian Bull
I can get the NPE by adding breakpoints so that there is a target platform reset job still running when a new reset is started. In your case the classpath computer must have been doing work when you reset. If we synchronize the call to reset, we avoid the NPE, but we will lock the main thread until the previous reset job (or whatever caused a javadoc lookup) completes. Note, the manager gets two separate calls to reset, one from the preference page when we hit ok (main thread) and one from the reset job (worker thread). Ian, to get your weaved plugins back (the ones from your host workspace), try turning on the check box for "Build target platform based on the target's installed plugins" and then hit the reset button. (In reply to comment #2) > Ian, to get your weaved plugins back (the ones from your host workspace), try > turning on the check box for "Build target platform based on the target's > installed plugins" and then hit the reset button. > Cool, that works. Also, after restarting my run-time workbench, I was able to add my src workspace without getting the NPE. I guess it was just a bad timing issue that ended up putting me in a bad state. Good catch Curtis. Created attachment 97623 [details]
Fix for race condition
While it should be decently difficult to reproduce the NPE under normal circumstance, it is not hard to fix. This patch fixes the race condition by making the reset method synchronized. To avoid locking the UI while waiting for a lock, the javadoc location reset call made when pressing ok on the preference page is called from a system job.
Chris, I don't know if this is something we want to fit in for 3.4, it's a small change, but it isn't likely to be encountered by many users either. nice catch. I have hit this before. Created attachment 97703 [details]
mylyn/context/zip
> 20080425
done. Thanks!
*** Bug 223141 has been marked as a duplicate of this bug. *** |