| Summary: | bundle data discarded on every startup if install != user.dir | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | John Arthorne <john.arthorne> | ||||
| Component: | Runtime | Assignee: | Rafael Chaves <eclipse> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | tjwatson | ||||
| Version: | 3.1 | ||||||
| Target Milestone: | 3.1 M7 | ||||||
| Hardware: | PC | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
John Arthorne
Original summary: "Content type session test failure in HEAD" Turns out that the test failed because it was sensitive to the platform state stamp (Platform#getStateStamp()). It took me hours to understand why in John's setup plug-ins were being reinstalled every startup (modifying the state stamp accross sessions), and not only once. The reason is that the current user dir was affecting the way we compute plug-in install relative locations. The scoop: - the test failing here is sensitive to the platform state stamp changing. It should not change, but in the case of John's setup it was; - the stamp was changing because plug-ins were being discarded/reinstalled; - the reason: we store plug-in install locations as paths relative to the instal path. But when reading the bundle data in a second startup, the install location was not set yet (it was null); - new File(null, relativePath) creates a path relative to the user.dir. It so happens that for many people, the user.dir will be the Eclipse install dir, so this would not cause problems; - in your case, the user.dir is the parent directory for the Eclipse install, so you must have been having all plug-ins uninstalled/reinstalled during every startup! The interesting thing is that this seems to be the happening since mid-March (when the first support for relative bundle install paths was added - see bug 88078). Fix is to make sure we initialize the installPath as soon as possible (EclipseAdaptor#initialize()). Will attach a patch that does that. Created attachment 21024 [details]
patch for org.eclipse.osgi
Tom, can you take a look? The changes are very minor.
update the patch to test if the location is null Fix has been released to HEAD. I added a null check suggested in comment 3. Shouldn't we fail instead of ignoring the install location? We would not go much farther anyway. maybe. The goal was to change the behavior as little as possible. Before the patch we would not fail with an NPE. We can consider changing this, but leave for post M7 ... |