Monday, August 27, 2012

Recover Eclipse from Crash on Ubuntu

Motivation: Sometimes, Eclipse on Ubuntu (specifically, 11.10) hangs beyond recovery. It eventually crashes or I have to kill -9 it. When, I start it again, the splash screen gets stuck at about 70%.

The only solution till now was to create a new workspace which leads to reconfiguring the plugins, downloading code from repository -- a complete waste of time.

Requisites: Access to corrupted workspace directory.

Steps: Since changing workspace fixed the problem. I knew that something has got corrupted in the workspace. With a little poking around in $WORKSPACE/.metadata, I came to realize that at least one plugin's (with .ui in its name) metadata has gone bad. So, I started hit and trial by moving files from $WORKSPACE/.metadata/.plugins to another location and starting Eclipse. (starting Eclipse causes recreation of the moved plugin metadata file).

Long story short,
  1. look into Eclipse log file in the workspace, find out which plugin is doing the mischief.
  2. Delete/move the corresponding file from $WORKSPACE/.metadata/.plugins directory.
Most likely, you will hit the same plugin as mine, so likely you will have to just delete the org.eclipse.ui.workbench and org.eclipse.ui.ide from $WORKSPACE/.metadata/.plugins. And start Eclipse.

Hope this helps. 

No comments:

Post a Comment