Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved Not on FX application thread Exception when pausing bot

Java Warlord
Joined
Nov 17, 2014
Messages
4,906
Calling AbstractScript#pause() from a new thread will cause this:

Code:
java.lang.IllegalStateException: Not on FX application thread; currentThread = Break-scheduler
    at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:236)
    at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:423)
    at javafx.scene.Parent$2.onProposedChange(Parent.java:367)
    at com.sun.javafx.collections.VetoableListDecorator.setAll(VetoableListDecorator.java:113)
    at com.sun.javafx.collections.VetoableListDecorator.setAll(VetoableListDecorator.java:108)
    at com.sun.javafx.scene.control.skin.LabeledSkinBase.updateChildren(LabeledSkinBase.java:582)
    at com.sun.javafx.scene.control.skin.LabeledSkinBase.handleControlPropertyChanged(LabeledSkinBase.java:204)
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase.lambda$registerChangeListener$61(BehaviorSkinBase.java:197)
    at com.sun.javafx.scene.control.MultiplePropertyChangeListenerHandler$1.changed(MultiplePropertyChangeListenerHandler.java:55)
    at javafx.beans.value.WeakChangeListener.changed(WeakChangeListener.java:89)
    at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:182)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
    at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:103)
    at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:110)
    at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:144)
    at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:49)
    at javafx.beans.property.StringProperty.setValue(StringProperty.java:65)
    at javafx.scene.control.Labeled.setText(Labeled.java:145)
    at nul.IIIiiIiIiiii.super(htb:56)
    at nul.IIIiiIiIiiii.true(htb:272)
    at nul.iiIIiIiIIiIi.super(fjc:135)
    at com.runemate.game.api.script.framework.AbstractScript.pause(ivb:70)
    at net.celestialproductions.api.game.antipattern.break_handler.BreakScheduler.lambda$consider$1(BreakScheduler.java:43)
    at java.lang.Thread.run(Thread.java:745)
javafx.fxml.LoadException:
/C:/Users/Torben/RuneMate/temp/-731870424.res

    at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2579)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
    at nul.IiiIiiiIIIii.true(fp:122)
    at nul.IiiIiiiIIIii.true(fp:202)
    at nul.iiiiIIiiIiIi.<init>(eqb:6)
    at nul.iiiiIIiIiiii.<init>(eqb:35)
    at nul.iIIiIIiIiiIi.<init>(eqb:35)
    at nul.iiIIIIiiIiIi.true(avb:11008)
    at com.runemate.game.api.script.framework.core.LoopingThread$LTExceptionHandler.uncaughtException(lnb:98)
    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1057)
    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1052)
    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1052)
    at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:184)
    at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
    at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:103)
    at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:110)
    at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:144)
    at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:49)
    at javafx.beans.property.StringProperty.setValue(StringProperty.java:65)
    at javafx.scene.control.Labeled.setText(Labeled.java:145)
    at nul.IIIiiIiIiiii.super(htb:56)
    at nul.IIIiiIiIiiii.true(htb:272)
    at nul.iiIIiIiIIiIi.super(fjc:135)
    at com.runemate.game.api.script.framework.AbstractScript.pause(ivb:70)
    at net.celestialproductions.api.game.antipattern.break_handler.BreakScheduler.lambda$consider$1(BreakScheduler.java:43)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at nul.iiiiIIiiIiIi.initialize(eqb:273)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
    ... 26 more
 
Top