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

Bug 321942

Summary: Eclipse will not Launch with certain .bundledata.## file in ORG.ECLIPSE.OSGI folder
Product: [Eclipse Project] Platform Reporter: Sujith Job <sujithjob>
Component: RuntimeAssignee: Thomas Watson <tjwatson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mukund, raji
Version: 3.2.2   
Target Milestone: 3.6.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Sujith Job CLA 2010-08-06 01:01:14 EDT
Build Identifier: 3.2.2.R32x_v20070118

Client launching issue caused by a bad file in the /workspace folder
An error has occurred. See the log file <path>\workspace\.config\###.log

opened this log, this is the output:                                   
                                                                       
!SESSION Wed May 26 09:50:28 EDT 2010                                  
------------------------------------------                             
!ENTRY org.eclipse.core.launcher 4 0 2010-05-26 09:50:28.718           
!MESSAGE Exception launching the Eclipse Platform:                     
!STACK                                                                 
java.lang.NullPointerException                                         
 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)        
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)        
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)    
 at java.lang.reflect.Method.invoke(Unknown Source)                    
 at org.eclipse.core.launcher.Main.invokeFramework(Unknown Source)     
 at org.eclipse.core.launcher.Main.basicRun(Unknown Source)            
 at org.eclipse.core.launcher.Main.run(Unknown Source)                 
 at com.ibm.rcp.core.internal.launcher.Main.startLaunch(Unknown Source)
 at com.ibm.rcp.core.internal.launcher.Main.main(Unknown Source)       

The customer can resolve the issue by renaming /workspace and restarting. The problem has been narrowed down to a particular file in the /workspace/.config/org.eclipse.osgi folder - .lazy.##.


Reproducible: Couldn't Reproduce

Steps to Reproduce:
Somehow the .lazy file gets corrupted and eclipse does not launch
Comment 1 Thomas Watson CLA 2010-08-06 09:55:35 EDT
Created attachment 176034 [details]
patch

Given the strangeness of this scenario and our inability to reproduce or figure out what corrupted the file; about the only thing we can do at this point is recover if the bundledata cannot be read successfully.  This patch does that.
Comment 2 Thomas Watson CLA 2010-08-06 09:56:06 EDT
We should add this to 3.6.1.
Comment 3 Thomas Watson CLA 2010-08-06 09:59:13 EDT
The original stacktrace is useless.  Here is a better stack trace from the customer that provides a hint at where the framework failed to launch.  It is not because of a corrupted .lazy file, instead it is because of a corrupted .bundledata file.

Startup error
java.lang.NegativeArraySizeException
		 at org.eclipse.osgi.internal.baseadaptor.BaseStorage.loadBaseData(Unknown Source)
		 at org.eclipse.osgi.internal.baseadaptor.BaseStorage.readBundleDatas(Unknown Source)
		 at org.eclipse.osgi.internal.baseadaptor.BaseStorage.getInstalledBundles(Unknown Source)
		 at org.eclipse.osgi.baseadaptor.BaseAdaptor.getInstalledBundles(Unknown Source)
		 at org.eclipse.osgi.framework.internal.core.Framework.initialize(Unknown Source)
		 at org.eclipse.osgi.framework.internal.core.Framework.<init>(Unknown Source)
		 at org.eclipse.osgi.framework.internal.core.OSGi.createFramework(Unknown Source)
		 at org.eclipse.osgi.framework.internal.core.OSGi.<init>(Unknown Source)
		 at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(Unknown Source)
		 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
		 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
		 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
		 at java.lang.reflect.Method.invoke(Unknown Source)
		 at org.eclipse.core.launcher.Main.invokeFramework(Unknown Source)
		 at org.eclipse.core.launcher.Main.basicRun(Unknown Source)
		 at org.eclipse.core.launcher.Main.run(Unknown Source)
		 at com.ibm.rcp.core.internal.launcher.Main.startLaunch(Unknown Source)
		 at com.ibm.rcp.core.internal.launcher.Main.main(Unknown Source)
Comment 4 Thomas Watson CLA 2010-08-06 10:05:29 EDT
Patch released to 3.6.1 and HEAD.