FAForever / downlords-faf-client

Official client for Forged Alliance Forever
https://faforever.com
MIT License
196 stars 121 forks source link

Client fails to start on non-latin named user accounts (platform windows) #1333

Open norraxx opened 5 years ago

norraxx commented 5 years ago
java.lang.UnsatisfiedLinkError: org.bridj.Platform.sizeOf_ptrdiff_t()I
    at org.bridj.Platform.sizeOf_ptrdiff_t(Native Method)
    at org.bridj.Platform.<clinit>(Platform.java:232)
    at com.faforever.client.preferences.PreferencesService.<clinit>(PreferencesService.java:78)
    at com.faforever.client.FafClientApplication.main(FafClientApplication.java:55)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:85)
    at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:94)
    at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:25)
norraxx commented 5 years ago

Fails on org.bridj.Platform.isWindows(). via @axel1200 import com.sun.jna.Platform; has isWindows method. So maybe we could change the method.

norraxx commented 5 years ago

Fails now on:

 if (com.sun.jna.Platform.isWindows()) {
      FAF_DATA_DIRECTORY = Paths.get(Shell32Util.getFolderPath(ShlObj.CSIDL_COMMON_APPDATA), "FAForever");
    }

Problem is system class loader: see more info on Java Native Access library pages: https://github.com/java-native-access/jna/issues/124 https://github.com/java-native-access/jna/issues/238 https://bugs.openjdk.java.net/browse/JDK-8017274

1-alex98 commented 5 years ago

We wann display a pop up then and ask user to make a new windows account with ascii characters