Bug 1103 - UnsatisfiedLinkError caused by Process.exitValue() from testDirExec() returning 1
Summary: UnsatisfiedLinkError caused by Process.exitValue() from testDirExec() returni...
Status: RESOLVED DUPLICATE of bug 1108
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 2
Hardware: All windows
: --- minor
Assignee: Sven Gothel
URL:
Depends on: 908 1015 1063 1067
Blocks: 1109
  Show dependency treegraph
 
Reported: 2014-11-18 11:44 CET by Rene
Modified: 2015-01-23 01:08 CET (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
Workaround: ---


Attachments
Simple Testcase (1.42 KB, application/octet-stream)
2014-12-10 15:11 CET, Rene
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rene 2014-11-18 11:44:19 CET
A spanish/portuguese user on windows get this stack trace. From a quick google this C:\Documents and Settings\Alex2.0\Configuraci?n local\ is actually: \Configuración local\

I'm left wondering if this is a Jogl bug or a Java bug, but I thought it would file it here as it came from the JNILibLoaderBase class.

java.lang.UnsatisfiedLinkError: C:\Documents and Settings\Alex2.0\Configuraci?n local\Temp\jogamp_0000\file_cache\jln8945035217648709904\jln3351519959519145075\gluegen-rt.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(JNILibLoaderBase.java:575)
at com.jogamp.common.jvm.JNILibLoaderBase.access$000(JNILibLoaderBase.java:64)
at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(JNILibLoaderBase.java:96)
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(JNILibLoaderBase.java:459)
at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(DynamicLibraryBundle.java:388)
at com.jogamp.common.os.Platform$1.run(Platform.java:209)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.common.os.Platform.<clinit>(Platform.java:179)
at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:120)
Comment 1 Rene 2014-11-18 12:42:12 CET
Hmm on second thought I cannot get this to break locally, so maybe it's not actually a jogamp bug at all. The user is also running Windows XP which technically isn't even supported.
Comment 2 Sven Gothel 2014-12-07 03:13:38 CET
Do you use the latest GlueGen / JOGL release ?

This should be fixed by:
  - Bug  908  URI escaping of reserved character accurately
  - Bug 1015  Window exec. TEMP dir
  - Bug 1063  Own Uri Impl.
  - Bug 1067  SPACE preservation, Windows

All fixes are released in current git source repos,
as well as in aggregated test build:
  <https://jogamp.org/deployment/archive/master/gluegen_838-joal_570-jogl_1366-jocl_1026-signed/>

Please confirm, and if fixed - please mark as duplicate to .. Bug 908 and/or 1067,
i.e. close it.

Otherwise .. pls report.
Comment 3 Rene 2014-12-10 13:40:35 CET
Hey,

I have another user who has gotten back to me and they are on Windows 7 and using 2.2.4.

It looks like Process.exitValue() from testDirExec() returns 1. I guess it's a shame because 1 means very little other than generic error. Out of curiosity why is it trying to launch a process to determine whether it is executable?

His directory also seems to contain a special character "&", but that could also be unrelated.

Here's the user trace with -Djogamp.debug.IOUtil:
IOUtil.getTempRoot(): tempX1 <C:\Users\Garbbane&Viduksht\AppData\Roaming\.huntedcowcache\eldevin>, used true
IOUtil.getTempRoot(): tempX3 <C:\Users\GARBBA~1\AppData\Local\Temp>, used true
IOUtil.getTempRoot(): tempX4 <C:\Users\Garbbane&Viduksht>, used true
IOUtil.getTempRoot(): tempX2 <null>, used false
IOUtil.testDirExec(): <C:\Users\Garbbane&Viduksht\AppData\Roaming\.huntedcowcache\eldevin>: res 1
IOUtil.testDirExec(): total 1872ms, create 0ms, execute 1872ms
IOUtil.testDirImpl(tempX1): <C:\Users\Garbbane&Viduksht\AppData\Roaming\.huntedcowcache\eldevin>, create true, exec true: false
IOUtil.testDirExec(): <C:\Users\GARBBA~1\AppData\Local\Temp>: res 1
IOUtil.testDirExec(): total 31ms, create 16ms, execute 15ms
IOUtil.testDirImpl(tempX3): <C:\Users\GARBBA~1\AppData\Local\Temp>, create true, exec true: false
IOUtil.testDirExec(): <C:\Users\Garbbane&Viduksht>: res 1
IOUtil.testDirExec(): total 16ms, create 0ms, execute 16ms
IOUtil.testDirImpl(tempX4): <C:\Users\Garbbane&Viduksht>, create true, exec true: false
IOUtil.testDirImpl(temp01): <C:\Users\Garbbane&Viduksht\AppData\Roaming\.huntedcowcache\eldevin>, create true, exec false: true
IOUtil.testDirImpl(temp01): <C:\Users\Garbbane&Viduksht\AppData\Roaming\.huntedcowcache\eldevin\jogamp_0000>, create true, exec false: true
IOUtil.getTempRoot(): temp dirs: exec: null, noexec: C:\Users\Garbbane&Viduksht\AppData\Roaming\.huntedcowcache\eldevin\jogamp_0000
Warning: Caught Exception while retrieving executable temp base directory:
java.lang.RuntimeException: Could not determine a temporary executable directory
Comment 4 Rene 2014-12-10 13:57:29 CET
It looks like the original stack trace was a different issue, do you want me to close this one as invalid and open a new ticket?
Comment 5 Rene 2014-12-10 15:11:27 CET
Created attachment 671 [details]
Simple Testcase

I've attached a simple test case demonstrating that windows requires quotes around commands that have special characters like &<>()@^|

You can find out the exact syntax from the cmd /? or command /? in a windows command prompt.

Let me know if you want me to clean it up.
Comment 6 Rene 2014-12-11 18:49:26 CET
I have got another user who also gets error code 1 for some reason and am looking into that as well. In fact Files.isExecutable(directory) available in Java 7+ returns true for him on the directory in question.

I'm trying to see if he can execute batch files at all as there is some information suggesting that batch files can fail to run if the file associations/registry entries get in a broken state but nothing so far.

Relevant stack trace:
IOUtil.getTempRoot(): tempX1 <C:\Users\Josh\AppData\Roaming\.huntedcowcache\eldevin>, used true
IOUtil.getTempRoot(): tempX3 <C:\Users\Josh\AppData\Local\Temp>, used true
IOUtil.getTempRoot(): tempX4 <C:\Users\Josh>, used true
IOUtil.getTempRoot(): tempX2 <null>, used false
IOUtil.testDirExec(): <C:\Users\Josh\AppData\Roaming\.huntedcowcache\eldevin>: res 1
IOUtil.testDirExec(): total 82ms, create 1ms, execute 81ms
IOUtil.testDirImpl(tempX1): <C:\Users\Josh\AppData\Roaming\.huntedcowcache\eldevin>, create true, exec true: false
IOUtil.testDirExec(): <C:\Users\Josh\AppData\Local\Temp>: res 1
IOUtil.testDirExec(): total 95ms, create 0ms, execute 95ms
IOUtil.testDirImpl(tempX3): <C:\Users\Josh\AppData\Local\Temp>, create true, exec true: false
IOUtil.testDirExec(): <C:\Users\Josh>: res 1
IOUtil.testDirExec(): total 104ms, create 0ms, execute 104ms
IOUtil.testDirImpl(tempX4): <C:\Users\Josh>, create true, exec true: false
IOUtil.testDirImpl(temp01): <C:\Users\Josh\AppData\Roaming\.huntedcowcache\eldevin>, create true, exec false: true
IOUtil.testDirImpl(temp01): <C:\Users\Josh\AppData\Roaming\.huntedcowcache\eldevin\jogamp_0000>, create true, exec false: true
IOUtil.getTempRoot(): temp dirs: exec: null, noexec: C:\Users\Josh\AppData\Roaming\.huntedcowcache\eldevin\jogamp_0000
Warning: Caught Exception while retrieving executable temp base directory:
java.lang.RuntimeException: Could not determine a temporary executable directory
Comment 7 Sven Gothel 2015-01-23 01:08:54 CET
(In reply to comment #6)
> I have got another user who also gets error code 1 for some reason and am
> looking into that as well. In fact Files.isExecutable(directory) available
> in Java 7+ returns true for him on the directory in question.
> 

Files.isExecutable(..) is not a sufficient test.

> I'm trying to see if he can execute batch files at all as there is some
> information suggesting that batch files can fail to run if the file
> associations/registry entries get in a broken state but nothing so far.

Bug 1108 addresses issues with Windows setup and 
BATCH file execution tests, i.e. fix uses a native TinyPE program
for Windows x86 and x86_64.

This should solve the issue.

Nothing more we can do here .. I am afraid.

If problem still persist, please re-open and add more information.

Note: Wait for next aggregated build for binaries,
or build yourself (GlueGen + JOGL).

*** This bug has been marked as a duplicate of bug 1108 ***