jogl demos fail -- Failed to created/initialize EGL display...

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

jogl demos fail -- Failed to created/initialize EGL display...

Jarvis
I am trying to get the V1.0.6 of this program to work: https://github.com/winder/Universal-G-Code-Sender  The program includes a 3D rendering window using jogl bindings.  Every time I launch that window, I get a very long error report,  and the window never pops up.  In trying to debug, I tried several demos at this page: https://jogamp.org/deployment/jogamp-current/jogl-test-applets.html  e.g. https://jogamp.org/deployment/jogamp-current/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html 
https://jogamp.org/deployment/jogamp-current/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html

They all fail with following error:
     javax.media.opengl.GLException: Failed to created/initialize EGL display incl. fallback default: native 0x0, error 0x3001/0x3000

I have probably tried 5-6 different apps/ jar files, and they all produce this same error.  Any suggestions?

Here is a complete error log from the main program of interest:

[JarClassLoader] INFO:  setProperties(com.simontuffs.onejar.JarClassLoader@7f21c5df)
[JarClassLoader] INFO:  oneJarPath=file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar
[Boot] INFO:  using JarClassLoader: com.simontuffs.onejar.JarClassLoader
[JarClassLoader] INFO:  oneJarPath=file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar
Apr 01, 2013 11:43:11 AM com.willwinder.universalgcodesender.SettingsFactory <clinit>
INFO: Settings file location: /home/jarvis/.UniversalGcodeSender.properties
Apr 01, 2013 11:43:11 AM com.willwinder.universalgcodesender.SettingsFactory loadSettings
INFO: Load settings
[JarClassLoader] INFO:  findResource() found: "com/willwinder/universalgcodesender/images/refresh.gif" for caller null in codebase main/main.jar
Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
[JarClassLoader] INFO:  findResource() found: "com/jogamp/common/os/Platform.class" for caller null in codebase lib/gluegen-rt.jar
Catched FileNotFoundException: JAR entry lib/gluegen-rt-natives-linux-amd64.jar!/ not found in /home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar, while TempJarCache.bootstrapNativeLib() of jar:file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/gluegen-rt-natives-linux-amd64.jar!/ (file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/ + gluegen-rt-natives-linux-amd64.jar)
[JarClassLoader] INFO:  findResource() found: "jogamp/nativewindow/NWJNILibLoader.class" for caller null in codebase lib/jogl-all.jar
Catched FileNotFoundException: JAR entry lib/jogl-all-natives-linux-amd64.jar!/ not found in /home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar, while addNativeJarLibsImpl(classFromJavaJar class jogamp.nativewindow.NWJNILibLoader, classJarURL jar:file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/jogl-all.jar!/jogamp/nativewindow/NWJNILibLoader.class, nativeJarBaseName jogl-all): jogl-all-natives-linux-amd64.jar + file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/ -> jar:file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/jogl-all-natives-linux-amd64.jar!/
[JarClassLoader] INFO:  findResource() found: "jogamp/nativewindow/NWJNILibLoader.class" for caller null in codebase lib/jogl-all.jar
Catched IOException: TempJarCache: addNativeLibs: jar:file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/jogl-all-natives-linux-amd64.jar!/, previous load attempt failed, while addNativeJarLibsImpl(classFromJavaJar class jogamp.nativewindow.NWJNILibLoader, classJarURL jar:file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/jogl-all.jar!/jogamp/nativewindow/NWJNILibLoader.class, nativeJarBaseName jogl-all): jogl-all-natives-linux-amd64.jar + file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/ -> jar:file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/jogl-all-natives-linux-amd64.jar!/
[JarClassLoader] INFO:  findResource() found: "jogamp/nativewindow/NWJNILibLoader.class" for caller null in codebase lib/jogl-all.jar
Catched IOException: TempJarCache: addNativeLibs: jar:file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/jogl-all-natives-linux-amd64.jar!/, previous load attempt failed, while addNativeJarLibsImpl(classFromJavaJar class jogamp.nativewindow.NWJNILibLoader, classJarURL jar:file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/jogl-all.jar!/jogamp/nativewindow/NWJNILibLoader.class, nativeJarBaseName jogl-all): jogl-all-natives-linux-amd64.jar + file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/ -> jar:file:/home/jarvis/Dropbox/CNC/programs/universal-g-code-sender/UniversalGcodeSender.jar!/lib/jogl-all-natives-linux-amd64.jar!/
libEGL Warning: Could not open egl_softpipe.so (egl_softpipe.so: cannot open shared object file: No such file or directory)
Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Failed to created/initialize EGL display incl. fallback default: native 0x0, error 0x3001/0x3000
        at jogamp.opengl.egl.EGLDisplayUtil.eglGetDisplayAndInitialize(EGLDisplayUtil.java:177)
        at jogamp.opengl.egl.EGLDisplayUtil$1.eglGetAndInitDisplay(EGLDisplayUtil.java:208)
        at com.jogamp.nativewindow.egl.EGLGraphicsDevice.open(EGLGraphicsDevice.java:95)
        at jogamp.opengl.egl.EGLDisplayUtil.eglCreateEGLGraphicsDevice(EGLDisplayUtil.java:225)
        at jogamp.opengl.egl.EGLDrawableFactory.<init>(EGLDrawableFactory.java:191)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:171)
        at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:193)
        at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:213)
        at com.jogamp.common.util.ReflectionUtil.createInstance(ReflectionUtil.java:235)
        at javax.media.opengl.GLDrawableFactory.initSingletonImpl(GLDrawableFactory.java:191)
        at javax.media.opengl.GLDrawableFactory.initSingleton(GLDrawableFactory.java:141)
        at javax.media.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1396)
        at javax.media.opengl.GLProfile.access$100(GLProfile.java:76)
        at javax.media.opengl.GLProfile$1.run(GLProfile.java:157)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.media.opengl.GLProfile.initSingleton(GLProfile.java:123)
        at javax.media.opengl.GLProfile.getDefaultDevice(GLProfile.java:1660)
        at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:246)
        at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:196)
        at javax.media.opengl.awt.GLCanvas.<init>(GLCanvas.java:186)
        at com.willwinder.universalgcodesender.visualizer.VisualizerCanvas.<init>(VisualizerCanvas.java:113)
        at com.willwinder.universalgcodesender.visualizer.VisualizerWindow.<init>(VisualizerWindow.java:61)
        at com.willwinder.universalgcodesender.MainWindow.visualizeButtonActionPerformed(MainWindow.java:1187)
        at com.willwinder.universalgcodesender.MainWindow.access$700(MainWindow.java:62)
        at com.willwinder.universalgcodesender.MainWindow$9.actionPerformed(MainWindow.java:336)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
        at java.awt.Component.processMouseEvent(Component.java:6505)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
        at java.awt.Component.processEvent(Component.java:6270)
        at java.awt.Container.processEvent(Container.java:2229)
        at java.awt.Component.dispatchEventImpl(Component.java:4861)
        at java.awt.Container.dispatchEventImpl(Container.java:2287)
        at java.awt.Component.dispatchEvent(Component.java:4687)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
        at java.awt.Container.dispatchEventImpl(Container.java:2273)
        at java.awt.Window.dispatchEventImpl(Window.java:2719)
        at java.awt.Component.dispatchEvent(Component.java:4687)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
        at java.awt.EventQueue.access$200(EventQueue.java:103)
        at java.awt.EventQueue$3.run(EventQueue.java:688)
        at java.awt.EventQueue$3.run(EventQueue.java:686)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
        at java.awt.EventQueue$4.run(EventQueue.java:702)
        at java.awt.EventQueue$4.run(EventQueue.java:700)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
