RPTools / TokenTool

TokenTool removes much of the tedium from creating tokens for use with MapTool or your favorite online gaming application. Just drag an image into the background, select a frame, zoom and pan to suit, and drag off a finished token. The resulting token is transparent around the edges and cropped to the size you wanted.

Home Page:http://www.rptools.net/toolbox/token-tool/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash to desktop on loading

TheMatthew opened this issue · comments

Describe the bug
Token tool does not launch from a clean install of Ubuntu 22.04

To Reproduce
I have a stack trace.
/opt/tokentool/bin$ ./TokenTool
2022-06-11 14:54:50,178 JavaFX-Launcher ERROR Appenders contains an invalid element or attribute "Sentry"
2022-06-11 14:54:50,190 JavaFX-Launcher ERROR Unable to locate appender "Sentry" for logger config "root"
14:54:50.256 (null:-1) [JavaFX-Launcher] INFO - Overlays installed: 183
14:54:50.293 (null:-1) [JavaFX-Launcher] INFO - Environment: Production
14:54:50.294 (null:-1) [JavaFX-Launcher] INFO - Sentry DSN: https://312e480e6390426095b0a66a11f343a9@sentry.io/1406000
14:54:50.294 (null:-1) [JavaFX-Launcher] INFO - Vendor: rptools
14:54:50.294 (null:-1) [JavaFX-Launcher] INFO - Release: 2.2.1
14:54:50.295 (null:-1) [JavaFX-Launcher] INFO - OS: Linux
14:54:50.295 (null:-1) [JavaFX-Launcher] INFO - 3D Hardware Available? false
14:54:50.303 (null:-1) [JavaFX-Launcher] DEBUG - caching /home/matthew/.tokentool-rptools/overlays
14:54:50.303 (null:-1) [JavaFX-Launcher] DEBUG - caching /home/matthew/.tokentool-rptools/overlays/Cards
Exception in Application init method
java.lang.reflect.InvocationTargetException
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 javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source)
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 java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.RuntimeException: Exception in Application init method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Image dimensions must be positive (w,h > 0)
at javafx.graphics/javafx.scene.image.Image.(Unknown Source)
at javafx.graphics/javafx.scene.image.WritableImage.(Unknown Source)
at net.rptools.tokentool@2.2.1/net.rptools.tokentool.util.ImageUtil.processMagenta(Unknown Source)
at net.rptools.tokentool@2.2.1/net.rptools.tokentool.util.ImageUtil.getImage(Unknown Source)
at net.rptools.tokentool@2.2.1/net.rptools.tokentool.util.ImageUtil.getOverlayThumb(Unknown Source)
at net.rptools.tokentool@2.2.1/net.rptools.tokentool.client.TokenTool.cacheOverlays(Unknown Source)
at net.rptools.tokentool@2.2.1/net.rptools.tokentool.client.TokenTool.cacheOverlays(Unknown Source)
at net.rptools.tokentool@2.2.1/net.rptools.tokentool.client.TokenTool.init(Unknown Source)
... 3 more
Exception running application net.rptools.tokentool.client.TokenTool

Expected behavior
Should load.

Screenshots
If applicable, add screenshots to help explain your problem.

TokenTool Info

  • Version: 2.2.1
  • Install: New

Desktop (please complete the following information):

  • OS: Ubuntu Linux
  • Version 22.04

Additional context
Add any other context about the problem here.
You can also attach files (drag and drop here or paste from clipboard) such as log files or screenshots. For large files, paste a file sharing link.

Delete the card files in: /home/matthew/.tokentool-rptools/overlays/Cards

Worked!

Was a card corrupt in the installer? I used the deb.

There is something about those JPGs that the image reader libraries used on Linux don't like. Chances are that just loading/re-saving them out of a different image editor would be sufficient.

I was having the same issue. Through trial and error I was able to determine jpg files don't want to load for some reason. Using GIMP, I converted all the jpg images to png. I was then able to launch the program and see the overlays.