Bug 20325 - CP Variable - should not persist "initialization in progress" value
Summary: CP Variable - should not persist "initialization in progress" value
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P1 normal (vote)
Target Milestone: 2.0 F4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 20359 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-14 07:05 EDT by Philipe Mulet CLA
Modified: 2002-06-19 11:32 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2002-06-14 07:05:11 EDT
Build F3

If a variable initializer fails to bind a variable, the value "initialization 
in progress" is still cached to the preference store, and thus:

1. will provide an incorrect value for the variable
2. will prevent attempting to initialize again in next session
Comment 1 Philipe Mulet CLA 2002-06-14 07:09:30 EDT
This is a regression introduced when persisting variable using preference store.

Fix is to filter out persistence both on the way out. Clients who already are 
in trouble will need to manually fix the variable value, or simply remove it.

Fix available for F4
Comment 2 Philipe Mulet CLA 2002-06-14 11:58:15 EDT
Removing 'FIXED' status, until it gets approved for F4
Comment 3 Philipe Mulet CLA 2002-06-14 12:02:41 EDT
Fix is trivial (one line change).

If we don't fix it, then if a classpath variable initializer do fail to perform 
successfully (JRE_LIB, PDE_HOME, ...), then we will persist its failure in our 
preference store across session, and from thereon:

1. the variable has an incorrect value (temp value marker used internally to 
avoid cycling in initializers).
2. initializers will not run anymore on this variable

Only work-around is for users to manually go and delete this classpath variable 
for initializers to be activated again.

+ this is a regression from F2, when enabling our classpath variables to be 
exported through preferences.
Comment 4 Philipe Mulet CLA 2002-06-14 12:31:06 EDT
*** Bug 20359 has been marked as a duplicate of this bug. ***
Comment 5 Olivier Thomann CLA 2002-06-14 13:50:58 EDT
I could not reproduce the problem after the rebuild. After the rebuild, 
ECLIPSE_HOME is fine, but a error persists on the project about the fact that 
it was not build due to errors in its classpath. The ECLIPSe_HOME variable was 
reset properly, but another rebuild was necessary to get rid of the error.
I'd like clear steps to reproduce in order to confirm that the original problem 
is gone and that the fix is required.
Comment 6 Karice McIntyre CLA 2002-06-14 14:59:16 EDT
I tried reproducing this again, and got some different, but still incorrect 
results.  

When I start up the F3 dev(pointing the data directory to a fresh workspace 
directory), ECLIPSE_HOME is initially not set.  
PROBLEM #1: Is that ok?

From there, I checked that the PDE target platform was pointing to the 
directory from which I ran F3 - OK.

Then I loaded my projects from the repository and then changed the target 
platform to point to another directory (these are all the same steps as 
before).  I agreed to do a rebuild when prompted, then checked the classpath 
variables.  
PROBLEM #2: This time ECLIPSE_HOME was pointing to the original (default) 
directory where my F3 was installed, not the new target I had just directed it 
to in the PDE preferences page.
Comment 7 Olivier Thomann CLA 2002-06-14 15:14:00 EDT
It is not clear how to reproduce the original problem. I checked with Karice, 
but the error seems to be different now. However with the fix it seems that the 
update of the variable itself works fine. There is an aditional "rebuild all" 
that is still required to get rid of all errors.
Comment 8 Jerome Lanneluc CLA 2002-06-17 09:38:40 EDT
Karice, PROBLEM #1 is ok since this variable is not created until PDE as been 
activated. If you went back to the preferences after activating PDE (by looking 
at its preferences for example), you would have seen it was now initialized.

I verified that PROBLEM #2 is now fixed.

Comment 9 Jerome Lanneluc CLA 2002-06-17 09:38:54 EDT
Verified.
Comment 10 Dale King CLA 2002-06-19 11:32:35 EDT
Here is some information I posted on the newsgroup. I could reliably get this 
to happen by checking out a bunch of Java projects from CVS into a fresh 
workspace. Here is what I posted:

Some more info. That condition of ECLIPSE_HOME not being set was persistent
over starting up Eclipse several times. Actually, it was set. It was set to
"Variable Initialization in Progress". I just tried creating another new
workspace and it had the same problem after checking everything out from
CVS, but it did not have the problem before the checkout.

If it matters, here are the steps I went through the first time:

Startup Eclipse (which takes an eternity)
Close the welcome screen
Open the CVS Repository Exploring perspective
Create my repository location.
Open up Head and Select all folders (18 Java projects and accidently the
CVSROOT directory    )
Select Check out as project for the group.
Open Java perspective

At this point any project that had a dependency on a build path based on the
ECLIPSE_HOME variable does not build.

Trying it again, checking out one or 2 projects at a time seems to work.