Java 运行时环境收到“致命错误 SIGSEGV”对于使用 JOGL 的程序

发布于 2024-10-01 12:53:16 字数 854 浏览 0 评论 0 原文

我正在尝试通过 Eclipse 运行 Java 程序。每当我尝试运行这个东西时,我都会得到以下结果:

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

我没有收到任何构建错误,并且已经使用 Java 6 OpenJDK 以及 Sun 的 jdk1.6.0_22 进行了尝试,两者的行为都是相同的。我运行的是 Ubuntu 10.10 系统。该程序使用 JOGL(Java OpenGL),这相关吗?

日志文件大约有 400 行长,所以我认为发布整个内容可能不太有用,而且我不确定哪些部分会是什么,但如果有人能让我知道我应该包含什么,我可以做所以。

I am trying to run a Java program through Eclipse. 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. I am running an Ubuntu 10.10 system. The program uses JOGL (Java OpenGL), is that relevant?

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

苍景流年 2024-10-08 12:53:16

这看起来像是某个 C 代码中的错误。鉴于它发生在两个不同的 JVM 上,我倾向于怀疑本机扩展,也许是 JOGL。

您是否也检查过报告指出的文件:hs_err_pid2750.log?查看该内容,然后搜索其中的一些内容,通常可以向您指出其他有相同问题的人,有时甚至可以找到解决方法。

This looks like a bug in some C code somewhere. Given that it happened on two different JVMs I'd tend to suspect native extensions, perhaps JOGL.

Have you checked the file the report points you too: 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.

天邊彩虹 2024-10-08 12:53:16

如果您在 Linux 系统上使用 JOGL,那么几乎可以肯定问题就在那里。 3D 图形在大多数 Linux 系统上都不是很强大,而 JOGL 非常强调 3D 图形系统,因为它用它们做了不寻常的事情,主要与多线程有关。

大多数情况下,问题在于过时或不合格的显示驱动程序。确保您的系统具有最新的驱动程序,并使用专有的驱动程序,而不是安装时附带的驱动程序,也不是任何开源驱动程序 - 抱歉,这是一种真正向后了解硬件的情况(就像显卡提供商所做的那样)提高质量和性能。这通常可以解决问题。

如果这没有帮助,你将不得不做一些激烈的事情。通常禁用硬件图形加速可以解决这个问题,但当然会损失性能。日志文件应该为您提供完整的堆栈跟踪,如果您熟悉设备驱动程序编码并拥有驱动程序的源代码,这可能会很有用。或者尝试使用不同的显卡 - 如果您最近没有升级显卡,那么新的显卡很便宜。

我花了几个月的时间试图在一般情况下在 Linux 上运行的 JOGL 应用程序上追踪此类错误,但我仍然发现安装时窗口会显示空白。祝你好运。

If you are using JOGL on a Linux system then it is almost certain that the problem lies there. 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.

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. Good luck.

第七度阳光i 2024-10-08 12:53:16

正如其他发帖者所说,JOGL 程序中的 HotSpot 错误通常可以通过将显卡驱动程序更新到最新版本来修复。

但是,如果您使用新的 JOGL 2.0 beta,问题可能是您没有调用 GLProfile.initSingleton(),或者您没有足够早地调用它(它必须在任何 X Windows 调用之前) 。

我在 http://wadeawalker.wordpress.com/2010/10/09/tutorial-a-cross-platform-workbench-program-using-java-opengl-and-eclipse/展示如何创建一个简单的 JOGL 2.0 程序。我已经在 CentOS 5.4 上测试了这个程序,它运行正常。在我将 GLProfile.initSingleton() 放在本教程中的正确位置之前,我看到了与您相同的 SIGSEGV 错误。

As other posters have said, HotSpot errors in JOGL programs can often be fixed by updating your graphics card drivers to the latest version.

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).

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. I've tested this program on CentOS 5.4 and it works correctly. Back before I had GLProfile.initSingleton() in the right place in this tutorial, I saw the same SIGSEGV error as you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文