Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 470111

Summary: Hang at startup involving target definition, XZed repository and feature editor
Product: [Eclipse Project] PDE Reporter: Marc-André Laperle <malaperle>
Component: UIAssignee: Vikas Chandra <Vikas.Chandra>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: curtis.windatt.public, marc.khouzam, Vikas.Chandra
Version: 4.5   
Target Milestone: 4.5.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Test project
none
Stack trace
none
Fix that solves this problem
none
Updated patch none

Description Marc-André Laperle CLA 2015-06-12 16:44:32 EDT
Created attachment 254398 [details]
Test project

Using Eclipse SDK 4.5-I20150603-2000

This is very similar to bug 460179 and bug 444137 but with XZed repository in the picture and the feature editor opened.

In a previous session, I had a feature editor opened and a target platform set (cdt-e4.5.target) and quit Eclipse. After a few hours, I started Eclipse again and it hung. My proxy settings are correct. After killing Eclipse and restarting, the target was marked as invalid (red X in the preferences and the status bar) and I was able to resolve it again by opening the target editor and setting it.

I found a way to reproduce it all the time:

1. Import attached project
2. Open cdt-e4.5.target in Target Editor. Set as Target Platform.
3. Open feature.xml (in Feature Editor) in the Dependencies tab
4. Quit Eclipse.
5. Modify the cdt-e4.5.target file outside Eclipse by incrementing the sequence numner by 1
6. Start Eclipse. Hangs occurs.
Comment 1 Vikas Chandra CLA 2015-06-23 05:26:52 EDT
I am able to recreate this. This needs to be fixed in 4.5.1
Comment 2 Vikas Chandra CLA 2015-07-01 06:26:21 EDT
Created attachment 254874 [details]
Stack trace
Comment 3 Vikas Chandra CLA 2015-07-01 06:28:23 EDT
Similar logic has to be applied in ExternalFeatureModelManager::initialize() as was done in PluginModelManager::initializeTable
Comment 4 Vikas Chandra CLA 2015-07-08 01:47:40 EDT
Created attachment 255050 [details]
Fix that solves this problem

A potential fix
Comment 5 Curtis Windatt CLA 2015-07-09 15:59:07 EDT
(In reply to Vikas Chandra from comment #4)
> Created attachment 255050 [details]
> Fix that solves this problem
> 
> A potential fix

If you have the feature editor open the feature manager is called first.  This was noticed previously and we had to handle init'ing the feature first in the past.  It makes sense then to have the same hang-preventing logic in the feature manager.

Since the feature manager uses the target for external features, perhaps we can simply have the feature manager force the plugin manager to initialize.  In theory if the plugin manager delays init to prevent the hang ups the feature manager will just think there are no external features until the target is reset.

I'm fine with doing the former right now and investigating the latter later in the release.
Comment 6 Vikas Chandra CLA 2015-07-15 05:09:16 EDT
Created attachment 255202 [details]
Updated patch

updated patch
Comment 7 Vikas Chandra CLA 2015-07-15 05:17:12 EDT
In masters(4.6)
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=0eb6884db706f994690659356a4e37961d92645c


In 4.5.1
http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?h=R4_5_maintenance&id=f03d36c5799ca363c8df7f58480ddfc4ccdc253b


opened Bug 472699 for investigation.

Marc, can you please check if this works for you in any build post
15th of July.
Comment 8 Marc-André Laperle CLA 2015-07-20 16:06:29 EDT
(In reply to Vikas Chandra from comment #7)
> Marc, can you please check if this works for you in any build post
> 15th of July.

I verified that it works with build 4.6-N20150719-2000. Thanks!
Comment 9 Vikas Chandra CLA 2015-08-05 01:42:47 EDT
This is verified in 4.6 build. Need to verify in 4.5.1 stream
Comment 10 Vikas Chandra CLA 2015-08-13 02:15:37 EDT
Verified in Version: Mars (4.5.1)
Build id: M20150812-1000