X11Util.closePendingDisplayConnections(): Closed 0 pending display connections
Apr 01, 2013 11:43:28 AM com.willwinder.universalgcodesender.SettingsFactory saveSettings
INFO: Save settings
Reply | Threaded
Open this post in threaded view
|

Re: jogl demos fail -- Failed to created/initialize EGL display...

gouessej
Administrator
Hi

Please use all debug flags and put all logs into a new bug report as it is explained here:
http://jogamp.org/wiki/index.php/Jogl_FAQ#Bugreports_.26_Testing

These more complete logs would be very helpful to fix this bug. Thank you for your feedback.

Edit.: The JAR containing the native libraries hasn't been found in your case.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: jogl demos fail -- Failed to created/initialize EGL display...

Xerxes Rånby
In reply to this post by Jarvis
Jarvis wrote
They all fail with following error:
     javax.media.opengl.GLException: Failed to created/initialize EGL display incl. fallback default: native 0x0, error 0x3001/0x3000
...
libEGL Warning: Could not open egl_softpipe.so (egl_softpipe.so: cannot open shared object file: No such file or directory)
This sounds similar to an old report:
http://forum.jogamp.org/Another-java-lang-NoClassDefFoundError-td1456525.html
Check that you do not have some old jogl*.jar copy stuck inside the jvm ext directory.
Reply | Threaded
Open this post in threaded view
|

Re: jogl demos fail -- Failed to created/initialize EGL display...

Xerxes Rånby
Jarvis wrote
They all fail with following error:
     javax.media.opengl.GLException: Failed to created/initialize EGL display incl. fallback default: native 0x0, error 0x3001/0x3000
...
libEGL Warning: Could not open egl_softpipe.so (egl_softpipe.so: cannot open shared object file: No such file or directory)
egl_softpipe.so is a CPU software fallback OpenGL ES driver provided by the Mesa. Check that you have the right OpenGL driver package installed from your distribution.
Reply | Threaded
Open this post in threaded view
|

Re: jogl demos fail -- Failed to created/initialize EGL display...

Sven Gothel
Administrator
In reply to this post by Jarvis
On 04/02/2013 01:06 AM, Jarvis [via jogamp] wrote:

> I am trying to get the V1.0.6 of this program to work:
> https://github.com/winder/Universal-G-Code-Sender  The program includes a 3D
> rendering window using jogl bindings.  Every time I launch that window, I get
> a very long error report,  and the window never pops up.  In trying to debug,
> I tried several demos at this page:
> https://jogamp.org/deployment/jogamp-current/jogl-test-applets.html  e.g.
> https://jogamp.org/deployment/jogamp-current/jogl-applet-runner-newt-ElektronenMultiplizierer-napplet.html 
>
> https://jogamp.org/deployment/jogamp-current/jogl-applet-runner-newt-GraphUISceneDemo01-napplet.html
>
> They all fail with following error:
>      javax.media.opengl.GLException: Failed to created/initialize EGL display
> incl. fallback default: native 0x0, error 0x3001/0x3000
EGLDisplayUtil.eglInitialize -> EGL_NOT_INITIALIZED

->  libEGL Warning: Could not open egl_softpipe.so (egl_softpipe.so:
    cannot open shared object file: No such file or directory)

probably misconfiguration of Mesa/EGL.

However, this exception is [now] being catched
and operation should continue w/o EGL/ES availability.

Please test w/ one of our latest aggregated builds,
i.e.  http://jogamp.org/wiki/index.php/Jogamp_Versioning_and_Releases#Latest_Aggregated_Autobuild

~Sven


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jogl demos fail -- Failed to created/initialize EGL display...

Jarvis
It definitely seems that this is a Mesa/EGL problem, but I really don't know what to do about it.  On Ubuntu 12.04, they offer the package "libegl1-mesa" with the following description:

"This package contains the EGL native platform graphics interface library.
 EGL provides a platform-agnostic mechanism for creating rendering surfaces
 for use with other graphics libraries, such as OpenGL|ES and OpenVG."  

I definitely have that installed.  According to https://help.ubuntu.com/community/RadeonDriver this page, I have OpenGL/ 3D hardware acceleration enabled.  

Following the suggestion of @Sven_Gothel, I downloaded the most recent aggregated build of jogamp.  I then replaced all of the jogl/gluegen *.jar files in the project I am working on, and rebuilt a new jar file for the project.  Unfortunately, I am stuck with the same error.

What is the next step? Follow @gouessej suggestion and file a bug report?
Reply | Threaded
Open this post in threaded view
|

