5

I updated my ubuntu 14.04 and since then my eclipse is crashing. On Starting, it is giving segmentation fault as soon as i click the menu buttons or try to use any short-cut keys. I have tried most of workarounds, which i could find on internet. This is my eclipse.ini file contents

-startup plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar      --launcher.GTK_version 2 --launcher.library plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.200.dist -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Xms40m -Xmx1024m -Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins -Dorg.eclipse.swt.browser.DefaultType=mozilla

I enable the core dump and checked using gdb, the stack seems to be corrupted. There is nothing i could find in /var/logs/system.log

If i remember it correctly, the update had to do something with some C++ libraries. Kindly help

user2757415
  • 153
  • 1
  • 15

8 Answers8

6

we experienced the same problem within our company. The fix we implemented was to call java directly with -vm option.

Unknown why it solves it but I found it by accident when investigating the issue.

Open the eclipse.ini file and add the following directly after the openFile:

-vm 
/usr/bin/java 

That should resolve the issue.

Theolodis
  • 4,977
  • 3
  • 34
  • 53
Jeffrey
  • 61
  • 2
  • Thanks, that fixed it and does not require to undo the updates. (replace `/usr/bin/java` with the path to your java executable) – Theolodis Jun 26 '17 at 05:39
  • Thanks @Jeffrey. This solved my problem in eclipse CDT Neon.3 (Xubuntu 17.04) – Valmir Jul 04 '17 at 12:16
3

Steps using grub: First, you must have it when starting the computer. If not, do this in the terminal:

sudo gedit /etc/default/grub

Now, change the line

GRUB_HIDDEN_TIMEOUT=0

to

#GRUB_HIDDEN_TIMEOUT=0

Then, update grub:

sudo update-grub

Check your actual kernel version:

uname -r

Now, you have grub when starting the machine. Restart the machine. A new black screen will appear with the grub options. Select the "advanced options". Then choose your previous linux-generic for booting.

Once booted, test your actual kernel version:

 uname -r

Now, try to start eclipse. Good luck!!

To remove the last update, for normal booting you must do

sudo apt-get purge linux-image-x.x.x linux-headers-x.x.x
danimar
  • 54
  • 1
2

Seems to be caused by an eclipse.ini setting like below:

-vm
/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so
paralaks
  • 183
  • 2
  • 7
  • i am using java 1.7 and there is no such setting in my eclipse.ini – user2757415 Jun 20 '17 at 16:14
  • Could be one of the custom settings you might have or some plugins failing. I could not figure out the root cause. After backing up settings, I've installed Oxygen even though it is still RC. It is fast and annoying tooltip colour bugs have been fixed. I recommend it. – paralaks Jun 20 '17 at 17:21
1

Yesterday I had the same problem with eclipse before the ubuntu update. I could not open the workspace (the splash window started but there was no more option) and always returned segmentation fault before pressing a button.

I've seen in /var/log/apt/history.log that this update installed linux-image-3.13.0-121-generic. I've downgrade the installation with grub to the previous linux-image and now I can start eclipse properly.

dani
  • 11
  • 1
  • Hi @dani: exactly i got this udpate too. Can you please mention the steps to me, so that i can downgrade the installation too. – user2757415 Jun 21 '17 at 09:48
1

I'm using eclipse STS and there isn't an eclipse.ini file... There is an STS.ini file but adding the vm arg here didn't work.

What worked for me was to pass it on the command line:

./STS -vm /usr/lib/jvm/java-8-openjdk-i386/jre/bin/java
0

I've experienced this same problem. It seems it was triggered by an update. To solve the problem I did the following:

By reviewing eclipse.ini file I've seen that it did not contain

-vm /usr/lib/jvm/java-8-openjdk-i386/jre/bin/java

By simply adding it Eclipse no longer reported "segment violation". Note that I had to include "java" at the end; by simply using /usr/lib/jvm/java-8-openjdk-i386/jre/bin/ (as suggested elsewhere) it didn't work

I hope this helps

0

From what I read, adding the -vm flag does the trick, the other option is setting it in the eclipse.ini file, see above... I guess both of the solutions are equivalent.

/usr/bin/java is a link so it resolves to the eclipse.ini option stated above

ls -l /usr/bin/java
 lrwxrwxrwx 1 root root 22 Jul 22  2014 /usr/bin/java -> /etc/alternatives/java
ls -l /etc/alternatives/java
 lrwxrwxrwx 1 root root 45 Jun  5  2016 /etc/alternatives/java -> usr/lib/jvm/java-8-openjdk-i386/jre/bin/java
Andrés Cancer
  • 521
  • 4
  • 4
0

i updated the kernel to 4.11.8-041108-generic using UKUU and the eclipse segmentation fault is no longer happening.