-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JNA crashes when trying to load a .dll file from a Windows shared drive #666
Comments
I ran this (crude hack to test without CLI): try {
NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), "..\\..\\..\\Downloads\\vlc-2.2.3\\");
boolean found = new NativeDiscovery().discover();
String data = "Version: " + LibVlc.INSTANCE.libvlc_get_version();
JOptionPane.showConfirmDialog(null, data);
} catch (Throwable ex) {
JOptionPane.showConfirmDialog(null, ex.getClass().getName() + "\n\n" + ex.getMessage());
} That fails with stock vlcj-3.10.1, so I overrode the jna + jna-platform version to 4.2.2 (and 4.3.0-SNAPSHOT), both versions report the version correctly. So yes - newer version is better...
Why didn't you test it? You let me do your work.... |
Deeply sorry about this. I confirm that upgrading JNA fixes everything. |
The sun JVM has some bugs around long path handling, newer Jna attempts On Wednesday, June 1, 2016, xinyingho [email protected] wrote:
|
java-native-access#666) …mentation Motivation: We should just take the id into account for equality and hashcode Modifications: Add implementation Result: Correctly handle hashCode and equals
I have a Java application that uses VLCj to load libvlc.dll and VLCj uses in turn JNA 4.1.0 to do the interface between Java and native code, and I'm on Windows7 64-bit / Java 64-bit 1.8.0.92 / VLC 64-bit 2.2.3.
My Java application and a portable version of VLC are both installed on the same Windows shared drive. So both must be accessed from UNC-styled paths, e.g. "\<folder>".
My application gives to JNA the relative path of VLC from my Java app, e.g. "vlc2.2.3\App\VLCMediaPlayer\libvlc.dll".
When launching my Java app from a local drive, everything's fine. When doing the same from a Windows shared drive, JNA raises a java.lang.Error throwable telling me that some paths aren't valid. It seems like it's because JNA 4.1.0 can't manage Windows shared drives.
I don't know if there's a newer version of JNA that fixed this?
Here's the full stack trace (the error can be translated from French to English as "the syntax of the filename, of the directory or of the drive is incorrect"):
java.lang.Error: La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte.
The text was updated successfully, but these errors were encountered: