EGLGLXDrawableFactory JVM crash (x11 display)

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

EGLGLXDrawableFactory JVM crash (x11 display)

Jean-Luc
Hello,

I have a problem using JOGL.
When I run my JOGL application in remote, it crashes the JVM with the output below. I'm using jogamp 2.3.2. The application runs flawlessly in local. I let JOGL using its natives lib embedded in JAR files. The crashes happens when the GLJPanel is created. How can I avoid this crash, I tried to caught GLException but without success ?
Note: glxgears is working fine in remote...

Thanks for help

[code]
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

Caught handled GLException: EGLGLXDrawableFactory - Could not initialize shared resources for EGLGraphicsDevice[type .egl, v0.0.0, connection localhost:13.0, unitID 0, handle 0x0, owner true, ResourceToolkitLock[obj 0x171bf1a6, isOwner true, <52196d21, 532d689e>[count 1, qsz 0, owner <AWT-EventQueue-0-SharedResourceRunner>]]] on thread AWT-EventQueue-0-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:518)
    [1]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [2]: java.lang.Thread.run(Thread.java:745)
Caused[0] by GLException: Failed to created/initialize EGL display incl. fallback default: native 0x0, error 0x3001/0x3001 on thread AWT-EventQueue-0-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDisplayUtil.eglGetDisplayAndInitialize(EGLDisplayUtil.java:297)
    [1]: jogamp.opengl.egl.EGLDisplayUtil.access$300(EGLDisplayUtil.java:58)
    [2]: jogamp.opengl.egl.EGLDisplayUtil$1.eglGetAndInitDisplay(EGLDisplayUtil.java:320)
    [3]: com.jogamp.nativewindow.egl.EGLGraphicsDevice.open(EGLGraphicsDevice.java:125)
    [4]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createEGLSharedResourceImpl(EGLDrawableFactory.java:532)
    [5]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:516)
    [6]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [7]: java.lang.Thread.run(Thread.java:745)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000000000000000, pid=3636, tid=139982728836864
#
# JRE version: Java(TM) SE Runtime Environment (8.0_91-b14) (build 1.8.0_91-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.91-b14 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  0x0000000000000000
#
# Core dump written. Default location: /mntdirect/_users//core or core.3636
#
# An error report file with more information is saved as:
# /mntdirect/_users//hs_err_pid3636.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
[/code]
Reply | Threaded
Open this post in threaded view
|

Re: EGLGLXDrawableFactory JVM crash (x11 display)

gouessej
Administrator
Hi

Please be more accurate. Why do you mean by "in remote"? Do you reproduce this bug when you replace GLJPanel with AWT GLCanvas or NEWT GLWindow? Please post the logs somewhere.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: EGLGLXDrawableFactory JVM crash (x11 display)

Jean-Luc
In reply to this post by Jean-Luc
Thanks for your answer.
Yes It works better with the GLCanvas (local and remote) but I got few rendering problems with it, it does not behave exactly as GLJPanel. By remote, I mean from an other other host through a ssh -X connection, by local I mean DISPLAY=localhost:0.0.
Reply | Threaded
Open this post in threaded view
|

Re: EGLGLXDrawableFactory JVM crash (x11 display)

gouessej
Administrator
Thank you for the feedback but if you don't give us a mean of reproducing your bug, we won't be able to help you. We need the content of your log file /mntdirect/_users//hs_err_pid3636.log
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: EGLGLXDrawableFactory JVM crash (x11 display)

Jean-Luc
Reply | Threaded
Open this post in threaded view
|

Re: EGLGLXDrawableFactory JVM crash (x11 display)

gouessej
Administrator
The crash happens when initializing EGL in /usr/lib/x86_64-linux-gnu/libEGL.so.1 Is there anything you can do on your side to avoid it?

"final static GLU glu = new GLU();"
Don't do that, rather call GLU.createGLU(GL) in GLEventListener.init(GLAutoDrawable). You might get an UnsupportedOperationException by using a very general GLU instance instead of a specialized one.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: EGLGLXDrawableFactory JVM crash (x11 display)

Jean-Luc
Thanks for your support.

I manage to make the application work on a host with this configuration:
ll /usr/lib/x86_64-linux-gnu/libEGL.so.1.0.0
-rw-r--r-- 1 root root 173144 Aug 19  2015 /usr/lib/x86_64-linux-gnu/libEGL.so.1.0.0

And on this host, it fails:
ll /usr/lib/x86_64-linux-gnu/libEGL.so.1
lrwxrwxrwx 1 root root 51 Apr  5  2016 /usr/lib/x86_64-linux-gnu/libEGL.so.1 -> /etc/alternatives/glx--libEGL.so.1-x86_64-linux-gnu

So it seems it comes from my side, I'll try to update this libEGL.so.1

Anyway, I switched to GLCanvas which seems to have better performance and I fixed my rendering problems by using TextRenderer (instead of Java2D). I also used GLU.createGLU(GL) instead of the static initialisation.

It works fine now !

Thanks again.
Reply | Threaded
Open this post in threaded view
|

Re: EGLGLXDrawableFactory JVM crash (x11 display)

gouessej
Administrator
Thank you for the feedback.

The legacy text renderer heavily relies on the fixed pipeline but it should be enough for you as the rest of your code does the same. You can use com.jogamp.opengl.util.awt.Overlay to mix Java2D rendering with JOGL rendering.
Julien Gouesse | Personal blog | Website