UnsatisfiedLinkError for JNA on startup #3624

Closed
TaniaSan opened this Issue Aug 15, 2015 · 22 comments

Comments

Projects
None yet
3 participants
@TaniaSan

OS Windows 7, 32-bit

error

@benfry benfry changed the title from Unable to run "Processing" to UnsatisfiedLinkError for JNA on startup Aug 15, 2015

@benfry benfry added the windows label Aug 15, 2015

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 15, 2015

Member

Does your user account have non-ascii characters in it?

What version are you running?

Member

benfry commented Aug 15, 2015

Does your user account have non-ascii characters in it?

What version are you running?

@TaniaSan

This comment has been minimized.

Show comment
Hide comment
@TaniaSan

TaniaSan Aug 15, 2015

3.0 beta 3 (11 August 2015)

3.0 beta 3 (11 August 2015)

@TaniaSan

This comment has been minimized.

Show comment
Hide comment
@TaniaSan

TaniaSan Aug 15, 2015

I don't know how to check if my user account has non-ascii characters in it

I don't know how to check if my user account has non-ascii characters in it

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 15, 2015

Member

It's just the name you use on Windows. But I'm guessing that's the problem and it's a known issue in a library we're using: java-native-access/jna#124 java-native-access/jna#238

Looks like there's a workaround, though. I'll see about getting that in before beta 4.

Member

benfry commented Aug 15, 2015

It's just the name you use on Windows. But I'm guessing that's the problem and it's a known issue in a library we're using: java-native-access/jna#124 java-native-access/jna#238

Looks like there's a workaround, though. I'll see about getting that in before beta 4.

@TaniaSan

This comment has been minimized.

Show comment
Hide comment
@TaniaSan

TaniaSan Aug 15, 2015

How can I solve this?

How can I solve this?

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 15, 2015

Member

Add a new user on your machine that uses only letters from A to Z. Log in as that user, and Processing should run just fine.

Member

benfry commented Aug 15, 2015

Add a new user on your machine that uses only letters from A to Z. Log in as that user, and Processing should run just fine.

@TaniaSan

This comment has been minimized.

Show comment
Hide comment
@TaniaSan

TaniaSan Aug 15, 2015

Thanks, and if I'll just change user name, will the software run?

Thanks, and if I'll just change user name, will the software run?

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 15, 2015

Member

It'll need to be a new user account. When you change the name on your existing account, Windows will not change the folder names for it (which is what's causing the problem). But yes, with a new user account, it should run.

Member

benfry commented Aug 15, 2015

It'll need to be a new user account. When you change the name on your existing account, Windows will not change the folder names for it (which is what's causing the problem). But yes, with a new user account, it should run.

@TaniaSan

This comment has been minimized.

Show comment
Hide comment
@TaniaSan

TaniaSan Aug 15, 2015

Ok, thank you!

Ok, thank you!

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 15, 2015

Member

When you do get it running, can you please try this sketch:

println("language:"   + System.getProperty("user.language"));
println("country:"    + System.getProperty("user.country"));
println("encoding:"   + System.getProperty("file.encoding"));
println("jnuEncoding:"+ System.getProperty("sun.jnu.encoding"));
println(java.util.Locale.getDefault());

And then copy what's printed in the console and paste it here?

Member

benfry commented Aug 15, 2015

When you do get it running, can you please try this sketch:

println("language:"   + System.getProperty("user.language"));
println("country:"    + System.getProperty("user.country"));
println("encoding:"   + System.getProperty("file.encoding"));
println("jnuEncoding:"+ System.getProperty("sun.jnu.encoding"));
println(java.util.Locale.getDefault());

And then copy what's printed in the console and paste it here?

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 15, 2015

Member

Better yet, a more complete version:

import java.nio.charset.Charset;
import java.util.*;

println("language: " + System.getProperty("user.language"));
println("country: " + System.getProperty("user.country"));

println("user.language.format: " + System.getProperty("user.language.format"));
println("user.language.display: " + System.getProperty("user.language.display"));
println("user.country.format: " + System.getProperty("user.country.format"));
println("user.country.display: " + System.getProperty("user.country.display"));

println("encoding: " + System.getProperty("file.encoding"));
String jnuEncoding = System.getProperty("sun.jnu.encoding");
println("jnu encoding: " + jnuEncoding);

String userName = System.getProperty("user.name");
println("user name: " + userName);

println("default locale = " + Locale.getDefault());
println("default display locale = " + Locale.getDefault(Locale.Category.DISPLAY));
println("default format locale = "  + Locale.getDefault(Locale.Category.FORMAT));
//println(System.getProperty("jna.tmpdir"));

Charset c = Charset.forName(jnuEncoding);
println("can encode user name: " + c.newEncoder().canEncode(userName));
Member

benfry commented Aug 15, 2015

Better yet, a more complete version:

import java.nio.charset.Charset;
import java.util.*;

println("language: " + System.getProperty("user.language"));
println("country: " + System.getProperty("user.country"));

println("user.language.format: " + System.getProperty("user.language.format"));
println("user.language.display: " + System.getProperty("user.language.display"));
println("user.country.format: " + System.getProperty("user.country.format"));
println("user.country.display: " + System.getProperty("user.country.display"));

println("encoding: " + System.getProperty("file.encoding"));
String jnuEncoding = System.getProperty("sun.jnu.encoding");
println("jnu encoding: " + jnuEncoding);

String userName = System.getProperty("user.name");
println("user name: " + userName);

println("default locale = " + Locale.getDefault());
println("default display locale = " + Locale.getDefault(Locale.Category.DISPLAY));
println("default format locale = "  + Locale.getDefault(Locale.Category.FORMAT));
//println(System.getProperty("jna.tmpdir"));

Charset c = Charset.forName(jnuEncoding);
println("can encode user name: " + c.newEncoder().canEncode(userName));

@benfry benfry added the i18n label Aug 15, 2015

@jirizawa

This comment has been minimized.

Show comment
Hide comment
@jirizawa

jirizawa Aug 16, 2015

Similar Unsatisfied Link Error - resolved?
Used to run Processing V2.2.1 WindowsX64 on Windows 8.1, but suddenly stopped (possibly linked to Windows updates?).
Downloaded 3.0 Alpha, received Unsatisfied Link Error msg - access denied to library, with similar submessages as TaniaSan.
Reloaded V2.2.1 for WindowsX32, and it started up. Then, Re-started V3.0 Beta 3 again, and worked.
Noted it created a subfolder in AppData Local/Temp, and also in Roaming/Processing. Also removed previous preferences.txt as recommended.
Here is the Console feed after running the sketch as noted above:

Setting 'Run Sketches on Display' preference to display 1
language: en
country: CA
user.language.format: null
user.language.display: null
user.country.format: null
user.country.display: null
encoding: Cp1252
jnu encoding: Cp1252
user name: XXX
default locale = en_CA
default display locale = en_CA
default format locale = en_CA
can encode user name: true

-confused, but hope it may help in some way.

Similar Unsatisfied Link Error - resolved?
Used to run Processing V2.2.1 WindowsX64 on Windows 8.1, but suddenly stopped (possibly linked to Windows updates?).
Downloaded 3.0 Alpha, received Unsatisfied Link Error msg - access denied to library, with similar submessages as TaniaSan.
Reloaded V2.2.1 for WindowsX32, and it started up. Then, Re-started V3.0 Beta 3 again, and worked.
Noted it created a subfolder in AppData Local/Temp, and also in Roaming/Processing. Also removed previous preferences.txt as recommended.
Here is the Console feed after running the sketch as noted above:

Setting 'Run Sketches on Display' preference to display 1
language: en
country: CA
user.language.format: null
user.language.display: null
user.country.format: null
user.country.display: null
encoding: Cp1252
jnu encoding: Cp1252
user name: XXX
default locale = en_CA
default display locale = en_CA
default format locale = en_CA
can encode user name: true

-confused, but hope it may help in some way.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 16, 2015

Member

Thanks for trying the code. Can you paste the exact error message you received with beta 3?

Member

benfry commented Aug 16, 2015

Thanks for trying the code. Can you paste the exact error message you received with beta 3?

@jirizawa

This comment has been minimized.

Show comment
Hide comment
@jirizawa

jirizawa Aug 16, 2015

Unfortunately I can't retrieve the whole error message (since it now works), but I did save the first line:

java.lang.UnsatisfiedLinkError: Failed to create temporary file for jnidispatch library: Access is denied.

Correction: downloaded Processing V3 Alpha, not Beta (edited original comment).

Unfortunately I can't retrieve the whole error message (since it now works), but I did save the first line:

java.lang.UnsatisfiedLinkError: Failed to create temporary file for jnidispatch library: Access is denied.

Correction: downloaded Processing V3 Alpha, not Beta (edited original comment).

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 19, 2015

Member

@TaniaSan and @jirizawa can you please try downloading this version and see if it fixes your problem? And if not, please report what the error message that it gives you on startup?

Member

benfry commented Aug 19, 2015

@TaniaSan and @jirizawa can you please try downloading this version and see if it fixes your problem? And if not, please report what the error message that it gives you on startup?

@jirizawa

This comment has been minimized.

Show comment
Hide comment
@jirizawa

jirizawa Aug 21, 2015

The latest supplied version started up:

language: en
country: CA
user.language.format: null
user.language.display: null
user.country.format: null
user.country.display: null
encoding: Cp1252
jnu encoding: Cp1252
user name: XXX
default locale = en_CA
default display locale = en_CA
default format locale = en_CA
can encode user name: true

I now have this version (150819a-windows32) and 3.0b3windows64 working. Thanks thus far.

The latest supplied version started up:

language: en
country: CA
user.language.format: null
user.language.display: null
user.country.format: null
user.country.display: null
encoding: Cp1252
jnu encoding: Cp1252
user name: XXX
default locale = en_CA
default display locale = en_CA
default format locale = en_CA
can encode user name: true

I now have this version (150819a-windows32) and 3.0b3windows64 working. Thanks thus far.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 21, 2015

Member

So the modified version from that link works, even though the current 3.0 beta does not?

Member

benfry commented Aug 21, 2015

So the modified version from that link works, even though the current 3.0 beta does not?

@jirizawa

This comment has been minimized.

Show comment
Hide comment
@jirizawa

jirizawa Aug 24, 2015

The current 3.0 beta now works, too.
To recap, it may have been because I downloaded version 2.2.1 for Windows X32 after I first tried current 3.0 beta.
I am new to this, and can't surmise why 3.0 beta may have worked after downloading 2.2.1 X32, but there are two things that may account for this:
-it (2.2.1 Windows X32) created a new subfolder in AppData Local/Temp, and also in Roaming/Processing
-I manually erased the preferences.txt from the original subfolder directory

If I should uninstall any previous versions and start fresh with the 150819-windows32 to see if it works solo, let me know.

The current 3.0 beta now works, too.
To recap, it may have been because I downloaded version 2.2.1 for Windows X32 after I first tried current 3.0 beta.
I am new to this, and can't surmise why 3.0 beta may have worked after downloading 2.2.1 X32, but there are two things that may account for this:
-it (2.2.1 Windows X32) created a new subfolder in AppData Local/Temp, and also in Roaming/Processing
-I manually erased the preferences.txt from the original subfolder directory

If I should uninstall any previous versions and start fresh with the 150819-windows32 to see if it works solo, let me know.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 25, 2015

Member

Thanks for following up. The code that was in that 150819 download is in the final beta 5, so I'd expect them to behave similarly.

Can you try renaming/hiding the folders that 2.x created in Local/Temp and Roaming/Processing and then try running 3.0 again? I wonder if we're no longer creating a folder on startup that we need to.

Member

benfry commented Aug 25, 2015

Thanks for following up. The code that was in that 150819 download is in the final beta 5, so I'd expect them to behave similarly.

Can you try renaming/hiding the folders that 2.x created in Local/Temp and Roaming/Processing and then try running 3.0 again? I wonder if we're no longer creating a folder on startup that we need to.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Sep 20, 2015

Member

For people having problems with this, please try these versions and let me know how it goes:
http://download.processing.org/processing-150919a-windows32.zip
http://download.processing.org/processing-150919a-windows64.zip

Member

benfry commented Sep 20, 2015

For people having problems with this, please try these versions and let me know how it goes:
http://download.processing.org/processing-150919a-windows32.zip
http://download.processing.org/processing-150919a-windows64.zip

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Sep 20, 2015

Member

Looks like these should fix the issue for beta 7.

Member

benfry commented Sep 20, 2015

Looks like these should fix the issue for beta 7.

@benfry benfry closed this Sep 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment