JOGL 2.4 and Java 17 report

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

JOGL 2.4 and Java 17 report

Martin
This post was updated on .
Hi,

I have been able to run JOGL-2.4.0-rc4 (i.e. 2021-01-11 + support for Apple Silicon chip, available on Maven) as is on Java 17 (so without recompiling JOGL+Gluegen).

I verified this by running all unit and integration tests of Jzy3D which mainly use AWT and here are my results :

- Windows 10 is OK, as long as one adds the add-export options that Julien already mentioned on bugzilla.
- Ubuntu 20 is OK
- Ubuntu 18 is failing to load native lib (as reported by Julien - I also encountered the same problem with JOGL 2.3.2 on Ubuntu 18)
- macOS 11 + Silicon chip is OK despite a warning about AppContext (Caught AppContextInfo(Bug 1004) IllegalAccessException: class com.jogamp.nativewindow.awt.AppContextInfo cannot access class sun.awt.AppContext...). The --illegal-access=permit; support was removed in 17.0 so it has no effect but it does not prevent my AWT application to run.
- macOS 10 + Intel Iris GPU is OK, same warning as above.
- macOS 10 + NVidia GPU is OK, same warning as above.

I encountered crashes when using Newt in AWT, but Alexis reported that Newt is working good for SWT.

These tests are not exhaustive. I wanted to run JOGL unit tests on Java 17 so I built gluegen and jogl with Azul OpenJDK for macOS 11 + Silicon. I have then been able to compile Gluegen and JOGL. Gluegen tests are all passing, however I still encounter lot of JVM crashes when running JOGL unit tests as I had in the past with Java 11.

Any additional feedback on Java 17 will be appreciated here :)

Martin
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Martin
My complete test matrix is updated here



The Google spreadsheet (will soon be added to a readme on Jzy3D github repository)
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Marcel
Hello Martin,

great. Thanks for the nice overview and tests.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Alexis Drogoul
Hi Martin,

Very nice ! Question: when you talk about additional JVM flags, what are those ?

Thanks
Alexis

Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Martin
Hi Alexis,

The workaround is to use the flags mentioned here. This also fixed a problem mentioned in this post.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

sonicblow
In reply to this post by Martin
hello

i did try to use JOGL-2.4.0-rc4 with my worldwind app, but there are constantly jvm crashes on debian 5.10 and integrated video from i5-10210U

Mesa Intel(R) UHD Graphics (CML GT2)
4.6 (Compatibility Profile) Mesa 20.3.3


some version of 2.4.0 jars from worldwind github works fine (https://github.com/NASAWorldWind/WorldWindJava)




# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x0000730ec7fb6764, pid=6935, tid=6971
#
# JRE version: OpenJDK Runtime Environment (17.0.2+9) (build 17.0.2+9-LTS)
# Java VM: OpenJDK 64-Bit Server VM (17.0.2+9-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libc.so.6+0x15c764]
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   https://bell-sw.com/support
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  S U M M A R Y ------------

Command Line: -XX:MinRAMPercentage=15 -XX:MaxRAMPercentage=75 -XX:+UseGCOverheadLimit -XX:+CrashOnOutOfMemoryError -Dfile.encoding=UTF8 --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.desktop/java.awt.geom=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.beans=ALL-UNNAMED --add-opens=java.desktop/javax.swing.table=ALL-UNNAMED --add-opens=java.desktop/com.sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.swing=ALL-UNNAMED --add-opens=java.desktop/sun.font=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.synth=ALL-UNNAMED --add-opens=java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED --add-opens=java.desktop/com.sun.java.swing.plaf.gtk=ALL-UNNAMED --add-opens=java.desktop/com.apple.laf=ALL-UNNAMED 

Host: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 8 cores, 15G, Debian 5.10 x86-64
Time: Fri Jan 28 10:26:42 2022 MSK elapsed time: 47.761481 seconds (0d 0h 0m 47s)

---------------  T H R E A D  ---------------

Current thread (0x0000730eb8c04e60):  JavaThread "AWT-EventQueue-0" [_thread_in_native, id=6971, stack(0x0000730e3603b000,0x0000730e3613c000)]

Stack: [0x0000730e3603b000,0x0000730e3613c000],  sp=0x0000730e36138a28,  free space=1014k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libc.so.6+0x15c764]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 7883  jogamp.opengl.gl4.GL4bcImpl.dispatch_glReadPixels1(IIIIIILjava/lang/Object;IZJ)V (0 bytes) @ 0x0000730ea7edcc21 [0x0000730ea7edcba0+0x0000000000000081]
J 7881 c1 jogamp.opengl.gl4.GL4bcImpl.glReadPixels(IIIIIILjava/nio/Buffer;)V (121 bytes) @ 0x0000730ea1477a54 [0x0000730ea1477000+0x0000000000000a54]
J 7880 c1 gov.nasa.worldwind.render.DrawContextImpl.getPickColorAtPoint(Ljava/awt/Point;)I (177 bytes) @ 0x0000730ea1475314 [0x0000730ea1474600+0x0000000000000d14]
J 8017 c1 gov.nasa.worldwind.pick.PickSupport.getTopObject(Lgov/nasa/worldwind/render/DrawContext;Ljava/awt/Point;)Lgov/nasa/worldwind/pick/PickedObject; (53 bytes) @ 0x0000730ea14dac44 [0x0000730ea14da860+0x00000000000003e4]
J 8531 c1 gov.nasa.worldwind.terrain.SectorGeometryList.pick(Lgov/nasa/worldwind/render/DrawContext;Ljava/util/List;)Ljava/util/List; (577 bytes) @ 0x0000730ea1670e64 [0x0000730ea166f0c0+0x0000000000001da4]
j  gov.nasa.worldwind.AbstractSceneController.pickTerrain(Lgov/nasa/worldwind/render/DrawContext;)V+120
j  gov.nasa.worldwind.AbstractSceneController.pick(Lgov/nasa/worldwind/render/DrawContext;)V+26
j  gov.nasa.worldwind.BasicSceneController.doNormalRepaint(Lgov/nasa/worldwind/render/DrawContext;)V+27
j  gov.nasa.worldwind.BasicSceneController.doRepaint(Lgov/nasa/worldwind/render/DrawContext;)V+44
J 9240 c1 gov.nasa.worldwind.AbstractSceneController.repaint()I (408 bytes) @ 0x0000730ea1888504 [0x0000730ea1887f60+0x00000000000005a4]
J 9237 c1 gov.nasa.worldwind.WorldWindowGLAutoDrawable.display(Lcom/jogamp/opengl/GLAutoDrawable;)V (540 bytes) @ 0x0000730ea187bf8c [0x0000730ea187a020+0x0000000000001f6c]
J 9236 c1 jogamp.opengl.GLDrawableHelper.displayImpl(Lcom/jogamp/opengl/GLAutoDrawable;)V (86 bytes) @ 0x0000730ea187889c [0x0000730ea1878060+0x000000000000083c]
J 8961 c1 com.jogamp.opengl.awt.GLCanvas$11.run()V (122 bytes) @ 0x0000730ea17a435c [0x0000730ea17a3d60+0x00000000000005fc]
J 10430 c1 jogamp.opengl.GLDrawableHelper.invokeGLImpl(Lcom/jogamp/opengl/GLDrawable;Lcom/jogamp/opengl/GLContext;Ljava/lang/Runnable;Ljava/lang/Runnable;)V (579 bytes) @ 0x0000730ea1311084 [0x0000730ea1310560+0x0000000000000b24]
J 10429 c1 jogamp.opengl.GLDrawableHelper.invokeGL(Lcom/jogamp/opengl/GLDrawable;Lcom/jogamp/opengl/GLContext;Ljava/lang/Runnable;Ljava/lang/Runnable;)V (76 bytes) @ 0x0000730ea097287c [0x0000730ea09727c0+0x00000000000000bc]
J 10425 c1 com.jogamp.opengl.awt.GLCanvas$12.run()V (126 bytes) @ 0x0000730ea08e3954 [0x0000730ea08e3400+0x0000000000000554]
J 9235 c1 com.jogamp.opengl.awt.GLCanvas.display()V (68 bytes) @ 0x0000730ea18779b4 [0x0000730ea1877640+0x0000000000000374]
J 9233 c1 com.jogamp.opengl.awt.GLCanvas.paint(Ljava/awt/Graphics;)V (141 bytes) @ 0x0000730ea187606c [0x0000730ea1875380+0x0000000000000cec]
J 9232 c1 gov.nasa.worldwind.awt.WorldWindowGLCanvas.paint(Ljava/awt/Graphics;)V (13 bytes) @ 0x0000730ea1874e04 [0x0000730ea1874d40+0x00000000000000c4]
J 10453 c1 com.jogamp.opengl.awt.GLCanvas.update(Ljava/awt/Graphics;)V (6 bytes) @ 0x0000730ea0f1bbbc [0x0000730ea0f1bac0+0x00000000000000fc]
J 10451 c1 sun.awt.X11.XRepaintArea.updateComponent(Ljava/awt/Component;Ljava/awt/Graphics;)V java.desktop@17.0.2 (11 bytes) @ 0x0000730ea0932b7c [0x0000730ea09329c0+0x00000000000001bc]
J 9069 c1 sun.awt.RepaintArea.paint(Ljava/lang/Object;Z)V java.desktop@17.0.2 (354 bytes) @ 0x0000730ea17fffec [0x0000730ea17ff0e0+0x0000000000000f0c]
J 7812 c1 sun.awt.X11.XComponentPeer.handleEvent(Ljava/awt/AWTEvent;)V java.desktop@17.0.2 (245 bytes) @ 0x0000730ea144afac [0x0000730ea14495e0+0x00000000000019cc]
J 7438 c1 java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V java.desktop@17.0.2 (777 bytes) @ 0x0000730ea134639c [0x0000730ea1341160+0x000000000000523c]
J 9873 c2 java.awt.EventQueue$4.run()Ljava/lang/Object; java.desktop@17.0.2 (5 bytes) @ 0x0000730ea804fbcc [0x0000730ea804f6e0+0x00000000000004ec]
J 9713 c2 java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V java.desktop@17.0.2 (80 bytes) @ 0x0000730ea801cd6c [0x0000730ea801c8e0+0x000000000000048c]
J 10953 c2 java.awt.EventDispatchThread.pumpOneEventForFilters(I)V java.desktop@17.0.2 (113 bytes) @ 0x0000730ea81715e0 [0x0000730ea81711e0+0x0000000000000400]
j  java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+35 java.desktop@17.0.2
j  java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11 java.desktop@17.0.2
j  java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4 java.desktop@17.0.2
j  java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3 java.desktop@17.0.2
j  java.awt.EventDispatchThread.run()V+9 java.desktop@17.0.2
v  ~StubRoutines::call_stub

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000730dcc6de268

