Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323526 - [target] Target editor claims file is not current but was created seconds before
Summary: [target] Target editor claims file is not current but was created seconds before
Status: VERIFIED WORKSFORME
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: 3.7 M5   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-24 13:39 EDT by Nick Boldt CLA
Modified: 2011-01-25 05:09 EST (History)
6 users (show)

See Also:


Attachments
screenshot: TP editor claims file is not current, but was created seconds before (51.34 KB, image/png)
2010-08-24 13:39 EDT, Nick Boldt CLA
no flags Details
Proposed patch for the described issue (1.95 KB, patch)
2010-10-28 09:09 EDT, Felix Riegger CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Boldt CLA 2010-08-24 13:39:27 EDT
Created attachment 177350 [details]
screenshot: TP editor claims file is not current, but was created seconds before

Steps to reproduce:

1.) select a .target file. copy it. open it with target platform editor
2.) mumble annoyed rantings at self because editor it too wide for editor area
3.) scroll right and click Set as Target Platform
4.) wait for it...
5.) see screenshot:

An internal error occurred during: "Load Target Platform".
Profile TARGET_DEFINITION:resource:/target-platform/Copy%20(2)%20of%20e36-wtp32.target is not current. Expected timestamp 1282670872534 but was 1282670658475.
Comment 1 Nick Boldt CLA 2010-08-24 13:40:08 EDT
Actual target file is here, fwiw:

http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/e36-wtp32.target
Comment 2 Darin Wright CLA 2010-08-30 14:01:35 EDT
Was there any error log entry/stack trace associated with this error? I was no able to reproduce with a different target file (that used the latest 3.7 build from a p2 repo).
Comment 3 Felix Riegger CLA 2010-10-25 05:51:31 EDT
Same issue here. Log entry contained the following stack trace:

java.lang.IllegalStateException: Profile TARGET_DEFINITION:resource:/target_platform/abc.target is not current. Expected timestamp 1287999978443 but was 1287999974909.
	at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.lockProfile(SimpleProfileRegistry.java:742)
	at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:65)
	at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:44)
	at org.eclipse.pde.internal.core.target.IUBundleContainer.resolveWithPlanner(IUBundleContainer.java:268)
	at org.eclipse.pde.internal.core.target.IUBundleContainer.resolveBundles(IUBundleContainer.java:195)
	at org.eclipse.pde.internal.core.target.AbstractBundleContainer.resolve(AbstractBundleContainer.java:97)
	at org.eclipse.pde.internal.core.target.TargetDefinition.resolve(TargetDefinition.java:239)
	at org.eclipse.pde.internal.core.target.provisional.LoadTargetDefinitionJob.handleReload(LoadTargetDefinitionJob.java:362)
	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)

Alternative steps to reproduce:

1. Close project containing target file (target file is removed from possible target platforms list)
2. Reopen project
3. Open target file in target platform editor
4. Click Set as Target Platform

PDE Version 3.6.1
Comment 4 Felix Riegger CLA 2010-10-26 07:52:14 EDT
In fact the error occurs only if the following steps are performed:

1. Open the target file with the target platform editor
2. While it's still stating: "Resolving Target Definition" click on Set as Target Platform -> while loading the target platform the error occurs

It seems to be a concurrency issue.
Comment 5 Felix Riegger CLA 2010-10-28 09:09:02 EDT
Created attachment 181932 [details]
Proposed patch for the described issue

The described issue is caused by a conflict between the resolving of the target platform and the setting of the target platform in the target editor. The attached patch introduces some changes to the TargetEditor class. The change makes sure that the job triggered by "Set target platform" is only executed after the "Resolving target platform" job has finished.
Comment 6 Curtis Windatt CLA 2010-12-02 14:35:46 EST
With the fix for bug 331068, I haven't seen any more of these.  Can you please try to reproduce with 3.7 M4 when it comes out?
Comment 7 Felix Riegger CLA 2010-12-30 08:46:04 EST
Not reproducible anymore with 3.7M4 I20101208-1300.
Comment 8 Curtis Windatt CLA 2011-01-04 10:48:13 EST
Closing as WORKFORME.  If anyone sees the issue using 3.7 M4 or later, please reopen.
Comment 9 Ankur Sharma CLA 2011-01-25 05:09:36 EST
Verified in I20110124-1800. It hasn't regressed in M5.