Possible incompatibility with JavaFx
See original GitHub issueNot sure where this problem lies, but I’ve been experiencing a core dump crash somewhere in libfreetype when JavaFx is initialized before rendering text using canvas drawString.
Ubuntu 18.04
openjdk version "12.0.1" 2019-04-16
OpenJDK Runtime Environment Zulu12.2+3-CA (build 12.0.1+12)
OpenJDK 64-Bit Server VM Zulu12.2+3-CA (build 12.0.1+12, mixed mode, sharing)
I am trying to use skija’s text rendering functionality. However, when JavaFx is initialized before trying to render with skija, the whole repl crashes with a core dump somewhere in libfreetype.
When I do the skija text rendering first, and then initialize JavaFx, things seem to work.
I have added a demo project here: https://github.com/mjmeintjes/skija-cljfx-crash-demo
If I execute (Platform/startup #(Platform/setImplicitExit false))
before (create-image-with-text)
, then the JVM crashes due to a crash in native code, somewhere in libfreetype.
However, if I execute (create-image-with-text)
first, then I can run the startup code and then (create-image-with-text)
can successfully run.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Thanks, 0.92.30 seems to have fixed this issue for me as well.
Ok, I think we fixed it in 0.92.30. The core of the problem was Freetype, which was initialized both statically (us) and dynamically (JFX). I switched it to dynamic for Linux and the problem seems to be gone. Works on my Ubuntu 20.04. Please let me know if it bugs you again.