Register to memory mapping:

RAX=0x0000730e14d6f908 points into unknown readable memory: 0x0000730e140006c0 | c0 06 00 14 0e 73 00 00
RBX=0x0000000000000200 is an unknown value
RCX=0x0 is NULL
RDX=0x0000000000000004 is an unknown value
RSP=0x0000730e36138a28 is pointing into the stack for thread: 0x0000730eb8c04e60
RBP=0x000000000000006c is an unknown value
RSI=0x0000730dcc6de268 is an unknown value
RDI=0x0000730e14d6f908 points into unknown readable memory: 0x0000730e140006c0 | c0 06 00 14 0e 73 00 00
R8 =0x0000000000000001 is an unknown value
R9 =0x0000000000000400 is an unknown value
R10=0x0000730e14d6f8a0 points into unknown readable memory: 0x00000000b2da2033 | 33 20 da b2 00 00 00 00
R11=0x0000000000000062 is an unknown value
R12=0x000000000000006c is an unknown value
R13=0x0000730dcc6de000 is an unknown value
R14=0x000000000000006c is an unknown value
R15=0x0000730e14d6f8a0 points into unknown readable memory: 0x00000000b2da2033 | 33 20 da b2 00 00 00 00


Registers:
RAX=0x0000730e14d6f908, RBX=0x0000000000000200, RCX=0x0000000000000000, RDX=0x0000000000000004
RSP=0x0000730e36138a28, RBP=0x000000000000006c, RSI=0x0000730dcc6de268, RDI=0x0000730e14d6f908
R8 =0x0000000000000001, R9 =0x0000000000000400, R10=0x0000730e14d6f8a0, R11=0x0000000000000062
R12=0x000000000000006c, R13=0x0000730dcc6de000, R14=0x000000000000006c, R15=0x0000730e14d6f8a0
RIP=0x0000730ec7fb6764, EFLAGS=0x0000000000010246, CSGSFS=0x002b000000000033, ERR=0x0000000000000004
  TRAPNO=0x000000000000000e

Top of Stack: (sp=0x0000730e36138a28)
0x0000730e36138a28:   0000730ddeecc696 0000000000000046
0x0000730e36138a38:   0000000000000068 0000000000000000
0x0000730e36138a48:   0000730d00000400 0000000000001400
0x0000730e36138a58:   0000000000000000 0000000000000068 

