7

Eclipse "Customize perspective" provokes a "StackOverflowError" (see partial stacktrace below), the screen will never show and Eclipse can become unstable and may not start again.

This happens on Spring Tool Suite (sts-3.8.3) based on Eclipse 4.6.2 running on Ubuntu 16.x (and probably on other Linux too).

How to unlock Eclipse and how to make "Custom perspective" work with this version ?

stacktrace :

java.lang.StackOverflowError
at org.eclipse.swt.events.ControlEvent.<init>(ControlEvent.java:35)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:225)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5227)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1340)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1366)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1345)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:1100)
at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1527)
at org.eclipse.swt.widgets.ToolBar.setBounds(ToolBar.java:589)
at org.eclipse.swt.widgets.Control.setLocation(Control.java:1187)
at org.eclipse.e4.ui.widgets.ImageBasedFrame.setFramedControlLocation(ImageBasedFrame.java:124)
at org.eclipse.e4.ui.widgets.ImageBasedFrame.access$0(ImageBasedFrame.java:120)
at org.eclipse.e4.ui.widgets.ImageBasedFrame$4.controlMoved(ImageBasedFrame.java:109)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:225)
(...)
Tristan
  • 8,733
  • 7
  • 48
  • 96
  • Can you try to edit eclipse.ini to increase you stack size with `-Xss1m` ? – alain.janinm Feb 01 '17 at 15:28
  • 3
    It's not a memory setting problem, it's an infinite event loop. It's a known eclipse bug : https://bugs.eclipse.org/bugs/show_bug.cgi?id=497705 – Tristan Feb 01 '17 at 16:33

1 Answers1

17

If Eclipse is locked, it's not useful to remove the "writer.lock" file visible in logs, you have to remove the "workbench.xmi" located in your workspace :

<workspace_path>/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi

(tip taken here : Eclipse (C/C++) Error: Job found still running after platform shutdown)

To enable the "Customize perspective" screen, you have to switch to GTK 2. To do so, just edit your eclipse.ini (or STS.ini) and replace this :

--launcher.defaultAction

by this :

--launcher.GTK_version
2
Community
  • 1
  • 1
Tristan
  • 8,733
  • 7
  • 48
  • 96