[bisq-network/bisq] Upgrade JFoenix to v9.0.10 (#4443)

Stan notifications at github.com
Thu Aug 27 19:49:57 UTC 2020


This PR upgrades `JFoenix` from v9.0.6 to v9.0.10, to avoid an NPE thrown when registering a dispute agent in an arbitrator (regtest) desktop's account view.

The JFoenix `com.jfoenix.adapters.ReflectionHelper` class has a `getField` method that silently swallows a Throwable and returns null.  After clicking `ALT-D` or `ALT-N` in the an arbitrator's desktop -> accounts view (register dispute agents) a private field cannot be accessed via reflection, and `bisq.desktop.components.JFXTextFieldSkinBisqStyle#updateTextPos` throws an NPE.

![1-UI-Error](https://user-images.githubusercontent.com/36207203/91487448-260dff00-e884-11ea-9006-1eeb54fb9d6f.png)

```
Aug-27 12:59:45.970 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Uncaught Exception from thread JavaFX Application Thread 
Aug-27 12:59:45.970 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableMessage= null 
Aug-27 12:59:45.970 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableClass= class java.lang.NullPointerException 
Aug-27 12:59:45.971 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Stack trace:
java.lang.NullPointerException
	at bisq.desktop.components.JFXTextFieldSkinBisqStyle.updateTextPos(JFXTextFieldSkinBisqStyle.java:95)
	at bisq.desktop.components.JFXTextFieldSkinBisqStyle.layoutChildren(JFXTextFieldSkinBisqStyle.java:79)
	at javafx.scene.control.Control.layoutChildren(Control.java:601)
	at javafx.scene.Parent.layout(Parent.java:1204)
	at javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.scene.Scene.doLayoutPass(Scene.java:576)
	at javafx.scene.Scene.preferredSize(Scene.java:1748)
	at javafx.scene.Scene$2.preferredSize(Scene.java:393)
	at com.sun.javafx.scene.SceneHelper.preferredSize(SceneHelper.java:66)
	at javafx.stage.Window$12.invalidated(Window.java:1086)
	at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:110)
	at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
	at javafx.stage.Window.setShowing(Window.java:1174)
	at javafx.stage.Window.show(Window.java:1189)
	at javafx.stage.Stage.show(Stage.java:273)
	at bisq.desktop.main.overlays.Overlay.display(Overlay.java:538)
	at bisq.desktop.main.overlays.windows.UnlockDisputeAgentRegistrationWindow.show(UnlockDisputeAgentRegistrationWindow.java:85)
	at bisq.desktop.main.account.register.AgentRegistrationView.onTabSelection(AgentRegistrationView.java:121)
	at bisq.desktop.main.account.AccountView.loadView(AccountView.java:269)
	at bisq.desktop.main.account.AccountView.lambda$initialize$0(AccountView.java:114)
	at bisq.desktop.Navigation.lambda$navigateTo$1(Navigation.java:138)
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:804)
	at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
	at bisq.desktop.Navigation.navigateTo(Navigation.java:138)
	at bisq.desktop.Navigation.navigateTo(Navigation.java:103)
	at bisq.desktop.main.account.AccountView.lambda$initialize$1(AccountView.java:132)
	at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
	at javafx.event.Event.fireEvent(Event.java:198)
	at javafx.scene.Scene$KeyHandler.process(Scene.java:4058)
	at javafx.scene.Scene$KeyHandler.access$1500(Scene.java:4004)
	at javafx.scene.Scene.processKeyEvent(Scene.java:2121)
	at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2595)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:217)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:149)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(GlassViewEventHandler.java:248)
	at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:390)
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:247)
	at com.sun.glass.ui.View.handleKeyEvent(View.java:547)
	at com.sun.glass.ui.View.notifyKey(View.java:971)
	at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
	at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
	at java.base/java.lang.Thread.run(Thread.java:832)
 ```

The NPE follows the failure to create a `textNode` instance using reflection, in the `JFXTextFieldSkinBisqStyle` constructor:
` textNode = ReflectionHelper.getFieldContent(TextFieldSkin.class, this, "textNode");`

If this happens, the UI becomes unusable -- many views are blank.

![3-BlankSettings](https://user-images.githubusercontent.com/36207203/91487577-52c21680-e884-11ea-9657-9cd97c742991.png)

![4-BlankDAO](https://user-images.githubusercontent.com/36207203/91487593-5786ca80-e884-11ea-83eb-250abc348b5d.png)

This problem has not been reproduced when running the `bisq-desktop` cmd below from a Linux (Ubuntu 20) bash shell:

`$ ./bisq-desktop --appName=bisq-BTC_REGTEST_Arb_dao --appDataDir=<project-path>/apitest/build/resources/main/bisq-BTC_REGTEST_Arb_dao --nodePort=4444 --rpcBlockNotificationPort=5121 --rpcUser=apitest --rpcPassword=apitest --rpcPort=19443 --daoActivated=true --fullDaoNode=true --seedNodes=localhost:2002 --baseCurrencyNetwork=BTC_REGTEST --useDevPrivilegeKeys=true --useLocalhostForP2P=true --genesisBlockHeight=111 --genesisTxId=30af0050040befd8af25068cc697e418e09c2d8ebd8d411d2240591b9ec203cf
`

The same bisq-desktop cmd run by `:apitest` (using a java `ProcessBuilder`) reproduces the NPE every time.  We need to be able to register dispute agents from an arbitration node started by any API test case.

You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/4443

-- Commit Summary --

  * Upgrade JFoenix to v9.0.10

-- File Changes --

    M build.gradle (2)
    M gradle/witness/gradle-witness.gradle (2)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/4443.patch
https://github.com/bisq-network/bisq/pull/4443.diff

-- 
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/pull/4443
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200827/aca2f132/attachment.html>


More information about the bisq-github mailing list