Categories
AI & Tech

How to resolve frequent crashes on Eclipse Luna?

Have you ever wondered why your eclipse IDE started behaving cranky and crashes very frequently?

If you are one among many individuals having following questions , we have appropriate solution for you 🙂

  • Eclipse Luna hangs frequently?
  • Eclipse frequently hangs with High CPU usage
  • Eclipse freezes every few minutes
  • Eclipse hangs at startup showing only the splash screen

Then the following tips might help you resolve your issue with the IDE. Let’s take a look at what measures can be taken in an attempt to resolve this issue.

APPROACH-1:

If you’ve recently added any plugin to your eclipse IDE, it is better to run your IDE with –clean argument, as this re-scans the installed plugins on your IDE and rebuilds the cache in ECLIPSE_HOME\configuration folder. It is a better idea to startup your eclipse for the first time after the successful installation of any plugin to clear this and at the same time can also help you resolve any crashes that might happen in future as well (due to the new plugin that you added to eclipse).

The approach here is to add the following parameters at the beginning of your eclipse.ini file and open your eclipse only once with these arguments.

clean
  -clearPersistedState

After the first run of your eclipse with these arguments, this can either be chucked off or be left alone (should you choose to leave it as is, you might face a delayed startup time of your IDE)

APPROACH-2:

If it isn’t any new plugins that you’ve added to your IDE, then it could be something else altogether. In such cases, the following arguments have come handy in most of the situations for me (personally). Add the following parameters and it should fix your IDE issue. Along with the arguments that I’ve added to my eclipse.ini file, I will also share the issue that I faced just so that you can refer to – for your case.

Add the following to your eclipse.ini file:

-vmargs
  -Dosgi.requiredJavaVersion=1.8
  -XX:+UseG1GC
  -XX:+UseStringDeduplication
  -Dosgi.requiredJavaVersion=1.8
  -Xms40m
  -Xmx512m
  -XX:PermSize=64M 
  -XX:MaxPermSize=128M
  -XX:+UseCompressedOops

If it’s Windows 7 the OS that you’re running your IDE on, then the above setting will work just fine. The error details that I promised to share along with the solution follows:

Error screenshot:

Eclipse.ini configuration that I had when I had the issue is as follows:

-clean
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20150204-1316
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.8.0_111\bin\javaw.exe
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
-XX:+UseCompressedOops

Error stack-trace:
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized.  Will retry after the state location is initialized.
org.eclipse.m2e.logback.configuration: Logback config file: E:\ProjectWorkspace\.metadata\.plugins\org.eclipse.m2e.logback.configuration\logback.1.5.1.20150109-1820.xml
org.eclipse.m2e.logback.configuration: Initializing logback
Exception in thread "org.eclipse.jdt.internal.ui.text.JavaReconciler" java.lang.OutOfMemoryError: GC overhead limit exceeded
        at org.eclipse.core.runtime.Path.append(Path.java:273)
        at org.eclipse.core.internal.dtree.DeltaDataTree.getChildren(DeltaDataTree.java:540)
        at org.eclipse.core.internal.watson.ElementTree.getChildIDs(ElementTree.java:332)
        at org.eclipse.core.internal.watson.ElementTree.getChildren(ElementTree.java:348)
        at org.eclipse.core.internal.resources.Container.getChildren(Container.java:142)
        at org.eclipse.core.internal.resources.Container.members(Container.java:270)
        at org.eclipse.core.internal.resources.Container.members(Container.java:249)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:224)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeChildren(PackageFragmentRoot.java:198)
        at org.eclipse.jdt.internal.core.JavaProjectElementInfo.initializePackageNames(JavaProjectElementInfo.java:253)
        at org.eclipse.jdt.internal.core.JavaProjectElementInfo.getProjectCache(JavaProjectElementInfo.java:226)
        at org.eclipse.jdt.internal.core.JavaProjectElementInfo.newNameLookup(JavaProjectElementInfo.java:291)
        at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2329)
        at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:59)
        at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:66)
        at org.eclipse.jdt.internal.core.CancelableNameEnvironment.<init>(CancelableNameEnvironment.java:26)
        at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:178)
        at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:271)
        at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.makeConsistent(ReconcileWorkingCopyOperation.java:191)
        at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:90)
        at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:729)
        at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:789)
        at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1247)
        at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:126)
        at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.access$0(JavaReconcilingStrategy.java:108)
org.eclipse.swt.SWTException: Widget is disposed
        at org.eclipse.swt.SWT.error(SWT.java:4441)
        at org.eclipse.swt.SWT.error(SWT.java:4356)
        at org.eclipse.swt.SWT.error(SWT.java:4327)
        at org.eclipse.swt.widgets.Widget.error(Widget.java:476)
        at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:348)
        at org.eclipse.swt.widgets.Shell.isVisible(Shell.java:1170)
        at org.eclipse.ui.internal.progress.ProgressManagerUtil.getDefaultParent(ProgressManagerUtil.java:387)
        at org.eclipse.ui.internal.statushandlers.InternalDialog.<init>(InternalDialog.java:154)
        at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.doAddStatusAdapter(WorkbenchStatusDialogManagerImpl.java:260)
        at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.addStatusAdapter(WorkbenchStatusDialogManagerImpl.java:198)
        at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.addStatusAdapter(WorkbenchStatusDialogManager.java:158)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.showStatusAdapter(WorkbenchErrorHandler.java:105)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.access$0(WorkbenchErrorHandler.java:98)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler$1.run(WorkbenchErrorHandler.java:65)
        at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:167)
        at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:165)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
        at org.eclipse.swt.widgets.Display.release(Display.java:3817)
        at org.eclipse.swt.graphics.Device.dispose(Device.java:295)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
org.eclipse.swt.SWTException: Widget is disposed
        at org.eclipse.swt.SWT.error(SWT.java:4441)
        at org.eclipse.swt.SWT.error(SWT.java:4356)
        at org.eclipse.swt.SWT.error(SWT.java:4327)
        at org.eclipse.swt.widgets.Widget.error(Widget.java:476)
        at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:348)
        at org.eclipse.swt.widgets.Shell.isVisible(Shell.java:1170)
        at org.eclipse.ui.internal.progress.ProgressManagerUtil.getDefaultParent(ProgressManagerUtil.java:387)
        at org.eclipse.ui.internal.statushandlers.InternalDialog.<init>(InternalDialog.java:154)
        at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.doAddStatusAdapter(WorkbenchStatusDialogManagerImpl.java:260)
        at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.addStatusAdapter(WorkbenchStatusDialogManagerImpl.java:198)
        at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.addStatusAdapter(WorkbenchStatusDialogManager.java:158)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.showStatusAdapter(WorkbenchErrorHandler.java:105)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.access$0(WorkbenchErrorHandler.java:98)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler$1.run(WorkbenchErrorHandler.java:65)
        at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:167)
        at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:165)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
        at org.eclipse.swt.widgets.Display.release(Display.java:3817)
        at org.eclipse.swt.graphics.Device.dispose(Device.java:295)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1438)

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version