Eclipse Freezing on Start

After an incorrect shutdown, Eclipse can not start, freezing on splash window.

I opened file
workspace\.metadata\.log
there was a line saying:

The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes

After taking many tries, I found a solution for this bug. Just remove folder
workspace\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes
and restart Eclipse. Everything will be fine again.

This entry was posted in Bug Fix, Eclipse. Bookmark the permalink.

16 Responses to Eclipse Freezing on Start

  1. Josh says:

    Thanks dude. I googled for the above error and you are TEH WINS! 🙂

  2. theMonk says:

    For some reason, I have to remove .metadata/.plugins/org.eclipse.core.resources/.safetable

  3. Alexander W. says:

    Thank you mate, your solution works fine!!
    I was trying alot to find out why eclipse freeze at start up.

  4. rehevkor5 says:

    I am having the same problem, but neither of those solutions worked for me unfortunately. Removing .safetable actually created more problems, I think because I had Aptana RadRails installed. I ended up zipping up and deleting the entire contents of workspace/.metadata Eclipse loaded ok, but now I have to re-create all my projects and run configurations 🙁

    I believe my problem began with the following Exception from .metadata/.log
    !ENTRY org.eclipse.ui 4 0 2008-01-30 13:35:33.621
    !MESSAGE Unhandled event loop exception
    !STACK 0
    org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.OutOfMemoryError: PermGen space)
    at org.eclipse.swt.SWT.error(SWT.java:3563)
    at org.eclipse.swt.SWT.error(SWT.java:3481)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
    at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
    Caused by: java.lang.OutOfMemoryError: PermGen space
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:161)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:501)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:471)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
    at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
    at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408)
    at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
    at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.formatCompilationUnit(DefaultCodeFormatter.java:235)
    at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.probeFormatting(DefaultCodeFormatter.java:421)
    at org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format(DefaultCodeFormatter.java:161)
    at org.eclipse.jdt.internal.corext.util.CodeFormatterUtil.format2(CodeFormatterUtil.java:229)
    at org.eclipse.jdt.internal.corext.util.CodeFormatterUtil.format2(CodeFormatterUtil.java:233)
    at org.eclipse.jdt.internal.corext.template.java.JavaFormatter.format(JavaFormatter.java:342)
    at org.eclipse.jdt.internal.corext.template.java.JavaFormatter.internalFormat(JavaFormatter.java:283)
    at org.eclipse.jdt.internal.corext.template.java.JavaFormatter.format(JavaFormatter.java:263)
    at org.eclipse.jdt.internal.corext.template.java.JavaDocContext.evaluate(JavaDocContext.java:200)
    at org.eclipse.jdt.internal.ui.text.template.contentassist.TemplateProposal.getAdditionalProposalInfo(TemplateProposal.java:391)
    at org.eclipse.jface.text.contentassist.AdditionalInfoController$6.run(AdditionalInfoController.java:162)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)

  5. frubi says:

    Thanks for the advice – It doesn’t help, my workspace is corrupt anyway. Most Java IDEs sucks, but Eclipse just sucks less. So I use it anyway.

  6. Roxana says:

    It worked for me and just made my day! THANK YOU!

  7. Saad says:

    Worked for me. Great! Thanks

  8. ZaM says:

    Thank you very much. I won’t use the ugly solution to create a new worskpace and import project into !!

  9. Pi says:

    My Eclipse was freezing during every Workspace building. I always had to cancel it right away before it didn’t react any more. That was really awful 🙂
    Renaming the .indexes folder did the trick.
    You made my day!

  10. kaleem says:

    i am working with android and while opening the file called “main.xml” the eclipse goes exit and while opening again it gives the following exception
    !ENTRY org.eclipse.core.resources 8 2 2010-11-16 10:30:22.812
    !MESSAGE Problems occurred when invoking code from plug-in: “org.eclipse.core.resources”.
    !STACK 1
    org.eclipse.core.runtime.CoreException: SDK is not loaded yet
    at com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown Source)
    at com.android.ide.eclipse.adt.internal.build.BaseBuilder.abortOnBadSetup(Unknown Source)
    at com.android.ide.eclipse.adt.internal.build.ResourceManagerBuilder.build(Unknown Source)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-11-16 10:30:22.812
    !MESSAGE SDK is not loaded yet
    !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-11-16 10:30:22.812
    !MESSAGE SDK is not loaded yet

    !ENTRY org.eclipse.core.resources 8 2 2010-11-16 10:30:22.812
    !MESSAGE Problems occurred when invoking code from plug-in: “org.eclipse.core.resources”.
    !STACK 1
    org.eclipse.core.runtime.CoreException: SDK is not loaded yet
    at com.android.ide.eclipse.adt.internal.build.BaseBuilder.stopBuild(Unknown Source)
    at com.android.ide.eclipse.adt.internal.build.BaseBuilder.abortOnBadSetup(Unknown Source)
    at com.android.ide.eclipse.adt.internal.build.PreCompilerBuilder.build(Unknown Source)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
    !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-11-16 10:30:22.812
    !MESSAGE SDK is not loaded yet
    !SUBENTRY 1 com.android.ide.eclipse.adt 8 0 2010-11-16 10:30:22.812
    !MESSAGE SDK is not loaded yet

  11. Pingback: How do I prevent Eclipse from hanging on startup? - Question Lounge

  12. Narayan says:

    This worked for me. I removed .indexes folder from .metadata\.plugins\org.eclipse.core.resources\.projects\ and it worked for me. Thanks a ton for the solution.. It did not work when I removed the indexes folder from \rationalsdp\workspace\.metadata\.plugins\org.eclipse.core.resources. So make sure you delete it from the right place.

  13. Pingback: How do I prevent Eclipse from hanging on startup?

  14. Pingback: How do I prevent Eclipse from hanging on startup? | Ask & Answers

  15. Pingback: How do I prevent Eclipse from hanging on startup? | Technology & Programming Answers