Instructions: (pc=0x0000730ec7fb6764)
0x0000730ec7fb6664:   82 c7 c2 fa ff 0f 1f 80 00 00 00 00 48 89 f8 48
0x0000730ec7fb6674:   83 fa 20 0f 82 a5 00 00 00 48 83 fa 40 0f 87 08
0x0000730ec7fb6684:   01 00 00 c5 fe 6f 06 c5 fe 6f 4c 16 e0 c5 fe 7f
0x0000730ec7fb6694:   07 c5 fe 7f 4c 17 e0 c5 f8 77 c3 90 48 39 d1 0f
0x0000730ec7fb66a4:   82 87 c2 fa ff 0f 1f 80 00 00 00 00 48 89 f8 48
0x0000730ec7fb66b4:   01 d0 eb 1b 0f 1f 84 00 00 00 00 00 48 39 d1 0f
0x0000730ec7fb66c4:   82 67 c2 fa ff 0f 1f 80 00 00 00 00 48 89 f8 48
0x0000730ec7fb66d4:   83 fa 20 72 49 48 83 fa 40 0f 87 9f 00 00 00 c5
0x0000730ec7fb66e4:   fe 6f 06 c5 fe 6f 4c 16 e0 c5 fe 7f 07 c5 fe 7f
0x0000730ec7fb66f4:   4c 17 e0 c5 f8 77 c3 48 3b 15 76 3d 06 00 0f 83
0x0000730ec7fb6704:   25 01 00 00 48 39 f7 72 0f 74 12 4c 8d 0c 16 4c
0x0000730ec7fb6714:   39 cf 0f 82 c5 01 00 00 48 89 d1 f3 a4 c3 80 fa
0x0000730ec7fb6724:   10 73 17 80 fa 08 73 27 80 fa 04 73 33 80 fa 01
0x0000730ec7fb6734:   77 3b 72 05 0f b6 0e 88 0f c3 c5 fa 6f 06 c5 fa
0x0000730ec7fb6744:   6f 4c 16 f0 c5 fa 7f 07 c5 fa 7f 4c 17 f0 c3 48
0x0000730ec7fb6754:   8b 4c 16 f8 48 8b 36 48 89 4c 17 f8 48 89 37 c3
0x0000730ec7fb6764:   8b 4c 16 fc 8b 36 89 4c 17 fc 89 37 c3 0f b7 4c
0x0000730ec7fb6774:   16 fe 0f b7 36 66 89 4c 17 fe 66 89 37 c3 48 81
0x0000730ec7fb6784:   fa 00 10 00 00 0f 87 6c ff ff ff 48 81 fa 00 01
0x0000730ec7fb6794:   00 00 0f 87 91 00 00 00 48 81 fa 80 00 00 00 72
0x0000730ec7fb67a4:   5a c5 fe 6f 06 c5 fe 6f 4e 20 c5 fe 6f 56 40 c5
0x0000730ec7fb67b4:   fe 6f 5e 60 c5 fe 6f 64 16 e0 c5 fe 6f 6c 16 c0
0x0000730ec7fb67c4:   c5 fe 6f 74 16 a0 c5 fe 6f 7c 16 80 c5 fe 7f 07
0x0000730ec7fb67d4:   c5 fe 7f 4f 20 c5 fe 7f 57 40 c5 fe 7f 5f 60 c5
0x0000730ec7fb67e4:   fe 7f 64 17 e0 c5 fe 7f 6c 17 c0 c5 fe 7f 74 17
0x0000730ec7fb67f4:   a0 c5 fe 7f 7c 17 80 c5 f8 77 c3 c5 fe 6f 06 c5
0x0000730ec7fb6804:   fe 6f 4e 20 c5 fe 6f 54 16 e0 c5 fe 6f 5c 16 c0
0x0000730ec7fb6814:   c5 fe 7f 07 c5 fe 7f 4f 20 c5 fe 7f 54 17 e0 c5
0x0000730ec7fb6824:   fe 7f 5c 17 c0 c5 f8 77 c3 48 39 f7 0f 87 ab 00
0x0000730ec7fb6834:   00 00 0f 84 e5 fe ff ff c5 fe 6f 26 c5 fe 6f 6c
0x0000730ec7fb6844:   16 e0 c5 fe 6f 74 16 c0 c5 fe 6f 7c 16 a0 c5 7e
0x0000730ec7fb6854:   6f 44 16 80 49 89 fb 48 8d 4c 17 e0 49 89 f8 49 


Stack slot to memory mapping:
stack at sp + 0 slots: 0x0000730ddeecc696: <offset 0x0000000000e28696> in /usr/lib/x86_64-linux-gnu/dri/iris_dri.so at 0x0000730dde0a4000
stack at sp + 1 slots: 0x0000000000000046 is an unknown value
stack at sp + 2 slots: 0x0000000000000068 is an unknown value
stack at sp + 3 slots: 0x0 is NULL
stack at sp + 4 slots: 0x0000730d00000400 is an unknown value
stack at sp + 5 slots: 0x0000000000001400 is an unknown value
stack at sp + 6 slots: 0x0 is NULL
stack at sp + 7 slots: 0x0000000000000068 is an unknown value
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Martin
Hi,

I indeed haven't tested Debian OS.

The "working" 2.4 integration refers to a rc released in march 2020.
2.4-rc4 simply adds native lib for ARM to the rc released in january 2021.
This january 2021 release contains bug fixes visible here.

That would be interesting you try with rc-2021-01-12 to see if you get the same crash.

   
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

gouessej
Administrator
In reply to this post by sonicblow
It would be nice to indicate more accurately which release candidate of JOGL 2.4 actually works.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Marcel
This post was updated on .
In reply to this post by Martin
Hello Martin,

I successfully used the M1 RC4 built to make JOGL run on MacOSX M1 embedded as a NEWT SWT view in my application based on Eclipse RCP 4.22 (most recent version).

