Search code examples
javaeclipsestack-overflow

Can't restart eclipse after crash


At some point my eclipse crashed and ever since that moment every time i try to restart it, it fails and I get the following exception in my logs:

Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.core.resources.ResourcesPlugin.start() of bundle org.eclipse.core.resources.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:478)
    at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:109)
    ... 22 more
Caused by: java.lang.StackOverflowError
    at org.eclipse.core.internal.localstore.SafeChunkyInputStream.find(SafeChunkyInputStream.java:86)
    at org.eclipse.core.internal.localstore.SafeChunkyInputStream.find(SafeChunkyInputStream.java:98)
    at org.eclipse.core.internal.localstore.SafeChunkyInputStream.find(SafeChunkyInputStream.java:98)
    at org.eclipse.core.internal.localstore.SafeChunkyInputStream.find(SafeChunkyInputStream.java:98)
    at org.eclipse.core.internal.localstore.SafeChunkyInputStream.find(SafeChunkyInputStream.java:98)
    at org.eclipse.core.internal.localstore.SafeChunkyInputStream.find(SafeChunkyInputStream.java:98)

I was able to workarond the problem by removing the folder .metadata/.plugins/org.eclipse.core.resources but in this way I've lost all my run history and I'd like to recover that. Is there any more specific file that I can remove to solve this problem?


Solution

  • It turns out the problem was hidden somewhere in a *.snap file.

    I was able to solve the problem by running the command:

     find . -name "*.snap" -exec rm -rf {} \;
    

    within the .metadata/.plugins/org.eclipse.core.resources folder.