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

Bug 224012

Summary: Errors loading existing .eclipseextension install folder w/ p2
Product: [Eclipse Project] Equinox Reporter: Nick Boldt <nboldt>
Component: p2Assignee: Simon Kaegi <simon_kaegi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton, pascal, simon_kaegi, susan
Version: 3.4   
Target Milestone: 3.4 M7   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 229641    
Bug Blocks:    
Attachments:
Description Flags
console logs: partial (scrolled off screen), reproduced w/ full log, then repeated w/o patch none

Description Nick Boldt CLA 2008-03-25 20:29:34 EDT
Created attachment 93514 [details]
console logs: partial (scrolled off screen), reproduced w/ full log, then repeated w/o patch

Scenario:

Migrating from Eclipse 3.4M5 to 3.4M6 (with p2), by loading pre-existing .eclipseextension-enabled install location folders. Similar to the example in bug 200380 comment 9, but with a simpler install location folder (just one version of Mylyn in it).

Steps to reproduce -- Part 1 -- Creating the install location:

0. Using Eclipse 3.4M5, install Mylyn 2.3.1 to some folder, eg. ~/eclipse/eclipse-plugins-mylyn. Use http://download.eclipse.org/tools/mylyn/update/e3.4/ as the update site URL.
1. Restart Eclipse when prompted. Can verify install location with Help > Software Updates > Manage Configuration.
2. Shut down Eclipse 3.4M5.

Steps to reproduce -- Part 2 -- Reusing the install location:

0. start up Eclipse 3.4 I20080324-1300 (linux gtk), with Sun 5.0
1. Help > Software Updates... > 
   Available Features > Manage sites... > 
   Add... > Local...
2. Browse for the above install folder, containing the
obligatory .eclipseextension file -- eg., ~/eclipse/eclipse-plugins-mylyn.
3. Hit OK.
4. Expand "Other" twisty. Select all features.
6. Click Install...
7. Click Yes.

All of the above works great. However, if you apply the patched jar from bug 223920 comment 8, you get a whole raft of console errors. See attached.
Comment 1 Susan McCourt CLA 2008-03-25 23:43:53 EDT
Thanks for the detailed logs.

I'm removing the blocking bug because I don't think the patched jar has anything to do with it.  I think it's a coincidence and the real problem may involve cleaning and retrying the scenario each time.  Either something got destroyed during the cleaning, or something bad happened in p2 as a result of that seemingly successful install.  It appears that a core cache is missing (not sure if it's the bundle pool itself or a repo cache.)

In c:\temp\eclipse_I2008032401300.install.mylyn.from.eclipseextension.folder.patched.txt,

the problem is here:
!ENTRY org.eclipse.equinox.p2.ui 4 0 2008-03-25 19:09:18.981
!MESSAGE Unable to load the repository file:/x/home/nickb/eclipse/34clean/eclipse/p2/org.eclipse.equinox.p2.core/cache/
!STACK 1
org.eclipse.equinox.internal.provisional.p2.core.ProvisionException: No repository found at file:/x/home/nickb/eclipse/34clean/eclipse/p2/org.eclipse.equinox.p2.core/cache/

Pascal/Simon - is this the bundle pool or some other cache?  Something important is gone.

In 
c:\temp\eclipse_I2008032401300.install.mylyn.from.eclipseextension.folder.patched.bad.txt,
it looks like an asynch refresh of the available features view occurred during restart.  Something must have finished installing, and the platform tried to restart, and during this time, a viewer that was either partially created or had been destroyed during the restart was trying to refresh.  This is the kind of thing the UI should code around with disposed and null checks.

I annotated bug #bug 224004 with this info.

Comment 2 Simon Kaegi CLA 2008-05-01 00:42:22 EDT
I verified that this works correctly now. It requires the fix in bug 229641. I'm going to mark this as a "Depends on" but then come back and close this after we're done with that bug.
Comment 3 Simon Kaegi CLA 2008-05-01 12:11:55 EDT
Marking Fixed along with 229641.