Pathweaver Linux Can't Load Create Screen
Describe the bug
Nothing happens when I click the Create Project button
To Reproduce
Steps to reproduce the behavior:
- Open the WPILib Command Pallete
- Select the Start Tool option
- Select Pathweaver
Expected behavior
I expected the create project form to pop up
Stacktrace
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Pop OS 21.10 (Ubuntu based)
- Java version WPILib 2022.2.1 built in and OpenJDK 11.0.13
Additional context
When I run the pathweaver jar from the command line I get the following output
micah@pop-os:~$ java --version openjdk 11.0.13 2021-10-19 OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.21.10) OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.21.10, mixed mode, sharing)
micah@pop-os:~$ java -jar '/home/micah/wpilib/2022/tools/PathWeaver.jar'
Jan 23, 2022 12:12:22 AM edu.wpi.first.pathweaver.Loggers setupLoggers
CONFIG: Configuration done.
Jan 23, 2022 12:12:27 AM edu.wpi.first.pathweaver.WelcomeController createProject
WARNING: Couldn't load create project screen
javafx.fxml.LoadException:
file:/home/micah/wpilib/2022/tools/PathWeaver.jar!/edu/wpi/first/pathweaver/createProject.fxml
at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2625)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2595)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2466)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3237)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3194)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3163)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3136)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3113)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3106)
at edu.wpi.first.pathweaver.WelcomeController.createProject(WelcomeController.java:48)
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:566)
at com.sun.javafx.reflect.Trampoline.invoke(MethodUtil.java:76)
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:566)
at com.sun.javafx.reflect.MethodUtil.invoke(MethodUtil.java:273)
at com.sun.javafx.fxml.MethodHelper.invoke(MethodHelper.java:83)
at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1784)
at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1670)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
at javafx.event.Event.fireEvent(Event.java:198)
at javafx.scene.Node.fireEvent(Node.java:8879)
at javafx.scene.control.Button.fire(Button.java:200)
at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:206)
at com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.event.Event.fireEvent(Event.java:198)
at javafx.scene.Scene$MouseHandler.process(Scene.java:3851)
at javafx.scene.Scene$MouseHandler.access$1200(Scene.java:3579)
at javafx.scene.Scene.processMouseEvent(Scene.java:1849)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2588)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:390)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433)
at com.sun.glass.ui.View.handleMouseEvent(View.java:556)
at com.sun.glass.ui.View.notifyMouse(View.java:942)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: 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:566)
at com.sun.javafx.reflect.Trampoline.invoke(MethodUtil.java:76)
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:566)
at com.sun.javafx.reflect.MethodUtil.invoke(MethodUtil.java:273)
at com.sun.javafx.fxml.MethodHelper.invoke(MethodHelper.java:83)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2591)
... 67 more
Caused by: java.lang.ExceptionInInitializerError
at edu.wpi.first.pathweaver.CreateProjectController.initialize(CreateProjectController.java:105)
... 79 more
Caused by: com.google.gson.JsonParseException: Invalid or nonexistent image: 2019-field.jpg
at edu.wpi.first.pathweaver.extensions.ExtensionLoader$ExtensionJsonDeserializer.deserialize(ExtensionLoader.java:229)
at edu.wpi.first.pathweaver.extensions.ExtensionLoader$ExtensionJsonDeserializer.deserialize(ExtensionLoader.java:212)
at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:69)
at com.google.gson.Gson.fromJson(Gson.java:927)
at com.google.gson.Gson.fromJson(Gson.java:892)
at com.google.gson.Gson.fromJson(Gson.java:841)
at com.google.gson.Gson.fromJson(Gson.java:813)
at edu.wpi.first.pathweaver.extensions.ExtensionLoader.loadFromJsonString(ExtensionLoader.java:199)
at edu.wpi.first.pathweaver.Game.loadGameFromResource(Game.java:106)
at edu.wpi.first.pathweaver.Game.<clinit>(Game.java:19)
... 80 more
Caused by: java.io.IOException: Wrong JPEG library version: library is 80, caller expects 70
at com.sun.javafx.iio.jpeg.JPEGImageLoader.initDecompressor(Native Method)
at com.sun.javafx.iio.jpeg.JPEGImageLoader.<init>(JPEGImageLoader.java:185)
at com.sun.javafx.iio.jpeg.JPEGImageLoaderFactory.createImageLoader(JPEGImageLoaderFactory.java:49)
at com.sun.javafx.iio.ImageStorage.getLoaderBySignature(ImageStorage.java:421)
at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:266)
at com.sun.javafx.tk.quantum.PrismImageLoader2.loadAll(PrismImageLoader2.java:142)
at com.sun.javafx.tk.quantum.PrismImageLoader2.<init>(PrismImageLoader2.java:77)
at com.sun.javafx.tk.quantum.QuantumToolkit.loadImage(QuantumToolkit.java:750)
at javafx.scene.image.Image.loadImage(Image.java:1060)
at javafx.scene.image.Image.initialize(Image.java:799)
at javafx.scene.image.Image.<init>(Image.java:702)
at edu.wpi.first.pathweaver.Game.lambda$loadGameFromResource$1(Game.java:106)
at edu.wpi.first.pathweaver.extensions.ExtensionLoader$ExtensionJsonDeserializer.deserialize(ExtensionLoader.java:227)
... 89 more
JDK 11 requires libjpeg 7, but you only have libjpeg 8 or higher installed locally. I expect this is going to happen more frequently as people run newer Ubuntu versions. The fix is to install libjpeg 7. The two versions can coexist.
Looks like openjfx 12 was updated to libjpeg 9c. https://bugs.openjdk.java.net/browse/JDK-8203884
libjpeg 7 doesn't seem to be available in my apt repositories. Is there a recommended install method?

See if libjpeg62 works. It might be forward compatible with libjpeg7.
Also see #246.
libjpeg62 doesn't work
The only other recourse I see is compiling libjpeg7 yourself as per the issue Peter linked (was for Arch, so might not be possible on Ubuntu), or using Windows instead.
Building PathWeaver from source with a newer JDK might work too. I had to make the following changes for it to compile with a newer JDK version.
diff --git a/build.gradle b/build.gradle
index 26c69e8..b1a1ae1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -9,10 +9,10 @@ import static org.gradle.api.artifacts.type.ArtifactTypeDefinition.ZIP_TYPE
plugins {
id 'java'
id 'application'
- id 'com.github.johnrengelman.shadow' version '7.1.1'
- id "com.jfrog.artifactory" version "4.16.0"
- id "com.diffplug.spotless" version "6.0.5"
- id "com.github.spotbugs" version "5.0.3"
+ id 'com.github.johnrengelman.shadow' version '7.1.2'
+ id "com.jfrog.artifactory" version "4.26.2"
+ id "com.diffplug.spotless" version "6.1.2"
+ id "com.github.spotbugs" version "5.0.4"
id 'maven-publish'
id 'idea'
id 'jacoco'
@@ -169,7 +169,7 @@ spotbugs {
}
jacoco {
- toolVersion = "0.8.5"
+ toolVersion = "0.8.7"
}
tasks.withType(JacocoReport).configureEach {
You'd run it with ./gradlew run.
It still seems to require libjpeg7 though, despite running on a later JDK that's supposedly patched.