Re: jogl demos fail -- Failed to created/initialize EGL display...

Sven Gothel
Administrator
On 04/03/2013 04:24 PM, Jarvis [via jogamp] wrote:

> It definitely seems that this is a Mesa/EGL problem, but I really don't know
> what to do about it.  On Ubuntu 12.04, they offer the package "libegl1-mesa"
> with the following description:
>
> "This package contains the EGL native platform graphics interface library.
>  EGL provides a platform-agnostic mechanism for creating rendering surfaces
>  for use with other graphics libraries, such as OpenGL|ES and OpenVG."  
>
> I definitely have that installed.  According to
> https://help.ubuntu.com/community/RadeonDriver this page, I have OpenGL/ 3D
> hardware acceleration enabled.  
>
> Following the suggestion of @Sven_Gothel, I downloaded the most recent
> aggregated build of jogamp.  I then replaced all of the jogl/gluegen *.jar
> files in the project I am working on, and rebuilt a new jar file for the
> project.  Unfortunately, I am stuck with the same error.
Fascinating, since we catch that exception .. hmm.
Ofc you see it in case DEBUG flags are enabled,
but application should proceed operation.

Try property 'jogl.disable.opengles', i.e. -Djogl.disable.opengles
to disable EGL/ES detection completly.

Please provide both DEBUG log files w/ latest JOGL,
i.e. -Djogl.debug=all -Dnativewindow.debug=all
w/ and w/o that EGL/ES disabling above.

>
> What is the next step? Follow @gouessej suggestion and file a bug report?

Yes, you might dump and attach all this to our bugzilla - thank you!

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jogl demos fail -- Failed to created/initialize EGL display...

Jarvis
In reply to this post by Xerxes Rånby
Attempting to follow @Xerxes suggestion:

I also tried removing all versions of system packages that included jogl/gluegen *.jar and *.so files, with the same results.  Then I reinstalled all of the packages with the same results.  I cleared all cache files in ~/.jnlp-applet/.  I ran javaws and cleared all cached resources.

None of these things helped the situation.
Reply | Threaded
Open this post in threaded view
|

Re: jogl demos fail -- Failed to created/initialize EGL display...

Jarvis
In reply to this post by Sven Gothel
It seems you are definitely onto something.  In Netbeans, in my project properties, under the Run section, if I have the VM options set to "-Xmx256m -Djava.library.path=/usr/lib/jni/ -Djogl.disable.opengles" I get an exception thrown, but the visualization window pops up and works.  If I remove the -Djogl.disable.opengles then it does not work.  However, this is true with both versions of the jogle/gluegen libs.  

I went ahead and opened a bug report on bugzilla, and provided the log files with and without the OpenGLES support.  https://jogamp.org/bugzilla/show_bug.cgi?id=713
Reply | Threaded
Open this post in threaded view
|

Re: jogl demos fail -- Failed to created/initialize EGL display...

Sven Gothel
Administrator
On 04/03/2013 07:03 PM, Jarvis [via jogamp] wrote:

> It seems you are definitely onto something.  In Netbeans, in my project
> properties, under the Run section, if I have the VM options set to "-Xmx256m
> -Djava.library.path=/usr/lib/jni/ -Djogl.disable.opengles" I get an exception
> thrown, but the visualization window pops up and works.  If I remove the
> -Djogl.disable.opengles then it does not work.  However, this is true with
> both versions of the jogle/gluegen libs.  
>
> I went ahead and opened a bug report on bugzilla, and provided the log files
> with and without the OpenGLES support.
>  https://jogamp.org/bugzilla/show_bug.cgi?id=713
Thank you.

Note: You don't need to have -Djava.library.path=/usr/lib/jni/,
since we load the native libraries on our own.

~Sven



signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jogl demos fail -- Failed to created/initialize EGL display...

Jarvis
You are correct, that switch was actually to allow the loading of librxtxSerial.so.  This project is  probably a bit complicated  for a debugging situation,  but I'll blame that on my complete lack of Java knowledge.

Thanks for all of the help!