Re: JOGL 2.4 and Java 17 report

Posted by Mabula on
URL: https://forum.jogamp.org/JOGL-2-4-and-Java-17-report-tp4041572p4041677.html

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?