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

Bug 185491

Summary: eclipse hangs on startup due to .extensions file
Product: [Eclipse Project] PDE Reporter: Will Horn <will.horn>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: pascal, tjwatson
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Will Horn CLA 2007-05-04 00:15:19 EDT
Build ID: 3.3 M6

Steps To Reproduce:
1. Delete ${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/122332434215.workspace/.extensions
2. Launch Eclipse
3. Close Eclipse
4. Attempt to launch Eclipse again


More information:
I can reproduce it consistently. Essentially, the .extensions file that PDE writes as I close Eclipse seems to be corrupt and I cannot restart Eclipse on my workspace unless I delete that file.

When I run with tracing on, the last entries I see before it hangs are:

->started update@plugins/org.eclipse.pde_3.3.0.v20070320-0010.jar [89]
->started update@plugins/org.eclipse.pde.core_3.3.0.v20070323-1600.jar [91]
Time to read extensions: 30 ms
Time to read extensions: 10 ms

By debugging, I found that the (seemingly) infinite loop is in org.eclipse.osgi.internal.module.ResolverImpl.findBestCombination(ResolverBundle[] bundles, ResolverConstraint[] multipleSuppliers, int[] bestCombination)

The full stack trace is: 
Thread [main] (Suspended (breakpoint at line 551 in ResolverImpl))	
	ResolverImpl.findBestCombination(ResolverBundle[], ResolverConstraint[], int[]) line: 551	
	ResolverImpl.findBestCombination(ResolverBundle[], ResolverConstraint[]) line: 525	
	ResolverImpl.checkUsesConstraints(ResolverBundle[], Dictionary[], ArrayList) line: 484	
	ResolverImpl.resolveBundles0(ResolverBundle[], Dictionary[], ArrayList) line: 479	
	ResolverImpl.resolveBundles(ResolverBundle[], Dictionary[], ArrayList) line: 449	
	ResolverImpl.resolve(BundleDescription[], Dictionary[]) line: 336	
	UserState(StateImpl).resolve(boolean, BundleDescription[]) line: 345	
	UserState(StateImpl).resolve(boolean) line: 404	
	PDEState.readWorkspaceState(URL[]) line: 185	
	PDEState.<init>(URL[], URL[], boolean, IProgressMonitor) line: 89	
	PluginModelManager.initializeTable() line: 324	
	PluginModelManager.findModel(IProject) line: 595	
	PluginRegistry.findModel(IProject) line: 74	
	RequiredPluginsInitializer.initialize(IPath, IJavaProject) line: 32	
	JavaModelManager.initializeContainer(IJavaProject, IPath) line: 2147	
	JavaModelManager$9.run(IProgressMonitor) line: 2082	
	Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 1797	
	JavaModelManager.initializeAllContainers(IJavaProject, IPath) line: 2098	
	JavaModelManager.getClasspathContainer(IPath, IJavaProject) line: 1479	
	JavaCore.getClasspathContainer(IPath, IJavaProject) line: 1563	
	JavaProject.resolveClasspath(JavaModelManager$PerProjectInfo) line: 2571	
	JavaProject.getResolvedClasspath() line: 1878	
	DeltaProcessingState.initializeRoots() line: 202	
	SetContainerOperation(JavaModelOperation).run(IProgressMonitor) line: 717	
	Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 1797	
	<unknown receiving type>(JavaModelOperation).runOperation(IProgressMonitor) line: 784	
	JavaCore.setClasspathContainer(IPath, IJavaProject[], IClasspathContainer[], IProgressMonitor) line: 4445	
	<unknown receiving type>(JREContainerInitializer).initialize(IPath, IJavaProject) line: 69	
	<unknown receiving type>(JavaModelManager).initializeContainer(IJavaProject, IPath) line: 2147	
	<unknown receiving type>(JavaModelManager).getClasspathContainer(IPath, IJavaProject) line: 1481	
	JavaCore.getClasspathContainer(IPath, IJavaProject) line: 1563	
	<unknown receiving type>(JavaProject).resolveClasspath(JavaModelManager$PerProjectInfo) line: 2571	
	<unknown receiving type>(JavaProject).getResolvedClasspath() line: 1878	
	<unknown receiving type>(PackageFragmentRoot).validateOnClasspath() line: 783	
	<unknown receiving type>(PackageFragmentRoot).exists() line: 349	
	<unknown receiving type>(Openable).parentExists() line: 432	
	<unknown receiving type>(Openable).exists() line: 178	
	<unknown receiving type>(PackageFragment).exists() line: 180	
	<unknown receiving type>(Openable).parentExists() line: 432	
	<unknown receiving type>(Openable).exists() line: 178	
	<unknown receiving type>(ClassFile).exists() line: 180	
	<unknown receiving type>(ClassFileEditorInputFactory).createElement(IMemento) line: 50	
	<unknown receiving type>(NavigationHistoryEditorInfo).restoreEditor() line: 79	
	<unknown receiving type>(NavigationHistory).addEntry(IEditorPart) line: 368	
	<unknown receiving type>(NavigationHistory).markLocation(IEditorPart) line: 211	
	<unknown receiving type>(AbstractTextEditor).markInNavigationHistory() line: 5878	
	<unknown receiving type>(AbstractTextEditor).selectAndReveal(int, int, int, int) line: 5853	
	<unknown receiving type>(AbstractTextEditor).selectAndReveal(int, int) line: 5822	
	<unknown receiving type>(AbstractTextEditor).doSetSelection(ISelection) line: 2756	
	<unknown receiving type>(JavaEditor).doSetSelection(ISelection) line: 2556	
	<unknown receiving type>(AbstractTextEditor).doRestoreState(IMemento) line: 6632	
	<unknown receiving type>(AbstractTextEditor$ActivationListener).partActivated(IWorkbenchPart) line: 877	
	<unknown receiving type>(PartListenerList$1).run() line: 72	
	SafeRunner.run(ISafeRunnable) line: 37	
	Platform.run(ISafeRunnable) line: 850	
	<unknown receiving type>(PartListenerList).fireEvent(SafeRunnable, IPartListener, IWorkbenchPart, String) line: 57	
	<unknown receiving type>(PartListenerList).firePartActivated(IWorkbenchPart) line: 70	
	<unknown receiving type>(PartService).firePartActivated(IWorkbenchPartReference) line: 73	
	<unknown receiving type>(PartService).setActivePart(IWorkbenchPartReference) line: 171	
	<unknown receiving type>(WWinPartService).pageActivated(IWorkbenchPage) line: 174	
	<unknown receiving type>(WWinPartService).pageOpened(IWorkbenchPage) line: 207	
	<unknown receiving type>(WorkbenchWindow).firePageOpened(IWorkbenchPage) line: 1263	
	WorkbenchWindow.access$4(WorkbenchWindow, IWorkbenchPage) line: 1253	
	<unknown receiving type>(WorkbenchWindow$14).runWithException() line: 2057	
	<unknown receiving type>(StartupThreading$StartupRunnable).run() line: 31	
	<unknown receiving type>(RunnableLock).run() line: 35	
	<unknown receiving type>(Synchronizer).runAsyncMessages(boolean) line: 123	
	<unknown receiving type>(Display).runAsyncMessages(boolean) line: 3650	
	<unknown receiving type>(Display).readAndDispatch() line: 3287	
	<unknown receiving type>(Workbench).runUI() line: 2260	
	Workbench.access$4(Workbench) line: 2176	
	<unknown receiving type>(Workbench$4).run() line: 463	
	Realm.runWithDefault(Realm, Runnable) line: 289	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 458	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149	
	<unknown receiving type>(IDEApplication).start(IApplicationContext) line: 101	
	<unknown receiving type>(EclipseAppHandle).run(Object) line: 146	
	<unknown receiving type>(EclipseAppLauncher).runApplication(Object) line: 106	
	<unknown receiving type>(EclipseAppLauncher).start(Object) line: 76	
	EclipseStarter.run(Object) line: 356	
	EclipseStarter.run(String[], Runnable) line: 171	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	<unknown receiving type>(NativeMethodAccessorImpl).invoke(Object, Object[]) line: 39	
	<unknown receiving type>(DelegatingMethodAccessorImpl).invoke(Object, Object[]) line: 25	
	<unknown receiving type>(Method).invoke(Object, Object...) line: 597	
	<unknown receiving type>(Main).invokeFramework(String[], URL[]) line: 476	
	<unknown receiving type>(Main).basicRun(String[]) line: 416	
	<unknown receiving type>(Main).run(String[]) line: 1141	
	Main.main(String[]) line: 1116	


Please let me know if there are additional steps I can take to continue debugging, or to provide better information.
Comment 1 Thomas Watson CLA 2007-05-04 09:33:15 EDT
This is a dup of bug 181327.  Please try on the M7 build which should be final today.

*** This bug has been marked as a duplicate of bug 181327 ***