I have integrated WorldWind (for GIS purposes) and a self written 3d simulation interface based on OpenGL.

I detected on issue with my self written 3d interface (crash with a wrong thread information). After a while I found the cause (this is only reproducible on M1)

The crash was caused by the FPSAnimator class which I use for a dynamic content with constant framerate. I simply wrapped the called display method (called in the run method of the class):

Display display = PlatformUI.getWorkbench().getDisplay();
	display.syncExec(new Runnable() {
		public void run() {
			display();
		}
});


After this everything works fine with the JOGL RC4 built.
Maybe this information is a help for others, too.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Mabula
Hi all,

Running JOGL 2-4 with Temurin JDK 17 crashes on Linux Mint 20, 20.1, 20.2 and the latest 20.3 (only tested linux on amd64)
with the following stacktrace which is again shows a problem with native library loading when OpenGL is initialized in my application.:

Warning: Caught Exception while retrieving executable temp base directory:
java.io.IOException: Could not determine a temporary executable directory
        at com.jogamp.common.util.IOUtil.getTempDir(IOUtil.java:1336)
        at com.jogamp.common.util.cache.TempFileCache.<clinit>(TempFileCache.java:84)
        at com.jogamp.common.util.cache.TempJarCache.initSingleton(TempJarCache.java:96)
        at com.jogamp.common.os.Platform$1.run(Platform.java:313)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
        at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
        at com.ariesproductions.imageViewer.ImageViewerInitializer.init(ImageViewerInitializer.java:117)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.initialize(AstroPixelProcessor.java:7222)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.<init>(AstroPixelProcessor.java:1482)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor$1.run(AstroPixelProcessor.java:1090)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: Can't load library: /opt/astropixelprocessor/natives/linux-amd64/libgluegen_rt.so
        at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.base/java.lang.Runtime.load0(Unknown Source)
        at java.base/java.lang.System.load(Unknown Source)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:625)
        at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:64)
        at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:107)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:488)
        at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:427)
        at com.jogamp.common.os.Platform$1.run(Platform.java:321)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
        at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
        at com.ariesproductions.imageViewer.ImageViewerInitializer.init(ImageViewerInitializer.java:117)

I noticed at the top of this thread that Ubuntu 18 had a similar problem, but that was gone in Ubuntu 20.
All seems to work fine with 2.4 on Windows 10 and macOS Big Sur and Linux Fedora. I will test Ubuntu 20 tomorrow hopefully.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Martin
Thanks for reporting this. I added your information here for the record.

Reading your exception, I am surprised that your programs tries to find the native in the directory "/opt/astropixelprocessor/natives" which seams unusual or manually defined. When reading the getTempDir function it seams the default temporary dir may overriden by one of the following
- -Djava.io.tmpdir=/my/own/path
- Environment variable "TEMP"
- Environment variable "TMPDIR"

The failing line is here. Two ways to know a little more about this
- Place a breakpoint there to understand what will be the flow on your computer.
- Get debugging information in console by adding the VM argument -Djogamp.debug.IOUtil

The second option lead to this kind of output on my computer

IOUtil.getTempRoot(): tempX1 </var/folders/d2/85g_sxm91rg71yyky4gg6l6h0000gn/T>, used true
IOUtil.getTempRoot(): tempX3 </var/folders/d2/85g_sxm91rg71yyky4gg6l6h0000gn/T>, used false
IOUtil.getTempRoot(): tempX4 </Users/martin>, used true
IOUtil.getTempRoot(): tempX2 <null>, used false
IOUtil.testDirImpl(tempX1): </var/folders/d2/85g_sxm91rg71yyky4gg6l6h0000gn/T>, create true, exec false: true
IOUtil.testDirImpl(tempX1): </var/folders/d2/85g_sxm91rg71yyky4gg6l6h0000gn/T/jogamp_0000>, create true, exec false: true
IOUtil.getTempRoot(): temp dirs: exec: /var/folders/d2/85g_sxm91rg71yyky4gg6l6h0000gn/T/jogamp_0000, noexec: /var/folders/d2/85g_sxm91rg71yyky4gg6l6h0000gn/T/jogamp_0000
IOUtil.testDirImpl(testDir): </var/folders/d2/85g_sxm91rg71yyky4gg6l6h0000gn/T/jogamp_0000/file_cache>, create true, exec false: true


Then I can verify where the native was unpacked by calling

tree /var/folders/d2/85g_sxm91rg71yyky4gg6l6h0000gn/T/jogamp_0000/file_cache

Which yield to

