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

NPE at startup #5170

Closed
941design opened this issue Feb 7, 2021 · 9 comments
Closed

NPE at startup #5170

941design opened this issue Feb 7, 2021 · 9 comments

Comments

@941design
Copy link

Description

Error during start up messes up layout unusable.

Version

v1.5.5

Additional info

Feb-07 21:35:46.427 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Uncaught Exception from thread JavaFX Application Thread 
Feb-07 21:35:46.427 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableMessage= Cannot invoke "javafx.scene.Node.getLayoutBounds()" because "this.textNode" is null 
Feb-07 21:35:46.427 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableClass= class java.lang.NullPointerException 
Feb-07 21:35:46.429 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Stack trace:
java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getLayoutBounds()" because "this.textNode" is null
	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.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:391)
	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:832)
@boring-cyborg
Copy link

boring-cyborg bot commented Feb 7, 2021

Thanks for opening your first issue here!

Be sure to follow the issue template. Your issue will be reviewed by a maintainer and labeled for further action.

@ghost
Copy link

ghost commented Feb 8, 2021

@ghubstan this appears to be an instance of the problem fixed in #4443 but then reverted in #4463

@ripcurlx
Copy link
Contributor

ripcurlx commented Feb 9, 2021

@941design Did you build it from source or running a shipped binary?

@cd2357
Copy link
Contributor

cd2357 commented Mar 29, 2021

@941design can you please answer the question above? Thanks.

@941design
Copy link
Author

Installed from AUR on arch-linux with defaults. I will check if I can still reproduce.

@941design
Copy link
Author

941design commented Apr 2, 2021

Version was 1.5.9 -- was still reproducable.
Upgraded to 1.6.2-1 via AUR (https://aur.archlinux.org/packages/bisq/)
Error persists.

Feb-07 21:35:46.427 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Uncaught Exception from thread JavaFX Application Thread 
Feb-07 21:35:46.427 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableMessage= Cannot invoke "javafx.scene.Node.getLayoutBounds()" because "this.textNode" is null 
Feb-07 21:35:46.427 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: throwableClass= class java.lang.NullPointerException 
Feb-07 21:35:46.429 [JavaFX Application Thread] ERROR b.c.s.CommonSetup: Stack trace:
java.lang.NullPointerException: Cannot invoke "javafx.scene.Node.getLayoutBounds()" because "this.textNode" is null
	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.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:391)
	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:832)

My window manager is xfce4.

bisq

@cd2357
Copy link
Contributor

cd2357 commented Apr 3, 2021

@ghubstan this appears to be an instance of the problem fixed in #4443 but then reverted in #4463

If this is true, then the only fix I'm aware of is #4242.

I'm not sure it is true though, because these UIs (here Settings; in #5387 adding a bank account > Cash Deposit) have been working fine so far.

@941design does this happen when you click on smth, or always on startup? And does this always happen, or just sometimes?

@ghubstan
Copy link
Member

ghubstan commented Apr 3, 2021

@cd2357, this JFeonix / reflection related NPE issue has been a constant and easily reproducible problem when I start the UI from the api test harness, in regtest/dao mode. The only way I can work around it is to temporarily upgrade to JFoenix 9.0.10 when I need to test w/ the UI. But that is not the fix because JFoenix 9.0.10 is not backwards compatible with OpenJDK10 -- the bundled release jdk. (I develop with OpenJDK12, with src compatibility=10.)

That said, I hope JavaFX15 upgrade fixes this. But I'm not sure it won't bring new JFoenix/Reflection related problems. It will allow Bisq to upgrade JFoenix, but I do not know if that will resolve the problem until I try it out. The JFoenix project is not very active: https://github.com/sshahine/JFoenix/commits/master

In the end, I think the solution is to migrate Bisq UI code away from JFoenix altogether, starting with the dependencies in Bisq that rely on JFoenix's use of reflection.

@cd2357
Copy link
Contributor

cd2357 commented May 9, 2021

@941design Should be fixed in the most recent release (v1.6.4) which upgrades several UI libraries, like JFoenix and JavaFX, which were known to cause your issue in some cases with previous versions.

Please try it out and let us know if it's still an issue for you.

@cd2357 cd2357 closed this as completed May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants