(Linux/Ubuntu) Worldographer almost running – crashes on libjfxwebkit.so

Home Forums Worldographer (Linux/Ubuntu) Worldographer almost running – crashes on libjfxwebkit.so

  • This topic has 8 replies, 4 voices, and was last updated 1 month ago by Anonymous.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #10285
    Anonymous
    Inactive

    Hey all, I know Linux isn’t officially supported but I figured it was worth supporting anyway even if I can’t get it to work on linux, since others seem to. Hexographer is nice but I’d really like to use the full pack of applications.

    I’ve searched around and got Worldographer almost-running on OpenJDK 11, using some of the excellent forum posts here revolving around OpenJFX. However, it seems like there’s still one more library missing and I can’t for the life of me find it anywhere on my system, even after installing OpenJFX and Java picking those libraries up.

    The application GUI opens briefly, then immediately closes out before anything is drawn on the window. I’m running Ubuntu 20, and here’s the crash report from the first error onwards plus how I’m launching it.

    
    Loaded /usr/share/openjfx/lib/./libjavafx_font_freetype.so from relative path
    Loaded /usr/share/openjfx/lib/./libjavafx_font_pango.so from relative path
    WARNING: java.lang.UnsatisfiedLinkError: Can't load library: /usr/share/openjfx/lib/libjfxwebkit.so
    Exception in Application start method
    ES2ResourceFactory: Prism - createStockShader: FillPgram_Color.frag
    ES2ResourceFactory: Prism - createStockShader: FillPgram_LinearGradient_PAD.frag
    ES2ResourceFactory: Prism - createStockShader: Solid_TextureRGB.frag
    ES2ResourceFactory: Prism - createStockShader: Solid_TextureFirstPassLCD.frag
    ES2ResourceFactory: Prism - createStockShader: Solid_TextureSecondPassLCD.frag
    new alphas with length = 4096
    ES2ResourceFactory: Prism - createStockShader: Texture_Color.frag
    QuantumRenderer: shutdown
    java.lang.reflect.InvocationTargetException
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    	at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464)
    	at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    	at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
    Caused by: java.lang.RuntimeException: Exception in Application start method
    	at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
    	at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
    	at java.base/java.lang.Thread.run(Thread.java:832)
    Caused by: java.lang.UnsatisfiedLinkError: no jfxwebkit in java.library.path: [/usr/lib/x86_64-linux-gnu/jni/]
    	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2680)
    	at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:807)
    	at java.base/java.lang.System.loadLibrary(System.java:1907)
    	at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
    	at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
    	at javafx.web/com.sun.webkit.WebPage.lambda$static$0(WebPage.java:133)
    	at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
    	at javafx.web/com.sun.webkit.WebPage.<clinit>(WebPage.java:132)
    	at javafx.web/javafx.scene.web.WebEngine.<init>(WebEngine.java:841)
    	at javafx.web/javafx.scene.web.WebEngine.<init>(WebEngine.java:826)
    	at javafx.web/javafx.scene.web.WebView.<init>(WebView.java:260)
    	at com.inkwellideas.ographer.ui.Worldographer.showLicenseDialog(Worldographer.java:616)
    	at com.inkwellideas.ographer.ui.Worldographer.start(Worldographer.java:544)
    	at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
    	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
    	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
    	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
    	at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
    	at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    	at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
    	... 1 more
    Exception running application com.inkwellideas.ographer.ui.Worldographer
    

    This is my script I’m using to launch it, mostly a copy-paste job from elsewhere on this forum.

    
    #!/bin/sh
    /usr/lib/jvm/jdk-14.0.2/bin/java -Djavafx.verbose=true -Dprism.verbose=true -Djava.library.path=/usr/lib/x86_64-linux-gnu/jni/ --module-path /usr/share/openjfx/lib/ --add-modules=javafx.controls,javafx.fxml,javafx.web,javafx.swing,javafx.media,javafx.graphics,javafx.web -XX:MaxRAMPercentage=70 -Dprism.maxvram=2G --add-exports=javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED -Dfile.encoding=UTF-8 -classpath /usr/share/openjfx/lib/javafx.base.jar:/usr/share/openjfx/lib/javafx.controls.jar:/usr/share/openjfx/lib/javafx.fxml.jar:/usr/share/openjfx/lib/javafx.graphics.jar:/usr/share/openjfx/lib/javafx.media.jar:/usr/share/openjfx/lib/javafx.swing.jar:/usr/share/openjfx/lib/javafx.web.jar -jar worldographer.jar
    
    #10290
    Joe
    Keymaster

    Unfortunately I’m not a linux expert, so I can’t say definitively what’s going on. My best guess is this is the core/main issue:
    java.lang.UnsatisfiedLinkError: no jfxwebkit in java.library.path: [/usr/lib/x86_64-linux-gnu/jni/]

    Maybe doing some googling on that specifically will point you to an answer. It seems your command line is listing javafx.web, which is where I think this module is. You do have it twice though, so maybe that is a problem? I’d also check if this file exists on your system and named correctly: /usr/share/openjfx/lib/javafx.web.jar

    #10295
    Anonymous
    Inactive

    Well, I posted a way to have Java 8 installed along side Java 10+ that works for me and use Java 8 for Worldographer. I saw it posted and went to edit it to clean up a bit of formatting and when I went to update it, it seems to have disappeared. When I get home from work tonight I will check back here and see what happened and possibly post the instructions again on how I do this.

    #10297
    Anonymous
    Inactive

    Seems like my original reply got lost, luckily I copied it out. I will try this again but split it up into a few separate posts.

    The main question comes down to how set are you on using java 10+ as the default on your Linux system?

    If you don’t mind having Java 8 as the default, then there is this method of installing Java 8 and setting it as default and Worldographer should work just fine with having it default open with OpenJDK8 Java 8 Runtime. I do this and am currently using Linux Mint XFCE 19.3 as my operating system, which has Java 11 as default upon Op System install. I have not run into any other problems or issues with them both installed, but cannot guarantee other people will not have compatibility issues.

    First off you need to download Java 8 and can get it here
    https://www.java.com/en/download/manual.jsp

    Under Linux you will probably want the 3rd one down and listed as “Linux x64 filesize: 85.54 MB” or at least that is how it is listed for me right now.

    The file should be: jre-8u261-linux-x64.tar.gz

    If it has been updated, change all references below of 8u261 to the new updated version.

    #10298
    Anonymous
    Inactive

    Bring up your terminal

    Create Installation Directory:
    sudo mkdir -p -v /opt/java

    Extract Downloaded File: (assuming you saved it to your Downloads folder)
    cd
    cd Downloads
    tar -xvzf jre-8u261-linux-x64.tar.gz

    Move the unpacked contents of the JRE file into the system folder that you created above (/opt/java), with the following command:
    sudo mv -v jre1.8.0_261/ /opt/java

    Environment Setup Now you’ll want to tell the system, that there’s a new Java version available:
    sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jre1.8.0_261/bin/java" 1

    Next step is let the system know that the new Java will be the default:
    sudo update-alternatives --set java /opt/java/jre1.8.0_261/bin/java
    you might not need to do this, but I do

    Java normally sets an insanely high amount of disk space for temporary internet files, you might want to bump that down in the settings here:
    /opt/java/jre1.8.0_261/bin/ControlPanel

    Hope this helps. When opening up the worldographer.jar file, you can set up OpenJDK8 Java 8 Runtime as the default application to open it with or right click and select every time.

    #10300
    Anonymous
    Inactive

    Running the official Java 8 jvm worked! Good idea, thanks for the help.

    #10302
    Anonymous
    Inactive

    Glad it is working for you. The only other issue I have had with running on Linux is the way Linux handles the <alt> key compared to windows. By default Linux defaults to use the <alt> key to grab and move a windows with the mouse while holding the key down, this interferes with adding an additional point to the middle of a line. But there is a fix for this.

    You mentioned you use Ubuntu 20, with me using Mint XFCE 19.3 (which is essentially just a different front end / GUI on an Ubuntu 20 back end) the settings might not be in the same place. I find it under Settings –> Window Manager Tweaks –> Accessibility Tab. There is a line entitled “Key to grab and move mouse windows” where I can change it from the <alt> key to another one. I usually set it to the <super> key, which is the Linux name for the Windows key (copyright thing) and then I can add additional points to the middle of a line as intended on Worlographer.

    #10310
    Joe
    Keymaster

    I’m glad you guys were able to sort this out. I don’t know if this will help or hurt the situation, but we are moving to Java 11+ for our releases. Java 14 has a Java packager which makes a native build for multiple platforms. But I don’t have a unix box at the moment (I may convert an older machine if I get time) so I’m not yet doing a native linux build. But it seems that if you do have a more recent Java installed (11+) I think this jar should be self executing without requiring so many options.

    Why are we going to Java 11 when Java 14 has the packager? Java 11 supposedly has long-term support, but 12 and 14 don’t. (13 does too, but I’d like to be a little backwards compatible.) The packager does let me specify a target code level, so I can set that to 11 even while using the Java 14 packager. I think/hope so anyway.

    Go to the worldographer.com/download page and scroll down to the “Upcoming Version” section to get it.

    #10402
    Anonymous
    Inactive

    With a recent Java version, you need to install the package openjfx (in the Universe repo.).

    Then, you can launch it with the following command, that loads OpenJFX:

    /usr/bin/java -Xmx8G --module-path /usr/share/openjfx/lib --add-modules=javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web -jar /path/to/worldographer.jar

    You need to change -Xmx to give a reasonable memory size and put the correct path to the Worldographer jar.

    HTH.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Posted in

In Archive