/var/folders/d2/85g_sxm91rg71yyky4gg6l6h0000gn/T/jogamp_0000/file_cache
├── jln11481392380581019312
│   └── jln13680413027807683700
│       └── natives
│           └── macosx-universal
├── jln270649893446738608
│   └── jln4160267869752493629
│       └── natives
│           └── macosx-universal
├── jln2911065803996495133
│   └── jln2345320072791456434
│       └── natives
│           └── macosx-universal
├── jln7157582348275220286
│   ├── jln15593117908779262353
│   │   └── natives
│   │       └── macosx-universal
│   │           ├── libgluegen_rt.dylib
│   │           ├── libjogl_desktop.dylib
│   │           ├── libjogl_mobile.dylib
│   │           ├── libnativewindow_awt.dylib
│   │           ├── libnativewindow_macosx.dylib
│   │           └── libnewt_head.dylib
│   └── jln15593117908779262353.tmp
├── jln7157582348275220286.lck
├── jln7157582348275220286.tmp
└── jln7529487868811596856
    └── jln14163663447680424577
        └── natives
            └── macosx-universal


What is the output on your computer?
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Martin
In reply to this post by Marcel
Thank you a lot Marcel for reporting this.

As you may have seen, I am trying to gather problems as well as solution on this github issue manager. Could you share with us the initial error message you encountered so that other can easily google it and get to your solution?  
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

gouessej
Administrator
I don't reproduce those crashes under GNU Linux but I can give it another try if necessary.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Marcel
In reply to this post by Martin
Hello Martin,

I will do so later.

Most of the time it was just a crash but I will try to reproduce and shorten the error message I got.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Mabula
In reply to this post by Martin
Hi Martin,

Apologies for the delay, this is the output that I get on Linux Mint 20 with -Djogamp.debug.IOUtil:

/opt/astropixelprocessor$ ./astropixelprocessor
IOUtil.getTempRoot(): tempX1 </tmp>, used true
IOUtil.getTempRoot(): tempX3 <null>, used false
IOUtil.getTempRoot(): tempX4 </home/mabula>, used true
IOUtil.getTempRoot(): tempX2 </home/mabula/.cache>, used true
IOUtil.testDirExec: </tmp/jogamp_exe_tst6252795205786161366.sh>: Caught IOException: Cannot run program "/tmp/jogamp_exe_tst6252795205786161366.sh": error=13, Permission denied
java.io.IOException: Cannot run program "/tmp/jogamp_exe_tst6252795205786161366.sh": error=13, Permission denied
        at java.base/java.lang.ProcessBuilder.start(Unknown Source)
        at java.base/java.lang.ProcessBuilder.start(Unknown Source)
        at java.base/java.lang.Runtime.exec(Unknown Source)
        at com.jogamp.common.util.IOUtil.testDirExec(IOUtil.java:1049)
        at com.jogamp.common.util.IOUtil.testDirImpl(IOUtil.java:1107)
        at com.jogamp.common.util.IOUtil.getSubTempDir(IOUtil.java:1167)
        at com.jogamp.common.util.IOUtil.getTempDir(IOUtil.java:1282)
        at com.jogamp.common.util.cache.TempFileCache.<clinit>(TempFileCache.java:84)
        at com.jogamp.common.util.cache.TempJarCache.initSingleton(TempJarCache.java:96)
        at com.jogamp.common.os.Platform$1.run(Platform.java:313)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
        at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
        at com.ariesproductions.imageViewer.ImageViewerInitializer.init(ImageViewerInitializer.java:117)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.initialize(AstroPixelProcessor.java:7220)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.<init>(AstroPixelProcessor.java:1480)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor$1.run(AstroPixelProcessor.java:1088)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.IOException: error=13, Permission denied
        at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
        at java.base/java.lang.ProcessImpl.start(Unknown Source)
        ... 30 more
IOUtil.testDirExec(): test-exe </tmp/jogamp_exe_tst6252795205786161366.sh>, existingFile false, isNioExec true, returned -1
IOUtil.testDirExec(): abs-path </tmp>: res -3 -> false
IOUtil.testDirExec(): total 6ms, create 1ms, fill 3ms, execute 2ms
IOUtil.testDirImpl(tempX1): </tmp>, create true, exec true: false
IOUtil.testDirExec: </home/mabula/.cache/jogamp_exe_tst11647876237856982131.sh>: Caught IOException: Cannot run program "/home/mabula/.cache/jogamp_exe_tst11647876237856982131.sh": error=13, Permission denied
java.io.IOException: Cannot run program "/home/mabula/.cache/jogamp_exe_tst11647876237856982131.sh": error=13, Permission denied
        at java.base/java.lang.ProcessBuilder.start(Unknown Source)
        at java.base/java.lang.ProcessBuilder.start(Unknown Source)
        at java.base/java.lang.Runtime.exec(Unknown Source)
        at com.jogamp.common.util.IOUtil.testDirExec(IOUtil.java:1049)
        at com.jogamp.common.util.IOUtil.testDirImpl(IOUtil.java:1107)
        at com.jogamp.common.util.IOUtil.getSubTempDir(IOUtil.java:1167)
        at com.jogamp.common.util.IOUtil.getTempDir(IOUtil.java:1288)
        at com.jogamp.common.util.cache.TempFileCache.<clinit>(TempFileCache.java:84)
        at com.jogamp.common.util.cache.TempJarCache.initSingleton(TempJarCache.java:96)
        at com.jogamp.common.os.Platform$1.run(Platform.java:313)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
        at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
        at com.ariesproductions.imageViewer.ImageViewerInitializer.init(ImageViewerInitializer.java:117)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.initialize(AstroPixelProcessor.java:7220)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.<init>(AstroPixelProcessor.java:1480)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor$1.run(AstroPixelProcessor.java:1088)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.IOException: error=13, Permission denied
        at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
        at java.base/java.lang.ProcessImpl.start(Unknown Source)
        ... 30 more
