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

Move BSQ price in USD at first row #4988

Merged
merged 2 commits into from
Dec 29, 2020

Conversation

chimp1984
Copy link
Contributor

The USD price is more relevant for the DAO than the BSQ/BTC price. Also the arrow if price goes up or down is more stable and meaningful for the USD pair than for BTC as BTC price can be very volatile.

@chimp1984
Copy link
Contributor Author

Travis has lots of issues recently...

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':common:compileJava'.

> Could not resolve all files for configuration ':common:compileClasspath'.

   > Could not download javafx-base.jar (org.openjfx:javafx-base:11.0.2)

      > Could not get resource 'https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/11.0.2/javafx-base-11.0.2.jar'.

         > Could not GET 'https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/11.0.2/javafx-base-11.0.2.jar'.

            > Connection reset

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

@ripcurlx ripcurlx added this to the v1.5.3 milestone Dec 21, 2020
Copy link
Contributor

@ghubstan ghubstan left a comment

Choose a reason for hiding this comment

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

I would give this a Tested ACK right now, but will delay until you have seen what happens if I click the DAO menu item why the initial sync is in progress:

Dec-24 13:20:17.737 [JavaFX Application Thread] INFO  b.c.d.n.p.BlockParser: Parsing 0 transactions at block height 658790 took 0 ms 
Dec-24 13:20:17.843 [JavaFX Application Thread] INFO  b.c.d.n.p.BlockParser: Parsing 5 transactions at block height 658791 took 0 ms 
Dec-24 13:20:17.944 [JavaFX Application Thread] INFO  b.c.d.n.p.BlockParser: Parsing 1 transactions at block height 658792 took 0 ms 
Dec-24 13:20:17.974 [NetworkNode:SendMessage-to-n55uir3nbux3oerkmldrqiua3tvxedtcqggr5k4rprzvttqk3xawdhid.onion:9999] INFO  b.n.p.n.NetworkNode: Socket creation to peersNodeAddress n55uir3nbux3oerkmldrqiua3tvxedtcqggr5k4rprzvttqk3xawdhid.onion:9999 took 15216 ms 
Dec-24 13:20:18.391 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Uncaught Exception from thread JavaFX Application Thread 
Dec-24 13:20:18.391 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableMessage= null 
Dec-24 13:20:18.391 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableClass= class java.lang.NullPointerException 
Dec-24 13:20:18.393 [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.Parent.layout(Parent.java:1211)
	at javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.scene.Parent.layout(Parent.java:1211)
	at javafx.scene.Parent.layout(Parent.java:1211)
	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$ScenePulseListener.pulse(Scene.java:2482)
	at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
	at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
	at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
	at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:519)
	at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:499)
	at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:492)
	at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:320)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	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:835)
 
Dec-24 13:20:18.395 [JavaFX Application Thread] INFO  b.n.p.p.PeerManager: Num of latestLivePeers=9 
Dec-24 13:20:18.414 [JavaFX Application Thread] INFO  b.c.d.n.p.BlockParser: Parsing 0 transactions at block height 658793 took 0 ms 
Dec-24 13:20:18.577 [JavaFX Application Thread] INFO  b.c.d.n.p.BlockParser: Parsing 1 transactions at block height 658794 took 0 ms 
Dec-24 13:20:18.702 [JavaFX Application Thread] INFO  b.c.d.n.p.BlockParser: Parsing 0 transactions at block height 658795 took 0 ms 

@chimp1984
Copy link
Contributor Author

I assume that happens on master version as well. From my trivial changes I don't see how that can have caused it.

@ghubstan
Copy link
Contributor

I assume that happens on master version as well. From my trivial changes I don't see how that can have caused it.

It is related to jfoenix 9.0.6's use of reflection.

Tested ACK

@chimp1984
Copy link
Contributor Author

I assume that happens on master version as well. From my trivial changes I don't see how that can have caused it.

It is related to jfoenix 9.0.6's use of reflection.

Tested ACK

Or maybe we access some data which is not set at sync time... its a pity that exceptions in the UI dont show a useful stack trace... Maybe we should wrap all activate and initialize methods with try catch and print the stack trace...

@chimp1984
Copy link
Contributor Author

But I guess you are right and its a JFX library bug:

at bisq.desktop.components.JFXTextFieldSkinBisqStyle.updateTextPos(JFXTextFieldSkinBisqStyle.java:95)

line there is: double textWidth = textNode.getLayoutBounds().getWidth();
So either textNode or textNode.getLayoutBounds() is null...

textNode = ReflectionHelper.getFieldContent(TextFieldSkin.class, this, "textNode");

Do you run JDK 12? Seems there are issues:
sshahine/JFoenix#955
sshahine/JFoenix#986

@ghubstan
Copy link
Contributor

Do you run JDK 12? Seems there are issues:
jfoenixadmin/JFoenix#955
jfoenixadmin/JFoenix#986

I use OpenJDK 11 and 12 with v 10 src and target compatibility.

I believe the problem is not so easy to solve, since jfoenix 9.0.6 is not compatible with JDK 11+, and jfoenix 9.10.0 is not backward compatible -- and we're still stuck with shipping JDK 10 binaries due to the jpackager problem.

We've bumped into this problem many times, including this PR which was backed out.

@ghubstan
Copy link
Contributor

ghubstan commented Dec 24, 2020

I think we could get rid of the jfoenix dependency altogether without too much difficulty.

@ghubstan
Copy link
Contributor

I think we could get rid of the jfoenix dependency altogether without too much difficulty.

I take that back, there are too many jfoenix controls to say removing the dependency would be easy.
But this particular problem might be avoided. Investigating now...

@chimp1984
Copy link
Contributor Author

chimp1984 commented Dec 24, 2020

I think we could get rid of the jfoenix dependency altogether without too much difficulty.

I take that back, there are too many jfoenix controls to say removing the dependency would be easy.
But this particular problem might be avoided. Investigating now...

I think there was a jvm arg to be passed which fixed it... or use jdk 10 for now.

I think we are close anyway for the JDK update. That should resolve it as well.

@ghubstan
Copy link
Contributor

You're right, the NPE does not appear when building & running on JDK 10. I tried using jfoenix's 9.0.10 ReflectionHelper, and that worked in JDK 11, but not JDK 12. I don't know which jvm arg might avoid it. I tried -XX:-RelaxAccessControlCheck, but that didn't work.

Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

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

utACK

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

Successfully merging this pull request may close these issues.

3 participants