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

Bug 309374

Summary: Utils.isRunning() makes an invalid assumption about the system bundle state
Product: [Eclipse Project] Platform Reporter: Thomas Watson <tjwatson>
Component: Update (deprecated - use Eclipse>Equinox>p2)Assignee: Platform-Update-Inbox <platform-update-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: d.zinato
Version: 3.6   
Target Milestone: 3.6 M7   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Bug Depends on: 309261    
Bug Blocks:    
Attachments:
Description Flags
patch none

Description Thomas Watson CLA 2010-04-15 14:45:21 EDT
See bug 309261.  The code in org.eclipse.update.internal.configurator.Utils.isRunning() is making an invalid assumption that the system bundle state is ACTIVE when setting the framework start-level to the beginning start-level.

This is not a valid assumption.  The system bundle should be in the STARTING state until just before the FrameworkEvent.STARTED event is fired.  This event does not get fired until after the beginning start-level has been set.
Comment 1 Thomas Watson CLA 2010-04-15 14:57:03 EDT
Created attachment 165006 [details]
patch

Here is the fix.
Comment 2 John Arthorne CLA 2010-04-15 15:39:01 EDT
Thanks Tom, fix released. It's dubious that we even need to perform this test but won't bother removing it at this point. Here is the only reference to this method:

// TODO this test is not really needed any more than any plugin has 
// to test to see if the runtime is running.  It was there from earlier days
// where startup was much more disjoint.  Some day that level of decoupling
// will return but for now...
if (!Utils.isRunning())
	throw new Exception(Messages.ConfigurationActivator_initialize);
Comment 3 Thomas Watson CLA 2010-04-22 11:13:44 EDT
John, this fix did not get tagged for the I-Build.  As a result update.configurator will not start with the latest build.
Comment 4 Thomas Watson CLA 2010-05-11 09:33:20 EDT
*** Bug 312400 has been marked as a duplicate of this bug. ***