IOUtil.testDirExec(): test-exe </home/mabula/.cache/jogamp_exe_tst11647876237856982131.sh>, existingFile false, isNioExec true, returned -1
IOUtil.testDirExec(): abs-path </home/mabula/.cache>: res -3 -> false
IOUtil.testDirExec(): total 3ms, create 1ms, fill 0ms, execute 2ms
IOUtil.testDirImpl(tempX2): </home/mabula/.cache>, create true, exec true: false
IOUtil.testDirExec: </home/mabula/jogamp_exe_tst1955596410558205141.sh>: Caught IOException: Cannot run program "/home/mabula/jogamp_exe_tst1955596410558205141.sh": error=13, Permission denied
java.io.IOException: Cannot run program "/home/mabula/jogamp_exe_tst1955596410558205141.sh": error=13, Permission denied
        at java.base/java.lang.ProcessBuilder.start(Unknown Source)
        at java.base/java.lang.ProcessBuilder.start(Unknown Source)
        at java.base/java.lang.Runtime.exec(Unknown Source)
        at com.jogamp.common.util.IOUtil.testDirExec(IOUtil.java:1049)
        at com.jogamp.common.util.IOUtil.testDirImpl(IOUtil.java:1107)
        at com.jogamp.common.util.IOUtil.getSubTempDir(IOUtil.java:1167)
        at com.jogamp.common.util.IOUtil.getTempDir(IOUtil.java:1298)
        at com.jogamp.common.util.cache.TempFileCache.<clinit>(TempFileCache.java:84)
        at com.jogamp.common.util.cache.TempJarCache.initSingleton(TempJarCache.java:96)
        at com.jogamp.common.os.Platform$1.run(Platform.java:313)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
        at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
        at com.ariesproductions.imageViewer.ImageViewerInitializer.init(ImageViewerInitializer.java:117)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.initialize(AstroPixelProcessor.java:7220)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.<init>(AstroPixelProcessor.java:1480)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor$1.run(AstroPixelProcessor.java:1088)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.IOException: error=13, Permission denied
        at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
        at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
        at java.base/java.lang.ProcessImpl.start(Unknown Source)
        ... 30 more
IOUtil.testDirExec(): test-exe </home/mabula/jogamp_exe_tst1955596410558205141.sh>, existingFile false, isNioExec true, returned -1
IOUtil.testDirExec(): abs-path </home/mabula>: res -3 -> false
IOUtil.testDirExec(): total 6ms, create 1ms, fill 0ms, execute 5ms
IOUtil.testDirImpl(tempX4): </home/mabula>, create true, exec true: false
IOUtil.testDirImpl(temp01): </tmp>, create true, exec false: true
IOUtil.testDirImpl(temp01): </tmp/jogamp_0000>, create true, exec false: true
IOUtil.getTempRoot(): temp dirs: exec: null, noexec: /tmp/jogamp_0000
Warning: Caught Exception while retrieving executable temp base directory:
java.io.IOException: Could not determine a temporary executable directory
        at com.jogamp.common.util.IOUtil.getTempDir(IOUtil.java:1336)
        at com.jogamp.common.util.cache.TempFileCache.<clinit>(TempFileCache.java:84)
        at com.jogamp.common.util.cache.TempJarCache.initSingleton(TempJarCache.java:96)
        at com.jogamp.common.os.Platform$1.run(Platform.java:313)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
        at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
        at com.ariesproductions.imageViewer.ImageViewerInitializer.init(ImageViewerInitializer.java:117)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.initialize(AstroPixelProcessor.java:7220)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.<init>(AstroPixelProcessor.java:1480)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor$1.run(AstroPixelProcessor.java:1088)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
IOUtil.testDirImpl(testDir): </tmp/jogamp_0000/file_cache>, create true, exec false: true
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: Can't load library: /opt/astropixelprocessor/natives/linux-amd64/libgluegen_rt.so
        at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.base/java.lang.Runtime.load0(Unknown Source)
        at java.base/java.lang.System.load(Unknown Source)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:625)
        at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:64)
        at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:107)
        at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:488)
        at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:427)
        at com.jogamp.common.os.Platform$1.run(Platform.java:321)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
        at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
        at com.ariesproductions.imageViewer.ImageViewerInitializer.init(ImageViewerInitializer.java:117)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.initialize(AstroPixelProcessor.java:7220)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor.<init>(AstroPixelProcessor.java:1480)
        at com.ariesproductions.astropixelprocessor.AstroPixelProcessor$1.run(AstroPixelProcessor.java:1088)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
        at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
./astropixelprocessor: line 21: exit: 0PK: numeric argument required


So it seems that we have a clear permissions issue here somehow. The odd thing is that my application copies other native libs for another dependency into /tmp without any issues. I wrote the code myself to make a folder in a OS temp folder and copy the lib there myself so I can load the native lib with System.Load();

Any clue what is happening from this output?

Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Mabula
And... This is what JOGL accomplished before crashing:

mabula@mabula-virtual-machine:/tmp/jogamp_0000/file_cache$ tree /tmp/jogamp_0000/file_cache/
/tmp/jogamp_0000/file_cache/
├── jln6835728288635718214
│   ├── jln8087643468882149036
│   └── jln8087643468882149036.tmp
├── jln6835728288635718214.lck
└── jln6835728288635718214.tmp
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

gouessej
Administrator
In reply to this post by Mabula
Thank you for your feedback, I'll have to investigate, I already tried to tinker this part of the code. This method tries to check whether files can be executed from the directory. Are you sure that your temporary directory allows to run executables?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Mabula
Hi Julien

You are most welcome! Let us solve this.

It is definitely the problem that executing something in tmp is simply not allowed in Linux Mint 20.

And after reading a bit more about this, many Linux distributions don't allow you to execute executables in the TMP folders I think, at last some won't with default installations, so it should not be implemented like that I think.

If I load other native libs in my application, i copy them to tmp from my resources folder and simply load them. Works always, I don't need to execute a thing from that TMP folder.

So while JOGL is failing on Linux Mint here, my other native libs that are copied to tmp will just work.

There are similar issues like this on the JOGL forum completely relating to executing scripts in TMP I think, so all those can be solved. Like a similar issue on Ubuntu 18.

So I would not try to execute  a script there. Simply copy the correct LIBS to TMP for the platfrom and load them. That will ensure that issues like this will simply not happen.

I will be happy to provide my code that I use to load my native libs that does work on any linux distribution.

Mabula
Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Martin
In reply to this post by Mabula
What is surprising is that you don't have any .so file extracted here as I found in my tmp dir with the tree command. I think the execution fails before the native gets unpacked in the file_cache directory. And once again, I don't understand why the .so file are search in /opt/astropixelprocessor/ whereas JOGL should rather search in one of the temporary directory listed below.

Your latest stack trace shows that before trying to load the .so file, it can't execute jogamp_exe_tst1955596410558205141.sh. The .sh file contains dummy code to verify permissions.

The exe_tst file executions have been attempted to
- /tmp/ (in var tempX1)
- /home/mabula/.cache/ (in var tempX2)
- /home/mabula/ (in var tempX4)

None of them worked.

Can you find the file in one (or all) of these folders and try running it? The stack trace says permission is not allowed, but I could not find further information about error=13 in ProcessBuilder documentation.  

On my Ubuntu 20 I get JOGL extracted here (and not in /opt/something)

tree /tmp/jogamp_0000/file_cache/
/tmp/jogamp_0000/file_cache/
├── jln17150038617626242421
│   ├── jln5111001095774168370
│   │   └── natives
│   │       └── linux-amd64
│   │           ├── libgluegen_rt.so
│   │           ├── libjogl_desktop.so
│   │           ├── libjogl_mobile.so
│   │           ├── libnativewindow_awt.so
│   │           ├── libnativewindow_drm.so
│   │           ├── libnativewindow_x11.so
│   │           ├── libnewt_drm.so
│   │           └── libnewt_head.so
│   └── jln5111001095774168370.tmp
├── jln17150038617626242421.lck
└── jln17150038617626242421.tmp


Reply | Threaded
Open this post in threaded view
|

Re: JOGL 2.4 and Java 17 report

Mabula
This post was updated on .
Hi Martin,

I just tried, i started my app and then checked for the executable.
The jogamp_exe_tst1955596410558205141.sh file is nowhere to be found in the trees:

/tmp/jogamp_0000/file_cache/
/home/mabula
/home/mabula/.cache

so it seems that even the executable can't be copied to these locaties and thus can not even be tried to execute?
Maybe error=13 means the file is non-existent?

I addition: I am running Linux Mint in VMWare 15.5.7. Maybe that is a problem here? I will check if I can find anything about that.


Mabula
12