[bisq-network/bisq] Not on FX application thread exception at shut down (#4148)

chimp1984 notifications at github.com
Wed Apr 8 22:51:22 UTC 2020


Seems the recent changes by @stejbac making the UserThread thread safe causes this axception at shut down (shutdown done in IDE without closing Bisq window):

In BisqApp.java:153
```
new Thread(() -> {
                gracefulShutDownHandler.gracefulShutDown(() -> {
                    log.debug("App shutdown complete");
                });
            })
```

```
java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-6
	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.set(StringPropertyBase.java:145)
	at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:50)
	at javafx.beans.property.StringProperty.setValue(StringProperty.java:65)
	at javafx.scene.control.Labeled.setText(Labeled.java:147)
	at bisq.desktop.main.offer.offerbook.OfferBookView.lambda$initialize$6(OfferBookView.java:259)
	at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
	at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
	at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
	at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
	at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
	at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
	at javafx.collections.transformation.SortedList.sourceChanged(SortedList.java:111)
	at javafx.collections.transformation.TransformationList.lambda$getListener$0(TransformationList.java:106)
	at javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88)
	at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
	at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
	at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
	at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
	at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
	at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
	at javafx.collections.transformation.FilteredList.sourceChanged(FilteredList.java:147)
	at javafx.collections.transformation.TransformationList.lambda$getListener$0(TransformationList.java:106)
	at javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88)
	at com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:164)
	at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
	at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
	at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
	at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
	at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
	at javafx.collections.ModifiableObservableListBase.remove(ModifiableObservableListBase.java:183)
	at javafx.collections.ModifiableObservableListBase.remove(ModifiableObservableListBase.java:171)
	at java.base/java.util.Optional.ifPresent(Optional.java:172)
	at bisq.desktop.main.offer.offerbook.OfferBook$1.onRemoved(OfferBook.java:110)
	at bisq.core.offer.OfferBookService$1.lambda$onRemoved$2(OfferBookService.java:107)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at bisq.core.offer.OfferBookService$1.lambda$onRemoved$3(OfferBookService.java:102)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1378)
	at bisq.core.offer.OfferBookService$1.onRemoved(OfferBookService.java:102)
	at bisq.network.p2p.storage.P2PDataStorage.lambda$removeFromMapAndDataStore$16(P2PDataStorage.java:853)
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:804)
	at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
	at bisq.network.p2p.storage.P2PDataStorage.removeFromMapAndDataStore(P2PDataStorage.java:853)
	at bisq.network.p2p.storage.P2PDataStorage.removeFromMapAndDataStore(P2PDataStorage.java:828)
	at bisq.network.p2p.storage.P2PDataStorage.remove(P2PDataStorage.java:711)
	at bisq.network.p2p.P2PService.removeData(P2PService.java:822)
	at bisq.core.offer.OfferBookService.removeOffer(OfferBookService.java:184)
	at bisq.core.offer.OfferBookService.removeOfferAtShutDown(OfferBookService.java:207)
	at bisq.core.offer.OpenOfferManager.lambda$shutDown$4(OpenOfferManager.java:227)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at bisq.core.trade.TradableList.forEach(TradableList.java:136)
	at bisq.core.offer.OpenOfferManager.shutDown(OpenOfferManager.java:227)
	at bisq.core.app.BisqExecutable.gracefulShutDown(BisqExecutable.java:216)
	at bisq.desktop.app.BisqApp.lambda$stop$2(BisqApp.java:153)
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/issues/4148
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200408/2e2a6c3a/attachment.html>


More information about the bisq-github mailing list