Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property fields must not be set from non JavaFX threads. #4916

Conversation

chimp1984
Copy link
Contributor

So we map those setters to our UserThread.

How to reproduce issue?
Restore from seed triggered following exception:

Dec-08 13:20:04.547 [ STARTING] ERROR bisq.common.setup.CommonSetup: Stack trace:
java.lang.IllegalStateException: Not on FX application thread; currentThread = STARTING
at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:291)
at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:424)
at javafx.scene.Parent$3.onProposedChange(Parent.java:471)
at com.sun.javafx.collections.VetoableListDecorator.setAll(VetoableListDecorator.java:113)
at com.sun.javafx.collections.VetoableListDecorator.setAll(VetoableListDecorator.java:108)
at javafx.scene.control.skin.LabeledSkinBase.updateChildren(LabeledSkinBase.java:272)
at javafx.scene.control.skin.LabeledSkinBase.lambda$new$11(LabeledSkinBase.java:220)
at com.sun.javafx.scene.control.LambdaMultiplePropertyChangeListenerHandler.lambda$new$1(LambdaMultiplePropertyChangeListenerHandler.java:49)
at javafx.beans.value.WeakChangeListener.changed(WeakChangeListener.java:86)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:181)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:104)
at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:111)
at javafx.beans.property.StringPropertyBase.access$000(StringPropertyBase.java:50)
at javafx.beans.property.StringPropertyBase$Listener.invalidated(StringPropertyBase.java:231)
at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:104)
at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:111)
at javafx.beans.property.StringPropertyBase.access$000(StringPropertyBase.java:50)
at javafx.beans.property.StringPropertyBase$Listener.invalidated(StringPropertyBase.java:231)
at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:348)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:104)
at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:111)
at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:145)
at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:50)
at bisq.core.app.WalletAppSetup.lambda$init$1(WalletAppSetup.java:170)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:181)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
at javafx.beans.binding.ObjectBinding.invalidate(ObjectBinding.java:170)
at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
at javafx.beans.property.IntegerPropertyBase.fireValueChangedEvent(IntegerPropertyBase.java:107)
at javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:114)
at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:148)
at bisq.core.btc.setup.WalletsSetup$1.onSetupCompleted(WalletsSetup.java:245)

Fixes #replaceWithIssueNr, fixes #replaceWithIssueNr

Your PR description here.

So we map those setters to our UserThread.

How to reproduce issue?
Restore from seed triggered following exception:

Dec-08 13:20:04.547 [ STARTING] ERROR bisq.common.setup.CommonSetup: Stack trace:
java.lang.IllegalStateException: Not on FX application thread; currentThread =  STARTING
	at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:291)
	at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:424)
	at javafx.scene.Parent$3.onProposedChange(Parent.java:471)
	at com.sun.javafx.collections.VetoableListDecorator.setAll(VetoableListDecorator.java:113)
	at com.sun.javafx.collections.VetoableListDecorator.setAll(VetoableListDecorator.java:108)
	at javafx.scene.control.skin.LabeledSkinBase.updateChildren(LabeledSkinBase.java:272)
	at javafx.scene.control.skin.LabeledSkinBase.lambda$new$11(LabeledSkinBase.java:220)
	at com.sun.javafx.scene.control.LambdaMultiplePropertyChangeListenerHandler.lambda$new$1(LambdaMultiplePropertyChangeListenerHandler.java:49)
	at javafx.beans.value.WeakChangeListener.changed(WeakChangeListener.java:86)
	at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:181)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:104)
	at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:111)
	at javafx.beans.property.StringPropertyBase.access$000(StringPropertyBase.java:50)
	at javafx.beans.property.StringPropertyBase$Listener.invalidated(StringPropertyBase.java:231)
	at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:104)
	at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:111)
	at javafx.beans.property.StringPropertyBase.access$000(StringPropertyBase.java:50)
	at javafx.beans.property.StringPropertyBase$Listener.invalidated(StringPropertyBase.java:231)
	at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:348)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.beans.property.StringPropertyBase.fireValueChangedEvent(StringPropertyBase.java:104)
	at javafx.beans.property.StringPropertyBase.markInvalid(StringPropertyBase.java:111)
	at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:145)
	at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:50)
	at bisq.core.app.WalletAppSetup.lambda$init$1(WalletAppSetup.java:170)
	at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:181)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.beans.binding.ObjectBinding.invalidate(ObjectBinding.java:170)
	at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
	at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
	at javafx.beans.property.IntegerPropertyBase.fireValueChangedEvent(IntegerPropertyBase.java:107)
	at javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:114)
	at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:148)
	at bisq.core.btc.setup.WalletsSetup$1.onSetupCompleted(WalletsSetup.java:245)
@ripcurlx
Copy link
Contributor

ripcurlx commented Dec 9, 2020

I tried to do this on Regtest (Restore from seed), but didn't experience this issue described above. Does it need a specific setup?

@chimp1984
Copy link
Contributor Author

@ripcurlx You tried it with master version, right? I tried it 2 times and got it always at shutdown.

@chimp1984 chimp1984 changed the title Property fields must not bet set from non JavaFX threads. Property fields must not be set from non JavaFX threads. Dec 14, 2020
Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

This fixed the issue for me and it looks correct to map to user thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants