Comments (4)
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 , used true
IOUtil.getTempRoot(): tempX3 , 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.(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.(Platform.java:290)
at com.jogamp.opengl.GLProfile.(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.(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.(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 : res -3 -> false
IOUtil.testDirExec(): total 6ms, create 1ms, fill 3ms, execute 2ms
IOUtil.testDirImpl(tempX1): , 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.(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.(Platform.java:290)
at com.jogamp.opengl.GLProfile.(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.(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.(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.(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.(Platform.java:290)
at com.jogamp.opengl.GLProfile.(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.(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.(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): , 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.(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.(Platform.java:290)
at com.jogamp.opengl.GLProfile.(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.(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.(Platform.java:290)
at com.jogamp.opengl.GLProfile.(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.(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();
These are copied by my own java code and java will load these native libs at application startup:
mabula@mabula-virtual-machine:/tmp/AstroPPLibsqfJKd$ ls
libiconv.so.2.6.1 libRawConverter.so libraw.so.22.0.0
Then after this has been loaded, jogl initialises OpenGL and we crash...
Any clue what is happening from this output?
from jogl.
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
from jogl.
@AstroPixelProcessor found the solution which was discussed on JOGL forum so I copy paste here
After more testing and manipulating permissions of the files in my application, it turns out that the DEB packager that I used is to blame... apparently, the packager sets permissions in the files of my application in such a way that the error occurs. If I don't use the DEB packager, JOGL will run on Linux Mint 20 and also on Ubuntu 20 I can confirm with OpenJDK 17 (Temurin in my case).
...The DEB packager that I used did NOT set the correct permissions on the jre/lib/jspanwhelper. After installation the permissions were 644 (RW,R,R). A chmod 755 /jre/lib/jspanwhelper fixed the JOGL native lib loading issue completely.
Sorry to have bothered you with this ;-) At least it is again a valuable lesson learnt, at least for me.
So that fully explains the issue I was experiencing. The Java jspawnhelper packaged in my app simply was not allowed to execute the JOGL native libs script.
from jogl.
@jzy3d , excellent, sorry for not having posted it here as well. It was in the back of my mind that I still needed to do that...
It is good to know that the permission denied error code indicated a file permission issue in my installed package.
I would suggest to close this issue since it is solved now.
from jogl.
Related Issues (20)
- Interference/timing(?) issue on macOS when creating and destroying GLCanvas
- Caught AppContextInfo(Bug 1004) IllegalAccessException: class com.jogamp.nativewindow.awt.AppContextInfo cannot access class sun.awt.AppContext (in module java.desktop) because module java.desktop does not export sun.awt to unnamed module @34a3d150 on thread main
- Unable to determine graphics configuration on Windows / ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 1 HOT 2
- EGLGLXDrawableFactory - Could not initialize shared resources for EGLGraphicsDevice[type .egl, v1.4.0, connection decon, unitID 0, handle 0x1bf7963a070, owner true, NullToolkitLock[obj 0xe8146cb]] HOT 2
- Support SWT 4.21 HOT 1
- Github Actions to build and test Gluegen + JOGL on Mac, Windows and Linux
- TextRenderer cache invalidation
- WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3
- WorldWind get a JVM crash on Debian 5.10
- JOGL 2.4rc4 + JDK Temurin 17.02+8 + SWT 4.23 + macOS + ARM Processor = Crash w/o exception HOT 24
- Incorrect context on GLCanvas HOT 1
- UnsatisfiedLinkError with jzy3d builds only HOT 11
- Compatibility matrix for JOGL 2.4 rc4
- Hang on macOS HOT 11
- UnsatisfiedLinkError: Can't load library (nativewindow_awt, or other libs than gluegen)
- UnsatisfiedLinkError: Can't load library: .../libgluegen_rt.dylib
- GL2 -> profileImpl GL3bc !!! not mapped HOT 1
- NativeWindowFactory.initSingleton()
- JOGL 2.4 on Mac M1 has unit test failures HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jogl.