Bug 484802 - Eclipse crash and then fails to even run
Summary: Eclipse crash and then fails to even run
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.5.1   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Patrik Suzzi CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2015-12-22 06:30 EST by Md. Jahidul Hamid CLA
Modified: 2016-06-29 14:21 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Md. Jahidul Hamid CLA 2015-12-22 06:30:35 EST
Eclipse crash in ubuntu is nothing new, but failing to run after a crash is new to me.

After eclipse mars crashes once, it fails bring out the main UI (only splash screen is shown).

This is the terminal output:

PC:~/bin/eclipse$ ./eclipse
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: /home/jahid/workspace_mars/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.6.2.20150902-0002.xml
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [bundleresource://472.fwk907665937:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://472.fwk907665937:2/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
org.eclipse.m2e.logback.configuration: Initializing logback
Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.cdt.ui.CUIPlugin$3


And after a complete shutdown and reboot (not just reboot) it is able to run again. And if another crash happens, the same error/process is repeated again.
Comment 1 Md. Jahidul Hamid CLA 2015-12-22 06:33:45 EST
Platform info:

Eclipse java development tool
C/C++ dev tool recently installed.

System:
Ubuntu 14.04.1 LTS 64bit

Java version: openjdk 1.7, oracle jdk 1.8
Comment 2 Thad Humphries CLA 2016-01-21 14:54:55 EST
I am getting the same error. I cannot start Eclipse (Mars 1) by clicking on the Eclipse.app icon, but I can start it from a Terminal. I have tried deleting ~/workspace/.metadata; tried the flag -clearPersistedState; and tried adding -clean -refresh to /Applications/eclipse/Eclipse.app/Contents/Eclipse/eclipse.ini. All to no effect. I even tried a new install of Eclipse and a new workspace. The newly installed Eclipse created a new ~/Documents/workspace with the same error present.

$ uname -a
Darwin localhost 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep  1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64

$ echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_71.jdk/Contents/Home

$ /Users/thad/Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse -clean
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: /Users/thad/workspace/.metadata/.plugins/org.eclipse.m2e.logback.configuration/logback.1.6.2.20150902-0002.xml
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [bundleresource://569.fwk1268650975:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://569.fwk1268650975:2/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
org.eclipse.m2e.logback.configuration: Initializing logback
Comment 3 David Williams CLA 2016-01-21 15:16:21 EST
(In reply to Thad Humphries from comment #2)
> I am getting the same error. I cannot start Eclipse (Mars 1) by clicking on
> the Eclipse.app icon, but I can start it from a Terminal. 

Out of curiosity, do you have anything much under 
${HOME}/.eclipse

Not sure what it would mean if you did. 

Also, you don't use -clean each time, do you? (Occasionally I have seen that cause problems). 

I assume nothing in your workspace/.metadata/.log? 

Can also help to check your configuration directory to see if there are some timestamped "logs" there. If equinox has trouble even getting started that is where it puts messages since there would not even be a "workspace" yet. 

FYI those messages about SLF4J are not that unusual and would not prevent things from starting. (AFAIK). 

And ... do you say? ... which version are you using? Mars.1 or a "development" version such as Neon? Oh, I see it now. Mar.1. I assume the JEE package?
Comment 4 Thad Humphries CLA 2016-01-21 16:01:18 EST
Thanks for the reply.

(In reply to David Williams from comment #3)
> (In reply to Thad Humphries from comment #2)
> > I am getting the same error. I cannot start Eclipse (Mars 1) by clicking on
> > the Eclipse.app icon, but I can start it from a Terminal. 
> 
> Out of curiosity, do you have anything much under 
> ${HOME}/.eclipse
> 
> Not sure what it would mean if you did.

There are several items there. Anything in particular I might look at?

> Also, you don't use -clean each time, do you? (Occasionally I have seen that
> cause problems). 

Okay. From a command line it will start without -clean.

> I assume nothing in your workspace/.metadata/.log? 

There is no .log in my existing workspace. When I create a new one with a fresh copy of Eclipse, there is short ~/Documents/workspace/.metadata/.log:

$ cat ~/Documents/workspace/.metadata/.log
!SESSION 2016-01-21 15:49:40.641 -----------------------------------------------
eclipse.buildId=4.5.1.M20150904-0015
java.version=1.8.0_71
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product -keyring /Users/thad/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product -keyring /Users/thad/.eclipse_keyring -showlocation

!ENTRY org.eclipse.core.net 1 0 2016-01-21 15:49:51.060
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences

> Can also help to check your configuration directory to see if there are some
> timestamped "logs" there. If equinox has trouble even getting started that
> is where it puts messages since there would not even be a "workspace" yet.

Yes, attempts to launch via the icon generate a timestamped log. In the fresh install, this is well over 900K and seems to list every module in Eclipse as "Could not resolve module". Example:

!ENTRY org.eclipse.ant.core 4 0 2016-01-21 15:45:57.757
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.ant.core [60]
  Unresolved requirement: Require-Bundle: org.eclipse.core.variables; bundle-version="[3.1.0,4.0.0)"
    -> Bundle-SymbolicName: org.eclipse.core.variables; bundle-version="3.2.800.v20130819-1716"; singleton:="true"
       org.eclipse.core.variables [86]
         Unresolved requirement: Require-Bundle: org.eclipse.core.runtime; bundle-version="[3.3.0,4.0.0)"
           -> Bundle-SymbolicName: org.eclipse.core.runtime; bundle-version="3.11.1.v20150903-1804"; singleton:="true"
              org.eclipse.core.runtime [83]
                Unresolved requirement: Require-Bundle: org.eclipse.core.jobs; bundle-version="[3.2.0,4.0.0)"; visibility:="reexport"
                  -> Bundle-SymbolicName: org.eclipse.core.jobs; bundle-version="3.7.0.v20150330-2103"; singleton:="true"
                     org.eclipse.core.jobs [80]
                       Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"

When I start the other Eclipse install--the one I had been running up till now--I also see "Could not resolve module" on the plugins I've installed.

> FYI those messages about SLF4J are not that unusual and would not prevent
> things from starting. (AFAIK). 
> 
> And ... do you say? ... which version are you using? Mars.1 or a
> "development" version such as Neon? Oh, I see it now. Mar.1. I assume the
> JEE package?

Fron the About Box:

Eclipse IDE for Java Developers

Version: Mars.1 Release (4.5.1)
Build id: 20150924-1200


These problems started today after I had installed JDK 1.8.0_71 (I had not tried to start Eclipse before that). However, when I removed _71 and went back to _65 the error persists.
Comment 5 David Williams CLA 2016-01-21 19:50:54 EST
(In reply to Thad Humphries from comment #4)

> These problems started today after I had installed JDK 1.8.0_71 (I had not
> tried to start Eclipse before that). However, when I removed _71 and went
> back to _65 the error persists.

This sounds key, especially combined with the 
 Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.7))"

I think what is happening is that when you click the icon, Java 6 or something is being invoked (which is too low for Mars.1). Then you run from the command line, Java 7 or 8 is being used. 

When you run 
/usr/libexec/java_home  
do you see what you expect? 
Mine says 
/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home

And that's the "system default". 

/usr/libexec/java_home -V 
will show you all that are installed on your system. 

When you "installed the JDK" did you do it from a pkg or dmg file from Oracle's site? To ask another way, you are not just using the JRE associaated with the browser, right? If so, you should install a "system java" using the pkg or dmg file from Oracle's site. 

= = = = =

As far as ${HOME}/.eclipse I was asking to see if you had any directories with "oomph" in the name? If so, do you intend to be using Oomph? If not, just delete those directories. If you do intend to use, your bug should probably move over to Oomph project.
Comment 6 Thad Humphries CLA 2016-01-21 22:21:25 EST
Problem solved. See below.

(In reply to David Williams from comment #5)
> (In reply to Thad Humphries from comment #4)
> 
> > These problems started today after I had installed JDK 1.8.0_71 (I had not
> > tried to start Eclipse before that). However, when I removed _71 and went
> > back to _65 the error persists.
> 
> This sounds key, especially combined with the 
>  Unresolved requirement: Require-Capability: osgi.ee;
> filter:="(&(osgi.ee=JavaSE)(version=1.7))"
> 
> I think what is happening is that when you click the icon, Java 6 or
> something is being invoked (which is too low for Mars.1). Then you run from
> the command line, Java 7 or 8 is being used. 
> 
> When you run 
> /usr/libexec/java_home  
> do you see what you expect? 
> Mine says 
> /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home
> 
> And that's the "system default". 
> 
> /usr/libexec/java_home -V 
> will show you all that are installed on your system.

Ah ha! No, there is no JDK 6 installed, but a few days ago I was testing some code with  JDK 9 early access on this machine. That installed jdk-9.jdk to /Library/Java/JavaVirtualMachines. Although my .bash_profile sets "export JAVA_HOME=`/usr/libexec/java_home -v 1.8`", /usr/libexec/java_home runs with the highest version of Java found in /Library/Java/JavaVirtualMachines. I dunno how to alter that, but simply moving the jdk-9.jdk directory elsewhere solves the problem.

So, Eclipse now launches from the desktop with 1.8.0_71.

Thank you for your help. It is **greatly** appreciated.

> When you "installed the JDK" did you do it from a pkg or dmg file from
> Oracle's site? To ask another way, you are not just using the JRE
> associaated with the browser, right? If so, you should install a "system
> java" using the pkg or dmg file from Oracle's site. 
> 
> = = = = =
> 
> As far as ${HOME}/.eclipse I was asking to see if you had any directories
> with "oomph" in the name? If so, do you intend to be using Oomph? If not,
> just delete those directories. If you do intend to use, your bug should
> probably move over to Oomph project.

Yes, there is org.eclipse.oomph.p2, org.eclipse.oomph.setup, and org.eclipse.oomph.ui in ~/.eclipse. Since things are now working, I'll leave them alone. In any case, I'm not sure what I have that might depend on them--I have Gradle's Buildship and Google and GWT SDKs. From what I read about Oomph, maybe those use it.
Comment 7 Thad Humphries CLA 2016-01-22 06:31:35 EST
(In reply to Thad Humphries from comment #6)
> Problem solved. See below.
> 
> (In reply to David Williams from comment #5)
> > (In reply to Thad Humphries from comment #4)
> > 
> > > These problems started today after I had installed JDK 1.8.0_71 (I had not
> > > tried to start Eclipse before that). However, when I removed _71 and went
> > > back to _65 the error persists.
> > 
> > This sounds key, especially combined with the 
> >  Unresolved requirement: Require-Capability: osgi.ee;
> > filter:="(&(osgi.ee=JavaSE)(version=1.7))"
> > 
> > I think what is happening is that when you click the icon, Java 6 or
> > something is being invoked (which is too low for Mars.1). Then you run from
> > the command line, Java 7 or 8 is being used. 
> > 
> > When you run 
> > /usr/libexec/java_home  
> > do you see what you expect? 
> > Mine says 
> > /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home
> > 
> > And that's the "system default". 
> > 
> > /usr/libexec/java_home -V 
> > will show you all that are installed on your system.
> 
> Ah ha! No, there is no JDK 6 installed, but a few days ago I was testing
> some code with  JDK 9 early access on this machine. That installed jdk-9.jdk
> to /Library/Java/JavaVirtualMachines. Although my .bash_profile sets "export
> JAVA_HOME=`/usr/libexec/java_home -v 1.8`", /usr/libexec/java_home runs with
> the highest version of Java found in /Library/Java/JavaVirtualMachines.

Ah! In Eclipse.app/Contents/Eclipse/eclipse.ini, insert starred (*) lines.

  --launcher.defaultAction
  openFile
* -vm 
* /Library/Java/JavaVirtualMachines/jdk1.8.0_71.jdk/Contents/Home/bin
  --launcher.appendVmargs
  -vmargs
  -Dosgi.requiredJavaVersion=1.7

(from https://wiki.eclipse.org/Eclipse.ini)

> I
> dunno how to alter that, but simply moving the jdk-9.jdk directory elsewhere
> solves the problem.
> 
> So, Eclipse now launches from the desktop with 1.8.0_71.
> 
> Thank you for your help. It is **greatly** appreciated.
> 
>...
Comment 8 Michael Keuchen CLA 2016-01-26 11:05:11 EST
That could be related to the SWT browser problems reported here:
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=385035 - Eclipse IDE crashes when clicking on one of the help menu items 
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=410739 - eclipse crashes when it tries to open browser for javadoc
Comment 9 Patrik Suzzi CLA 2016-04-01 07:47:17 EDT
Thad's problem is solved when he runs with JDK 8 instead of 9. 
However I think it is a different issue w.r.t. the reported bug. 

I will need more info from the original reporter, Md. Jahidul Hamid: 

(1) 
As you have no JDK-9, I suppose the bug is still valid. Could you confirm this ?

- if valid, two more questions: - 

(2) 
To me it seems your error is the same as I can see in Bug 436002 [#1] - This bug should be solved in Eclipse Mars. 
Could you please tell me which version of Eclipse are you running ?

(3)  
You mention a bug, that crashes Eclipse, and after that Eclipse does not start anymore. Could you please explain me the reason that chrashes Eclipse the first time?


Any response to the above questions will help in solving the bug. 

#1 https://bugs.eclipse.org/bugs/show_bug.cgi?id=436002#c35
Comment 10 Md. Jahidul Hamid CLA 2016-04-02 03:18:52 EDT
(In reply to Patrik Suzzi from comment #9)
> Thad's problem is solved when he runs with JDK 8 instead of 9. 
> However I think it is a different issue w.r.t. the reported bug. 
> 
> I will need more info from the original reporter, Md. Jahidul Hamid: 
> 
> (1) 
> As you have no JDK-9, I suppose the bug is still valid. Could you confirm
> this ?
> 
> - if valid, two more questions: - 
> 
> (2) 
> To me it seems your error is the same as I can see in Bug 436002 [#1] - This
> bug should be solved in Eclipse Mars. 
> Could you please tell me which version of Eclipse are you running ?
> 
> (3)  
> You mention a bug, that crashes Eclipse, and after that Eclipse does not
> start anymore. Could you please explain me the reason that chrashes Eclipse
> the first time?
> 
> 
> Any response to the above questions will help in solving the bug. 
> 
> #1 https://bugs.eclipse.org/bugs/show_bug.cgi?id=436002#c35

I have already deleted that eclipse installation and been away from eclipse since.

The version info of that eclipse is:

Eclipse IDE for Java Developers

Version: Mars.1 Release (4.5.1)
Build id: 20150924-1200

Crash happened when I got back from any window for example, when closing the "install new software" window.
Comment 11 Patrik Suzzi CLA 2016-04-02 18:55:31 EDT
Thanks for helping us. 

You wrote: 
> After Eclipse Mars crashes once, it fails bring out the main UI ...

I want to understand the reason of the first crash.

Was it after you installed C/C++ dev tools on top of Eclipse IDE for Java developers?
Comment 12 Md. Jahidul Hamid CLA 2016-04-03 09:48:39 EDT
(In reply to Patrik Suzzi from comment #11)
> Thanks for helping us. 
> 
> You wrote: 
> > After Eclipse Mars crashes once, it fails bring out the main UI ...
> 
> I want to understand the reason of the first crash.
> 
> Was it after you installed C/C++ dev tools on top of Eclipse IDE for Java
> developers?

yes
Comment 13 Patrik Suzzi CLA 2016-04-03 13:06:09 EDT
Which CDT version did you install ?

Did you install other plug-ins before CDT ?
Comment 14 Marc-André Laperle CLA 2016-04-04 10:47:02 EDT
Since this is a crash, do you have a hs_err_pid log file (hs_err_pid1234.log for example) when it crashes? It there a core dump?

Perhaps it doesn't crash but instead hangs? This would explain why it didn't start the second time. If that's the case you could attach a debugger to the process or use gcore to generate a core file.
Comment 15 Patrik Suzzi CLA 2016-06-14 12:58:24 EDT
Md. Jahidul Hamid, 

I think the error was because you used Eclipse Mars with GTK 3+

As a rule of thumb, with GTK 3, you should use Eclipse Neon.

So, I wanted to ask you: 
- which version of GTK you have in your Ubuntu system?
- if is GTK 3+, the issue is solved by using Eclipse Neon. Could you please test the latest version of neon from this link: https://www.eclipse.org/downloads/index-developer.php ?
- If you still need to use mars, did you tried exporting SWT_GTK3=0 ?

Thanks
Comment 16 Patrik Suzzi CLA 2016-06-29 14:21:33 EDT
Closing, no info provided.