简体   繁体   English

Java运行时环境使用JOGL为程序获取“严重错误SIGSEGV”

[英]Java Runtime Environment getting “fatal error SIGSEGV” for program using JOGL

I am trying to run a Java program through Eclipse. 我正在尝试通过Eclipse运行Java程序。 Whenever I try and run the thing, this is what I get: 每当我尝试运行该事物时,这就是我得到的:

Info: XInitThreads() called for concurrent Thread support
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000010f1, pid=2750, tid=1923033968
#
# JRE version: 6.0_22-b04
# Java VM: Java HotSpot(TM) Server VM (17.1-b03 mixed mode linux-x86 )
# Problematic frame:
# C  0x000010f1
#
# An error report file with more information is saved as:
# /home/anjruu/ragamuffin/trunk/pipeline/hs_err_pid2750.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp

I am not getting any build errors, and have tried it using both the Java 6 OpenJDK, as well as Sun's jdk1.6.0_22, both behave the same. 我没有任何构建错误,并且已经使用Java 6 OpenJDK和Sun的jdk1.6.0_22对其进行了尝试,两者的行为均相同。 I am running an Ubuntu 10.10 system. 我正在运行Ubuntu 10.10系统。 The program uses JOGL (Java OpenGL), is that relevant? 该程序使用JOGL(Java OpenGL),相关吗?

The log file is about 400 lines long, so I figure that maybe posting the entire thing isn't so useful, and I'm not sure what sections would be, but if someone can let me know what I should include, I can do so. 日志文件长约400行,因此我认为也许发布整个内容不是那么有用,并且我不确定应该包含哪些部分,但是如果有人可以告诉我应该包含的内容,我可以做所以。

This looks like a bug in some C code somewhere. 这看起来像某个地方的某些C代码中的错误。 Given that it happened on two different JVMs I'd tend to suspect native extensions, perhaps JOGL. 鉴于它发生在两个不同的JVM上,我倾向于怀疑本机扩展,也许是JOGL。

Have you checked the file the report points you too: hs_err_pid2750.log? 您是否也检查过报告指向您的文件:hs_err_pid2750.log? Looking at that and then searching for some of those contents can often point you to others with the same problem and sometimes a fix. 查看这些内容,然后搜索其中一些内容,通常可以将您引向其他具有相同问题的内容,有时甚至可以解决。

If you are using JOGL on a Linux system then it is almost certain that the problem lies there. 如果在Linux系统上使用JOGL,则几乎可以确定问题出在那。 3D graphics is not very robust on most Linux systems, and JOGL stresses 3D graphics systems a lot because it does unusual things with them, mostly to do with multithreading. 3D图形在大多数Linux系统上不是很可靠,并且JOGL强调3D图形系统很多,因为它对它们执行不寻常的操作,主要是与多线程有关。

Most of the time the problem lies with out-of-date or non-conforming display drivers. 大多数情况下,问题出在过时或不合格的显示驱动程序上。 Make sure your system has the latest drivers, and use the proprietary ones, not the ones that come with the installation and not any open source ones - sorry but this is one case where knowing the hardware backwards (like the graphics card providers do) really improves quality and performance. 确保您的系统具有最新的驱动程序,并使用专有的驱动程序,而不是安装随附的驱动程序,也不使用任何开源的驱动程序-抱歉,这是一种真正了解硬件落后的情况(例如图形卡提供商)提高质量和性能。 This will usually fix the problem. 这通常可以解决问题。

If that doesn't help you are going to have to do something drastic. 如果那没有帮助,您将不得不做一些大胆的事情。 Often disabling hardware graphics acceleration will fix it, but with loss of performance of course. 通常,禁用硬件图形加速会解决该问题,但是当然会损失性能。 The log file should give you the full stack trace, which may be useful if you are comfortable with device driver coding and have the source of the drivers. 日志文件应为您提供完整的堆栈跟踪信息,如果您熟悉设备驱动程序编码并具有驱动程序的来源,这可能会很有用。 Alternatively try using a different graphics card - new ones are cheap if you haven't upgraded yours recently. 另外,也可以尝试使用其他图形卡-如果您最近没有升级过,那么新的图形卡很便宜。

I spent months of my life trying to track down bugs like this on a JOGL app running on Linux in the general case, and I still found installations where the window would draw blank. 在整个情况下,我花了几个月的时间试图在运行于Linux上的JOGL应用程序上查找此类错误,但我仍然发现安装时窗口会空白。 Good luck. 祝好运。

As other posters have said, HotSpot errors in JOGL programs can often be fixed by updating your graphics card drivers to the latest version. 正如其他发布者所说,JOGL程序中的HotSpot错误通常可以通过将图形卡驱动程序更新为最新版本来修复。

However, if you're using the new JOGL 2.0 beta, the problem might be that you're either not calling GLProfile.initSingleton(), or you're not calling it early enough (it has to be before any X Windows calls). 但是,如果您使用的是新的JOGL 2.0 beta,则问题可能出在您未调用GLProfile.initSingleton()或没有足够早地调用它(必须在任何X Windows调用之前) 。

I've got a tutorial at http://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/ that shows how to create a simple JOGL 2.0 program. 我在http://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/上找到了一个教程,该教程显示了如何创建一个简单的JOGL 2.0程序。 I've tested this program on CentOS 5.4 and it works correctly. 我已经在CentOS 5.4上测试了该程序,并且可以正常工作。 Back before I had GLProfile.initSingleton() in the right place in this tutorial, I saw the same SIGSEGV error as you. 在我在本教程的正确位置放置GLProfile.initSingleton()之前,我看到了与您相同的SIGSEGV错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM