Skip to content
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

Garbled text in the UI #44

Closed
ctrlaltca opened this issue Feb 8, 2020 · 7 comments
Closed

Garbled text in the UI #44

ctrlaltca opened this issue Feb 8, 2020 · 7 comments

Comments

@ctrlaltca
Copy link

Hi,
all the text in the application is garbled:

Schermata 2020-02-08 alle 12 18 03

Running on macOS Catalina 10.15.2, I followed these steps:

  • ran brew install openjdk (this installed java 13)
  • ran sudo ln -sfn /usr/local/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk as suggested by homebrew to make java visible to the system;
  • downloaded ns-usbloader-1.0.jar
  • ran java -jar ns-usbloader-1.0.jar

Terminal log:

2020-02-08 12:15:45.561 java[76371:6424310] CoreText note: Client requested name ".SFNS-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-02-08 12:15:45.561 java[76371:6424310] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
2020-02-08 12:15:45.578 java[76371:6424310] CoreText note: Client requested name ".SFNS-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-02-08 12:15:46.369 java[76371:6424354] CoreText note: Client requested name ".SFNS-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-02-08 12:15:46.455 java[76371:6424354] CoreText note: Client requested name ".SFNS-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2020-02-08 12:18:05.596 java[76371:6424310] unrecognized type is 4294967295
2020-02-08 12:18:05.596 java[76371:6424310] *** Assertion failure in -[NSEvent _initWithCGEvent:eventRef:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.20.140/AppKit.subproj/NSEvent.m:1959
@ctrlaltca
Copy link
Author

Seeing that the minimum requested version is java 8u60, i tried installing java8 instead:

  • ran brew cask install adoptopenjdk8 (installed OpenJDK8U-jdk_x64_mac_hotspot_8u242b08.pkg)

With the following result:

Exception in thread "main" java.lang.UnsupportedClassVersionError: javafx/application/Application has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	at nsusbloader.Main.main(Main.java:7)

@ctrlaltca
Copy link
Author

Third attempt using brew cask install adoptopenjdk installed OpenJDK13U-jdk_x64_mac_hotspot_13.0.2_8.tar.gz , and ns-usbloader works fine.

@andyoneal
Copy link

andyoneal commented Mar 20, 2020

Looks like this is a bug in JavaFX starting with macOS 10.15. Fixed in JavaFX 14.

https://bugs.openjdk.java.net/browse/JDK-8234916

@farces
Copy link

farces commented Mar 21, 2020

A quick fix for this is to switch to javafx 14 and rebuild - it works without any issues for me but I also haven't given it any particular rigor in testing.

Modify pom.xml and change version to 14 for any of the javafx items that are currently version 11.

@i-am-the-slime
Copy link

Why is this closed?

@ctrlaltca
Copy link
Author

Because the problem seems not to be in ns-usbloader itself, but is caused by some broken combinations of Java and macOS.

@i-am-the-slime
Copy link

i-am-the-slime commented Mar 12, 2021

I'd argue that it uses a dependency that is broken which can apparently be fixed by updating it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants