JogAmp JOGL angelesgl2es1 applet fails to initialize using Avian

142 views
Skip to first unread message

Xerxes Rånby

unread,
Nov 14, 2012, 8:31:31 AM11/14/12
to av...@googlegroups.com
Testcase:
chromium-browser http://jogamp.org/deployment/jogamp-current/jogl-demos/jogl-newt-applet-runner-angelesgl2es1.html
or
firefox http://jogamp.org/deployment/jogamp-current/jogl-demos/jogl-newt-applet-runner-angelesgl2es1.html

OS: Ubuntu 12.10 32bit armhf
Machine: Toshiba AC100-10D
IcedTea-Version: 1.3
OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-1ubuntu1)
Chromium: 22.0.1229.94 (Developer Build 161065) Ubuntu 12.10

Output:
chromium-browser http://jogamp.org/deployment/jogamp-current/jogl-demos/jogl-newt-applet-runner-angelesgl2es1.html
[1:1:12282100112:ERROR:nss_util.cc(692)] Failed to load NSS libraries.
[4:4:12283503294:ERROR:nss_util.cc(452)] Error initializing NSS without a persistent database: libsoftokn3.so: cannot open shared object file: Permission denied
[3597:3597:12283903134:ERROR:gl_surface_glx.cc(57)] glxQueryVersion failed
[3597:3597:12283903357:ERROR:gl_surface_linux.cc(58)] GLSurfaceGLX::InitializeOneOff failed.
[8:8:12286406288:ERROR:nss_util.cc(452)] Error initializing NSS without a persistent database: libsoftokn3.so: cannot open shared object file: Permission denied
java version "1.7.0_07"
OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-1ubuntu1)
Avian (build 0.6, package 0.6+20121011-1)
[12:12:12297546326:ERROR:nss_util.cc(452)] Error initializing NSS without a persistent database: libsoftokn3.so: cannot open shared object file: Permission denied
Unable to use Firefox's proxy settings. Using "DIRECT" as proxy type.
[16:16:12304206371:ERROR:nss_util.cc(452)] Error initializing NSS without a persistent database: libsoftokn3.so: cannot open shared object file: Permission denied
[3562:3562:12304533536:ERROR:x11_util.cc(1274)] X Error detected: serial 9197, error_code 10 (BadAccess (attempt to access private resource denied)), request_code 130, minor_code 1 (X_ShmAttach)
[3562:3562:12304758100:ERROR:x11_util.cc(1274)] X Error detected: serial 9198, error_code 128 (BadShmSeg (invalid shared segment parameter)), request_code 130, minor_code 5 (X_ShmCreatePixmap)
[3562:3562:12304762958:ERROR:x11_util.cc(1274)] X Error detected: serial 9199, error_code 9 (BadDrawable (invalid Pixmap or Window parameter)), request_code 139, minor_code 4 (RenderCreatePicture)
[3562:3562:12304769725:ERROR:x11_util.cc(1274)] X Error detected: serial 9200, error_code 143 (RenderBadPicture (invalid Picture parameter)), request_code 139, minor_code 8 (RenderComposite)
[3562:3562:12304793798:ERROR:x11_util.cc(1274)] X Error detected: serial 9206, error_code 128 (BadShmSeg (invalid shared segment parameter)), request_code 130, minor_code 2 (X_ShmDetach)
[3562:3562:12304797260:ERROR:x11_util.cc(1274)] X Error detected: serial 9207, error_code 143 (RenderBadPicture (invalid Picture parameter)), request_code 139, minor_code 7 (RenderFreePicture)
[3562:3562:12304797505:ERROR:x11_util.cc(1274)] X Error detected: serial 9208, error_code 4 (BadPixmap (invalid Pixmap parameter)), request_code 54, minor_code 0 (X_FreePixmap)
JAR http://jogamp.org/deployment/jogamp-current/jogl-demos/jar/jogl-demos-util.jar not found. Continuing.
JAR http://jogamp.org/deployment/jogamp-current/jogl-demos/jar/jogl-demos.jar not found. Continuing.
JAR http://jogamp.org/deployment/jogamp-current/jar/jogl-all.jar not found. Continuing.
JAR http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt.jar not found. Continuing.
netx: Initialization Error: Could not initialize applet. (com.jogamp.newt.awt.applet.JOGLNewtApplet1Run)
netx: Initialization Error: Could not initialize applet. (com.jogamp.newt.awt.applet.JOGLNewtApplet1Run)
net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize applet. 
        at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:735)
        at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676)
        at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886)
Caused by: java.lang.ClassNotFoundException: com.jogamp.newt.awt.applet.JOGLNewtApplet1Run
        at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:1609)
        at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:725)
        ... 2 more
java.lang.NullPointerException
        at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:154)
        at sun.applet.AppletPanel.run(AppletPanel.java:379)
        at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
        at sun.applet.AppletPanel.run(AppletPanel.java:429)
        at java.lang.Thread.run(Unknown Source)


This bug is similar to:
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1218
Currently only OpenJDK + JamVM is able to run this applet in combination with IcedTea-web across platforms.


Joel Dice

unread,
Dec 17, 2012, 7:06:15 PM12/17/12
to av...@googlegroups.com, xerxes...@gmail.com
Hi Xerxes,

Sorry for the delay in responding to this.

On Wed, 14 Nov 2012, Xerxes Rï¿œnby wrote:

> chromium-browser http://jogamp.org/deployment/jogamp-current/jogl-demos/jogl
> -newt-applet-runner-angelesgl2es1.html

<snip>

> net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not
> initialize applet.
> at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:735)
> at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676)
> at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886)
> Caused by: java.lang.ClassNotFoundException: com.jogamp.newt.awt.applet.JOGL
> NewtApplet1Run
> at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassL
> oader.java:1609)
> at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:725)
> ... 2 more
> java.lang.NullPointerException
> at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:154)
> at sun.applet.AppletPanel.run(AppletPanel.java:379)
> at java.lang.Thread.run(Unknown Source)
> java.lang.NullPointerException
> at sun.applet.AppletPanel.run(AppletPanel.java:429)
> at java.lang.Thread.run(Unknown Source)

I ran this on my Ubuntu 12.10 x86_32 machine and got a different kind of
failure, which I tracked down to this:

java/lang/UnsatisfiedLinkError: no gluegen-rt in java.library.path
at java/lang/ClassLoader.loadLibrary (line 1856)
at java/lang/Runtime.loadLibrary0 (line 845)
at java/lang/System.loadLibrary (line 1084)
at com/jogamp/common/jvm/JNILibLoaderBase.loadLibraryInternal (line 442)
at com/jogamp/common/jvm/JNILibLoaderBase.access$000 (line 59)
at com/jogamp/common/jvm/JNILibLoaderBase$DefaultAction.loadLibrary
(line 90)
at com/jogamp/common/jvm/JNILibLoaderBase.loadLibrary (line 328)
at
com/jogamp/common/os/DynamicLibraryBundle$GlueJNILibLoader.loadLibrary
(line 390)
at com/jogamp/common/os/Platform.loadGlueGenRTImpl (line 251)
at com/jogamp/common/os/Platform.access$000 (line 57)
at com/jogamp/common/os/Platform$1.run (line 186)
at com/jogamp/common/os/Platform$1.run (line 183)
at java/security/AccessController.doPrivileged (native)
at com/jogamp/common/os/Platform.<clinit> (line 183)
at javax/media/nativewindow/NativeWindowFactory.initSingleton (line 226)
at javax/media/opengl/GLProfile.initProfilesForDefaultDevices (line
1368)
at javax/media/opengl/GLProfile.access$100 (line 76)
at javax/media/opengl/GLProfile$1.run (line 157)
at java/security/AccessController.doPrivileged (native)
at javax/media/opengl/GLProfile.initSingleton (line 123)
at javax/media/opengl/GLProfile.getProfileMap (line 1857)
at javax/media/opengl/GLProfile.get (line 768)
at javax/media/opengl/GLProfile.get (line 784)
at com/jogamp/newt/awt/applet/JOGLNewtApplet1Run.init (line 179)
at sun/applet/AppletPanel.run (line 435)
at java/lang/Thread.run (line 722)

Do you know enough about this code to comment on how the native
code library named gluegen-rt is supposed to be loaded in the context of
an applet? Is it downloaded and placed on the filesystem somehow?

I'm afraid I don't have a lot of time to debug this myself, so if you can
help me understand exactly what you think Avian (and also HotSpot,
apparently) is doing wrong, I'd appreciate it.

Xerxes Rånby

unread,
Dec 18, 2012, 10:04:30 AM12/18/12
to av...@googlegroups.com, xerxes...@gmail.com
 
On Tuesday, December 18, 2012 1:06:15 AM UTC+1, Joel Dice wrote:
On Wed, 14 Nov 2012, Xerxes Rï¿œnby wrote:

> chromium-browser http://jogamp.org/deployment/jogamp-current/jogl-demos/jogl
> -newt-applet-runner-angelesgl2es1.html

<snip>

> net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not
>  initialize applet.
>         at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:735)
>         at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676)
>         at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886)
> Caused by: java.lang.ClassNotFoundException: com.jogamp.newt.awt.applet.JOGL
> NewtApplet1Run
...


I ran this on my Ubuntu 12.10 x86_32 machine and got a different kind of
failure, which I tracked down to this:

java/lang/UnsatisfiedLinkError: no gluegen-rt in java.library.path
...


Do you know enough about this code to comment on how the native
code library named gluegen-rt is supposed to be loaded in the context of
an applet?  Is it downloaded and placed on the filesystem somehow?


gluegen-rt.jar downloads gluegen-rt-natives-linux-i586.jar and extracts it inside a temp dir /tmp/someautoenerated path and then loads the libgluegen-rt.so from there.

 

I'm afraid I don't have a lot of time to debug this myself, so if you can
help me understand exactly what you think Avian (and also HotSpot,
apparently) is doing wrong, I'd appreciate it.


There is two bugs at once here...

Bug/Issue A) The security model in IcedTea-web 1.4 is different compared to oracles proprietary java plugin .
JogAmp uses a mixed modecombination of signed gluegen-rt.jar and jogl-all.jar in combination with one unsigned end user application found in jogl-demos.jar
This mixed signed jar mode is supported by oracles proprietary java plugin.
The IcedTea-web 1.4 release do not support mixed signed and unsigned jars and drops all privileges.
After looking at this issue i think Avian and Hotspot here do the right thing since that is what the icedtea-web code tells it to do when it find unsigned and signed jars in the same application.
The next release of IcedTea-web that got a new security model implementation that allows use of unsigned jars in combination with signed library jars.

Bug B) Avian still fails to run the application standalone from local filesytem execution unless -Djava.awt.headless=ture is passed:
This is a much simpler to reproduce test-case, this test pass using Hotspot but fail using Avian:

Testcase (~6mb download):
mkdir angeles
cd angeles
wget http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt.jar
wget http://jogamp.org/deployment/jogamp-current/jar/jogl-all.jar
#download natives for your platform, below will support AMD/Intel and ARM Linux systems.
wget http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-linux-i586.jar
wget http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-linux-i586.jar
wget http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-linux-amd64.jar
wget http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-linux-amd64.jar
wget http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-linux-armv6.jar
wget http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-linux-armv6.jar
wget http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-linux-armv6hf.jar
wget http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-linux-armv6hf.jar
#download the demo
wget http://jogamp.org/deployment/jogamp-current/jogl-demos/jar/jogl-demos.jar
#Now run the angeles demo testcase from command line
java -avian -cp jogl-demos.jar:jogl-all.jar:gluegen-rt.jar demos.es1.angeles.Main

#Avian quits early in this test.

On my machine i can get avian to run by passing:
#-Djava.awt.headless=true
#this makes the test pass
java -avian -Djava.awt.headless=true -cp jogl-demos.jar:jogl-all.jar:gluegen-rt.jar demos.es1.angeles.Main


 

Joel Dice

unread,
Dec 20, 2012, 2:43:17 PM12/20/12
to av...@googlegroups.com, xerxes...@gmail.com
On Tue, 18 Dec 2012, Xerxes R�nby wrote:

> #Now run the angeles demo testcase from command line
> java -avian -cp jogl-demos.jar:jogl-all.jar:gluegen-rt.jar
> demos.es1.angeles.Main
>
> #Avian quits early in this test.
>
> On my machine i can get avian to run by passing:
> #-Djava.awt.headless=true
> #this makes the test pass
> java -avian -Djava.awt.headless=true -cp
> jogl-demos.jar:jogl-all.jar:gluegen-rt.jar demos.es1.angeles.Main

Thanks for the clarification. This should fix the AWT issue:

https://github.com/ReadyTalk/avian/commit/9f22a701cc26b68a597e78faf652124fab25fec9

The test case runs now, but it crashes pretty quickly. It looks like it
might be the glDrawArrays bug we discussed earlier
(https://groups.google.com/group/avian/msg/c46ca2af824b0152),
but I haven't spent a lot of time investigating it.

Steven Lee

unread,
Feb 4, 2013, 10:36:27 PM2/4/13
to av...@googlegroups.com, xerxes...@gmail.com
through the source code of src/classpath-openjdk.cpp,

#  ifndef PLATFORM_WINDOWS
    loadLibrary(t, libraryPath, "mawt", true, true);
#  endif

seems it does not support windows platform.

Joel Dice

unread,
Feb 6, 2013, 10:56:17 AM2/6/13
to av...@googlegroups.com, xerxes...@gmail.com
On Mon, 4 Feb 2013, Steven Lee wrote:

> through the source code of�src/classpath-openjdk.cpp,
> # �ifndef PLATFORM_WINDOWS
> � � loadLibrary(t, libraryPath, "mawt", true, true);
> # �endif
>
> seems it does not support windows platform.

libmawt is specific to X11 and thus POSIX OSes such as Linux. It is not
available or needed on on Windows.
Reply all
Reply to author
Forward
0 new messages