Finding Temp folder fails when username contains parenthesis.

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

Finding Temp folder fails when username contains parenthesis.

trozzi
I'm getting the following stacktrace on Windows 10/11 when the user's name contains a parenthesis.

------------------------------------------------------------------------------------------------------------------------------------
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(AccessController.java:318)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
        at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
        ...

Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: S:\natives\windows-amd64\gluegen_rt.dll
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2398)
        at java.base/java.lang.Runtime.load0(Runtime.java:785)
        at java.base/java.lang.System.load(System.java:1979)
        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(AccessController.java:318)
        at com.jogamp.common.os.Platform.<clinit>(Platform.java:290)
        at com.jogamp.opengl.GLProfile.<clinit>(GLProfile.java:154)
        ...
------------------------------------------------------------------------------------------------------------------------------------

I believe the source of the crash is from the method 'testDirExec'. When it tries to run the batch file to check for executable permissions, it fails because it incorrectly handles the filepath with special characters.

The actual value of the TEMP environment variable is of the form "C:\Users\(ABC)abc\AppData\Local\Temp"
I set the properties "jogamp.debug.IOUtil.Exe" and "jogamp.debug" to true to debug it and got:

Exe-Tst: 'C:\Users\' is not recognized as an internal or external command, operable program or batch file.

I've tested this with multiple users containing parenthesis and multiple users without, and the users with the parethesis consistently fail.

I'm using an older version of gluegen so this may have been fixed already, but after quickly scanning the source code on github it doesn't look different.
Reply | Threaded
Open this post in threaded view
|

Re: Finding Temp folder fails when username contains parenthesis.

gouessej
Administrator
Hello

You should fill a bug report for that, send me an email, I'll create a Bugzilla account for you.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Finding Temp folder fails when username contains parenthesis.

Sven Gothel
Administrator
I concur .. thank you, yes - must be fixed ASAP.
Reply | Threaded
Open this post in threaded view
|

Re: Finding Temp folder fails when username contains parenthesis.

Sven Gothel
Administrator