2

I have an xtext project, which I can generate the xtext artifacts for, and work with mwe2 generators, but it will not run as an xtext application - giving the error:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0xa) at pc=0x000000010ccc04d0, pid=4122, tid=38240796672
#
# JRE version: 7.0_04-b21
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.0-b21 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# J  org.eclipse.osgi.internal.resolver.VersionConstraintImpl.getName()Ljava/lang/String;
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/ashley/Documents/eclipse/Eclipse.app/Contents/MacOS/hs_err_pid4122.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#

I can run another xtext project, but not this one. I have tried different settings for the JRE System Library, rebuilt the project from scratch but nothing has worked yet.

Any ideas?

From log:

Register to memory mapping:

RAX=0x0000000000000001 is an unknown value
RBX=0x00000008e7543190 is pointing into the stack for thread: 0x00007fa1c2e36000
RCX=0x00000006151f98f8 is an oop
org.eclipse.osgi.internal.resolver.GenericSpecificationImpl 
 - klass: 'org/eclipse/osgi/internal/resolver/GenericSpecificationImpl'
RDX=0x000000011042af48 is an oop
{instance class} 
 - klass: {other class}
RSP=0x00000008e7543170 is pointing into the stack for thread: 0x00007fa1c2e36000
RBP=0x00000006151f98f8 is an oop
org.eclipse.osgi.internal.resolver.GenericSpecificationImpl 
 - klass: 'org/eclipse/osgi/internal/resolver/GenericSpecificationImpl'
RSI=0x00000006151f98f8 is an oop
org.eclipse.osgi.internal.resolver.GenericSpecificationImpl 
 - klass: 'org/eclipse/osgi/internal/resolver/GenericSpecificationImpl'
RDI=0x0000000000000007 is an unknown value
R8 =0x00000000a0aad527 is an unknown value
R9 =0x0000000000000065 is an unknown value
R10=0x00000000000007b6 is an unknown value
R11=0x00000006151f9938 is an oop
java.lang.Object 
 - klass: 'java/lang/Object'
R12=0x000000010fc8f000 is an unknown value
R13=0x00000008e75431c8 is pointing into the stack for thread: 0x00007fa1c2e36000
R14=0x0000000000000000 is an unknown value
R15=0x00007fa1c2e36000 is a thread


Stack: [0x00000008e7444000,0x00000008e7544000],  sp=0x00000008e7543170,  free space=1020k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
J  org.eclipse.osgi.internal.resolver.VersionConstraintImpl.getName()Ljava/lang/String;
Ashley
  • 5,939
  • 9
  • 39
  • 82
  • Did you take a look at the crash report in the log file? Anything meaningful in there? – Sebastian Zarnekow Apr 07 '13 at 13:24
  • I added some of the logout, but it doesn't look that interesting to me - but then, I'm not sure what to look for – Ashley Apr 07 '13 at 13:40
  • Looks like a JVM crash to me. I can only suggest to try a different build / the latest build of the Java7 runtime. – Sebastian Zarnekow Apr 08 '13 at 08:30
  • mate it worked good in the window machine, i had the same error in mac tho :S this is soo much fun :D – Jorge Y. C. Rodriguez Apr 08 '13 at 21:00
  • 1- you should enable core dump see : http://stackoverflow.com/questions/5576672/force-or-generate-jvm-core-dump 2- analyse your core dump see : http://stackoverflow.com/questions/951095/tool-for-analyzing-java-core-dump – willome Apr 10 '13 at 15:52
  • Could you please post the entire java hs_err_pid.log file, so it can be analysed better? You will find it in the current directory of the JVM. – Boris Brodski Apr 12 '13 at 11:02
  • How exactly are you trying to start this? Are you running standalone? Is it an installed plugin? Are you launching as an eclipse plugin from within the IDE? Have you tried launching in debug mode? Have you been able to reproduce this issue with a simple grammar? – Steve Kallestad Apr 15 '13 at 22:47

1 Answers1

3

The problem is not the Xtext. It has no native parts and can't produce such errors. It just happens to be so, that this particular project triggers an error in eclipse native code or (more probable) in JRE or other libraries native code.

In order to workaround the problem I would suggest following:

  • Upgrade your JRE to the latest some (Version 7 Update 17)
  • Try JREs from other vendors, like JRockit (http://www.oracle.com/technetwork/middleware/jrockit/overview/index.html)
  • Upgrade Eclipse to the latest bug fix release
  • Redownloaded all involved software (JDK, eclipse, ...)
  • Inspect all foreign libraries in your project for native parts and upgrade/replace it

There are also a tiny possibility, that this is a hardware problem. But you can simple role it out by trying to run your project on a different machine.

Boris Brodski
  • 8,425
  • 4
  • 40
  • 55
  • Thanks for your answer, but I am still blaming this on xtext/emf/eclipse, as I have other projects which run fine - it must be something with the generated code which is failing. I will try other jre versions and see what I get, but currently v7.17 is the one failing – Ashley Apr 11 '13 at 14:06
  • I read "JRE version: 7.0_04-b21" in your question. You mean, the latest 7.17 crashes with the same core dump? – Boris Brodski Apr 12 '13 at 10:48
  • I ended up starting everything from scratch - including re-downloading jdk and eclipse, from there on in it worked fine – Ashley Apr 17 '13 at 20:56
  • Redownloading is a cool idea. Broken binaries is one of the possible causes. I will add it to my answer. Thank you! – Boris Brodski Apr 17 '13 at 21:10