I’m trying to convert Base64 Image Strings and some URLs to images but one or more of the images I get from the server seem to be corrupted. I can pick them out per hand but I need a code solution for this. I wrote the methode prepareAvatar which gets a String avatar that is either a Base64 String or a URL, like imgur or something like that.

    public Circle prepareAvatar(String avatar) {
        Image image;
        if (avatar == null || avatar.equals("")) {
            image = defaultAvatar;
        }else{
            Image newImage = new Image(avatar);
            if(newImage == null){
                image = defaultAvatar;
            }else{
                image = newImage;
            }

        }
        Circle avatarCircle = new Circle();
        avatarCircle.setRadius(Constants.AVATAR_SIZE);
        avatarCircle.setStroke(Color.BLACK);
        avatarCircle.setFill(new ImagePattern(image));
        return avatarCircle;
    }

At the moment I just try to filter out alle avatars which are null or “” and that seems to work. Because I get the exception “Exception in thread “JavaFX Application Thread” java.lang.IllegalArgumentException: Image must be non-null” I tried to create a new Instance of Image newImage and just check whether it is not null. That doesn’t seem to work and I still get the same exception. Stacktrace:

Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Image must be non-null
    at com.sun.prism.paint.ImagePattern.<init>(ImagePattern.java:47)
    at com.sun.prism.paint.ImagePattern.<init>(ImagePattern.java:65)
    at com.sun.javafx.tk.quantum.QuantumToolkit.createImagePatternPaint(QuantumToolkit.java:981)
    at com.sun.javafx.tk.Toolkit.getPaint(Toolkit.java:680)
    at javafx.scene.paint.ImagePattern.acc_getPlatformPaint(ImagePattern.java:292)
    at javafx.scene.paint.Paint$1.getPlatformPaint(Paint.java:48)
    at javafx.scene.shape.Shape.updatePGShape(Shape.java:963)
    at javafx.scene.shape.Shape.doUpdatePeer(Shape.java:998)
    at javafx.scene.shape.Shape$1.doUpdatePeer(Shape.java:131)
    at com.sun.javafx.scene.shape.ShapeHelper.updatePeerImpl(ShapeHelper.java:74)
    at com.sun.javafx.scene.shape.CircleHelper.updatePeerImpl(CircleHelper.java:64)
    at com.sun.javafx.scene.NodeHelper.updatePeer(NodeHelper.java:103)
    at javafx.scene.Node.syncPeer(Node.java:715)
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2399)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getScene()" because "<local2>" is null
    at javafx.scene.Scene$ScenePulseListener.synchronizeSceneNodes(Scene.java:2398)
    at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2545)
    at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:421)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:420)
    at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:450)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:575)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:555)
    at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:548)
    at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:353)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)