【问题标题】:Eclipse Xtext Run as application - Java errorEclipse Xtext 作为应用程序运行 - Java 错误
【发布时间】:2013-03-29 12:44:17
【问题描述】:

我有一个 xtext 项目,我可以为它生成 xtext 工件,并使用 mwe2 生成器,但它不会作为 xtext 应用程序运行 - 给出错误:

#
# 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
#

我可以运行另一个 xtext 项目,但不能运行这个。我为 JRE 系统库尝试了不同的设置,从头开始重建项目,但没有任何效果。

有什么想法吗?

来自日志:

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;

【问题讨论】:

  • 您查看日志文件中的崩溃报告了吗?里面有什么有意义的吗?
  • 我添加了一些注销功能,但它看起来对我来说并不那么有趣 - 但是,我不确定要查找什么
  • 对我来说看起来像是 JVM 崩溃。我只能建议尝试不同的构建/Java7 运行时的最新构建。
  • 伙伴它在窗口机器上运行良好,我在 mac tho 中遇到了同样的错误:S 这太有趣了:D
  • 1- 您应该启用核心转储,请参阅:stackoverflow.com/questions/5576672/… 2- 分析您的核心转储,请参阅:stackoverflow.com/questions/951095/…

标签: java eclipse dsl xtext


【解决方案1】:

问题不在于 Xtext。它没有原生部分,也不会产生这样的错误。恰好是这样,这个特定项目在 eclipse 本地代码中或(更有可能)在 JRE 或其他库本地代码中触发错误。

为了解决这个问题,我建议如下:

也有很小的可能性,这是一个硬件问题。但是您可以通过尝试在不同的机器上运行您的项目来简单地解决这个问题。

【讨论】:

  • 感谢您的回答,但我仍然将此归咎于 xtext/emf/eclipse,因为我还有其他运行良好的项目 - 它一定是生成的代码失败了。我会尝试其他 jre 版本,看看我得到了什么,但目前 v7.17 是失败的
  • 我在您的问题中读到“JRE 版本:7.0_04-b21”。你的意思是,最新的 7.17 崩溃与相同的核心转储?
  • 我最终从头开始一切 - 包括重新下载 jdk 和 eclipse,从那里开始一切正常
  • 重新下载是个好主意。损坏的二进制文件是可能的原因之一。我会将其添加到我的答案中。谢谢!
猜你喜欢
  • 1970-01-01
  • 2021-12-31
  • 1970-01-01
  • 1970-01-01
  • 2015-03-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多