<p>This PR upgrades <code>JFoenix</code> 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.</p>
<p>The JFoenix <code>com.jfoenix.adapters.ReflectionHelper</code> class has a <code>getField</code> method that silently swallows a Throwable and returns null.  After clicking <code>ALT-D</code> or <code>ALT-N</code> in the an arbitrator's desktop -> accounts view (register dispute agents) a private field cannot be accessed via reflection, and <code>bisq.desktop.components.JFXTextFieldSkinBisqStyle#updateTextPos</code> throws an NPE.</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/36207203/91487448-260dff00-e884-11ea-9006-1eeb54fb9d6f.png"><img src="https://user-images.githubusercontent.com/36207203/91487448-260dff00-e884-11ea-9006-1eeb54fb9d6f.png" alt="1-UI-Error" style="max-width:100%;"></a></p>
<pre><code>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)
</code></pre>
<p>The NPE follows the failure to create a <code>textNode</code> instance using reflection, in the <code>JFXTextFieldSkinBisqStyle</code> constructor:<br>
<code> textNode = ReflectionHelper.getFieldContent(TextFieldSkin.class, this, "textNode");</code></p>
<p>If this happens, the UI becomes unusable -- many views are blank.</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/36207203/91487577-52c21680-e884-11ea-9657-9cd97c742991.png"><img src="https://user-images.githubusercontent.com/36207203/91487577-52c21680-e884-11ea-9657-9cd97c742991.png" alt="3-BlankSettings" style="max-width:100%;"></a></p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/36207203/91487593-5786ca80-e884-11ea-83eb-250abc348b5d.png"><img src="https://user-images.githubusercontent.com/36207203/91487593-5786ca80-e884-11ea-83eb-250abc348b5d.png" alt="4-BlankDAO" style="max-width:100%;"></a></p>
<p>This problem has not been reproduced when running the <code>bisq-desktop</code> cmd below from a Linux (Ubuntu 20) bash shell:</p>
<p><code>$ ./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 </code></p>
<p>The same bisq-desktop cmd run by <code>:apitest</code> (using a java <code>ProcessBuilder</code>) reproduces the NPE every time.  We need to be able to register dispute agents from an arbitration node started by any API test case.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/4443'>https://github.com/bisq-network/bisq/pull/4443</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Upgrade JFoenix to v9.0.10</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4443/files#diff-c197962302397baf3a4cc36463dce5ea">build.gradle</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/4443/files#diff-d5a9251f678d7f964871b83c050aa9a7">gradle/witness/gradle-witness.gradle</a>
    (2)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/4443.patch'>https://github.com/bisq-network/bisq/pull/4443.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/4443.diff'>https://github.com/bisq-network/bisq/pull/4443.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4443">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNRCKWYFSZRNITHSFWTSC22GLANCNFSM4QNLKKQA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNTZQBBMJFDGCGTW3J3SC22GLA5CNFSM4QNLKKQKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KH2MCVQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4443",
"url": "https://github.com/bisq-network/bisq/pull/4443",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>