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

Upgrade JavaFX to v15 #4242

Closed
wants to merge 87 commits into from
Closed

Conversation

cd2357
Copy link
Contributor

@cd2357 cd2357 commented May 7, 2020

Update the gradle dependency to JavaFX 14.

This brings to Bisq the latest JavaFX fixes and improvements, especially
in the areas of UI performance and memory management.

Initial tests on Qubes already showed several improvements:

  • faster, more responsive UI
  • popups display correctly (unlike the current setup, where 95% of the time modal dialogs had width and height 0; see Modal dialog glitches on QubesOS #873)
  • system tray icon is visible (before, it never showed for me on linux)

Tests on Mac also show better performance + better / more "native" UI integration.

To use the new JavaFX version, just ./gradlew clean build Bisq before running it.

Note: since JavaFX also uses VRAM (in addition to the normal system RAM
as used by the JDK), it could be that previous attempts to optimize the JDK's
memory usage (like #3677 and #4048) might have had no impact on JavaFX-
specific inefficiencies.

Related / likely related to: #350 #2135 #2509 #3128 #3307 #3308 #3343
#3430 #3657 #3683 #3686 #3786 #3787 #3892 #3917 #3918 #3936

@cd2357 cd2357 requested a review from cbeams as a code owner May 7, 2020 12:56
@cd2357
Copy link
Contributor Author

cd2357 commented May 7, 2020

Hmm seems the Travis compiler is complaining:
major version 55 is newer than 54, the highest major version supported by this compiler

"Version 55" means Java 11, so it would only work if upgraded to OpenJDK 11 or later.

There's already an issue to move to Java 11: #1787 -- perhaps it can be combined with this one?

Java 11 is the latest LTS version (until 2021), but the latest JDK available is v14 which could bring other improvements in the build process like #3373 #3402 and #4196 (all depending on the latest jpackager which is delivered with Java 14). So going directly to OpenJDK 14 could be worth it.

But even just Java 11 would be enough for this change. Locally I have Java 11, so compiling and running worked fine for me.

@cd2357
Copy link
Contributor Author

cd2357 commented May 7, 2020

FYI: Trying to upgrade the build settings + dependencies to work with Java 14.

See #1787 (comment) for current reasoning why v14 (and not an earlier one).

Not aware yet of any reasons to not go with Java 14 -- but in the meantime I thought I'd just go ahead and try, see if it works.

Locally it works, but the build server seems to need more fine-tuning.

@cd2357
Copy link
Contributor Author

cd2357 commented May 7, 2020

Alright, buildserver checks are all green.

Seems Bisq could theoretically upgrade to Java 14.

@cbeams / @devinbileck : you guys both worked on similar issues in the past (#1787, #1792). Could you please have a look at this PR and shortly let me know if I missed anything?

@cd2357
Copy link
Contributor Author

cd2357 commented May 7, 2020

As @ghubstan mentioned in #4048 (comment):

JFX 14 has some leak bugfixes, but Bisq is holding back on upgrading to OpenJDK 14 until the new java packaging tool is released from incubation to GA.

I hadn't noticed the packager tool was still in incubation, I thought it's GA.

Then I'd say we can put this PR on hold and have another look at it when jpackager is properly released.


Although alternatively, there is always the option to just move away from trying to ship native apps, an effort which binds Bisq to

Instead, the Bisq team could get rid of that overhead and simply deliver the (signed) source code + 3 platform-dependent start scripts.

Basically all that needs to happen is

./gradle build
./bisq-desktop

Some script magic could hide away the console output, or beautify it in some way, if necessary -- but essentially its just that.

It could even come pre-compiled and pre-packaged, so no ./gradle build is necessary -- just double-click start.sh in order to ./bisq-desktop and done.

In that case, Bisq would have no more dependency on jpackager.

Cause sometimes a small team with limited resources has to prioritize. What is worth more investing time in:

  1. optimizing for a more secure, more private, more de-centralized exchange, or
  2. optimizing for a more native-looking nice app?

In fact, 2. actively conflicts with 1. because striving for 2. forces Bisq to now use 3-4 year old frameworks which are EOL (Java 10), as well as modules that have known memory leaks and security issues that have been fixed since years (JavaFX 11, which is used now).

Which sort of undermines users' security, making them vulnerable to attackers who could specifically try to exploit the known issues in these older frameworks. Best case, denial of service by finding ways to trigger high memory usage and crashing their Bisq app. Worst case, well there is always the jackpot of getting access to those juicy private keys.

So I'd say there is a strong argument to be made for prioritizing 1. above 2. and perhaps sacrificing nice double-click installers for the benefits of state-of-the-art security, reliability, performance.

Maybe I'm over-reacting and blowing this out of proportion, but I was just surprised to see how many of the current issues (UI freezing, system crashing, etc) would probably go away if Bisq just upgraded a few modules and components. Solutions are known and are out there, others have worked on and fixed and optimized things, but we're not using them.

I realize its not a simple choice to make, and there are nuances -- but at the end of the day, how much better could Bisq's trading protocol be right now, if all that effort invested in trying to analyze and fix tens and tens of memory-related issues, etc -- if even part of that effort went into for example Bisq v2. Or gRPC.

Anyway, working on this PR made me a big fan of dropping jpackager and native apps in favor of actually delivering a fix for these issues (upgrading to JavaFX 14 seemed to address most of them).

What do you guys think? Would you generally agree or disagree?

(Tagging @freimair since this could be relevant for security)

@cbeams
Copy link
Member

cbeams commented May 8, 2020

I hadn't noticed the packager tool was still in incubation, I thought it's GA.

That's a good catch. Interested in actually looking at it to see if it's in good enough shape to use now? i.e. can it be a more or less drop-in replacement for our current use of javapackager under JDK 10?

I'd want to see what the answer to this question is before considering dropping installers altogether. Assuming jpackager is already in good enough shape, or soon will be, we shouldn't have any problem keeping up to date in the future. It's actually a great thing, in this way, that we package our own JRE. It means we can stay as current as we like without any concern for what runtime the user has installed. It was just super unfortunate (downright irresponsible, imo) that javapackager got dropped without a replacement for so long.

@cd2357
Copy link
Contributor Author

cd2357 commented May 8, 2020

Interested in actually looking at it to see if it's in good enough shape to use now? i.e. can it be a more or less drop-in replacement for our current use of javapackager under JDK 10?

I'd want to see what the answer to this question is before considering dropping installers altogether.

@cbeams: Good point. I'll look into that and experiment with the packager, will update this thread with the findings.

@sqrrm
Copy link
Member

sqrrm commented May 25, 2020

Build systems isn't my forte, but I would really like to see us moving to JDK14 for the benefits described here. @cbeams has a good point, but if it would work almost as easily for users to build it themselves, then I would think that is a reasonable way to go.

@leshik
Copy link
Contributor

leshik commented Jun 5, 2020

@cd2357 I can't build this on master with Oracle JDK14. Is OpenJDK required?

@stale
Copy link

stale bot commented Jul 5, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the was:dropped label Jul 5, 2020
@ripcurlx
Copy link
Contributor

ripcurlx commented Jul 8, 2020

I'm also pro moving to JDK 14 if jpackager supports what we need (it does as far as I remember reading through the draft docu in the past.

@cd2357 I agree that ditching the native bundle route would save some time and would make the build process easier, but I fear that it would prevent us to move to a bigger audience the far off we go from the native app route. Did you have time to play around with the jpackager already?

@cd2357 cd2357 marked this pull request as draft July 28, 2020 19:37
@cd2357
Copy link
Contributor Author

cd2357 commented Jul 28, 2020

I agree that ditching the native bundle route would save some time and would make the build process easier, but I fear that it would prevent us to move to a bigger audience the far off we go from the native app route. Did you have time to play around with the jpackager already?

@ripcurlx yes, I fully agree.

I didn't explore this further yet (therefore marked it as draft), but I realized I'm not familiar with the build process. Is there some documentation or some wiki explaining the steps (how to build and package for linux / osx / windows)? I might have to try them out (and evtl adjust them) if the jpackager works differently in the newer version.

@ripcurlx
Copy link
Contributor

ripcurlx commented Jul 29, 2020

Here you can find the release process readme
The first script to start with is the create_app.sh for macOS.
This is the part using the javapackager right now that needs to be replaced with the jpackager.

$JAVA_HOME/bin/javapackager \
-deploy \
-BappVersion=$version \
-Bmac.CFBundleIdentifier=io.bisq.CAT \
-Bmac.CFBundleName=Bisq \
-Bicon=package/macosx/Bisq.icns \
-Bruntime="$JAVA_HOME/jre" \
-native dmg \
-name Bisq \
-title "A decentralized bitcoin exchange network." \
-vendor Bisq \
-outdir deploy \
-srcdir deploy \
-srcfiles "Bisq-$version.jar" \
-appclass bisq.desktop.app.BisqAppMain \
-outfile Bisq \
-v

We do some customization using:

Please let me know if you need more info to be able to continue with this.

@leshik
Copy link
Contributor

leshik commented Aug 2, 2020

@cd2357 I'm still unable to build this against current master & OpenJDK 14.0.1 with ./gradlew build on macOS, some test fails, but ./gradlew :desktop:build works and produces the jar file. However, it throws exceptions when unlocking the wallet (password input dialog doesn't appear):

java.lang.IllegalAccessException: class bisq.desktop.components.JFXTextFieldSkinBisqStyle cannot access a member of class javafx.scene.control.skin.TextFieldSkin with modifiers "private"
        at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:376)
        at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:647)
        at java.base/java.lang.reflect.Field.checkAccess(Field.java:1073)
        at java.base/java.lang.reflect.Field.get(Field.java:414)
        at bisq.desktop.components.JFXTextFieldSkinBisqStyle.createPromptNode(JFXTextFieldSkinBisqStyle.java:139)
        at bisq.desktop.components.JFXTextFieldSkinBisqStyle.lambda$new$1(JFXTextFieldSkinBisqStyle.java:54)
        at com.jfoenix.skins.PromptLinesWrapper.init(PromptLinesWrapper.java:114)
        at bisq.desktop.components.JFXTextFieldSkinBisqStyle.<init>(JFXTextFieldSkinBisqStyle.java:54)
        at bisq.desktop.components.PasswordTextField.createDefaultSkin(PasswordTextField.java:33)
        at javafx.scene.control.Control.doProcessCSS(Control.java:897)
        at javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
        at com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
        at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
        at javafx.scene.Parent.doProcessCSS(Parent.java:1400)
        at javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
        at com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
        at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
        at javafx.scene.Node.processCSS(Node.java:9542)
        at javafx.scene.Scene.doCSSPass(Scene.java:569)
        at javafx.scene.Scene.preferredSize(Scene.java:1781)
        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.WalletPasswordWindow.show(WalletPasswordWindow.java:145)
        at bisq.desktop.main.MainViewModel.lambda$setupHandlers$14(MainViewModel.java:322)
        at bisq.core.app.BisqSetup.lambda$initWallet$9(BisqSetup.java:578)
        at bisq.core.app.WalletAppSetup.lambda$init$2(WalletAppSetup.java:167)
        at bisq.common.reactfx.FxTimer.lambda$restart$0(FxTimer.java:93)
        at com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(TimelineClipCore.java:239)
        at com.sun.scenario.animation.shared.TimelineClipCore.playTo(TimelineClipCore.java:180)
        at javafx.animation.Timeline.doPlayTo(Timeline.java:175)
        at javafx.animation.AnimationAccessorImpl.playTo(AnimationAccessorImpl.java:39)
        at com.sun.scenario.animation.shared.SingleLoopClipEnvelope.timePulse(SingleLoopClipEnvelope.java:97)
        at javafx.animation.Animation.doTimePulse(Animation.java:1101)
        at javafx.animation.Animation$1.lambda$timePulse$0(Animation.java:186)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
        at javafx.animation.Animation$1.timePulse(Animation.java:185)
        at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:344)
        at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:559)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
        at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)

and

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:1207)
        at javafx.scene.Parent.layout(Parent.java:1214)
        at javafx.scene.Scene.doLayoutPass(Scene.java:576)
        at javafx.scene.Scene.preferredSize(Scene.java:1784)
        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.WalletPasswordWindow.show(WalletPasswordWindow.java:145)
        at bisq.desktop.main.MainViewModel.lambda$setupHandlers$14(MainViewModel.java:322)
        at bisq.core.app.BisqSetup.lambda$initWallet$9(BisqSetup.java:578)
        at bisq.core.app.WalletAppSetup.lambda$init$2(WalletAppSetup.java:167)
        at bisq.common.reactfx.FxTimer.lambda$restart$0(FxTimer.java:93)
        at com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(TimelineClipCore.java:239)
        at com.sun.scenario.animation.shared.TimelineClipCore.playTo(TimelineClipCore.java:180)
        at javafx.animation.Timeline.doPlayTo(Timeline.java:175)
        at javafx.animation.AnimationAccessorImpl.playTo(AnimationAccessorImpl.java:39)
        at com.sun.scenario.animation.shared.SingleLoopClipEnvelope.timePulse(SingleLoopClipEnvelope.java:97)
        at javafx.animation.Animation.doTimePulse(Animation.java:1101)
        at javafx.animation.Animation$1.lambda$timePulse$0(Animation.java:186)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
        at javafx.animation.Animation$1.timePulse(Animation.java:185)
        at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:344)
        at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:559)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
        at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)

@ripcurlx
Copy link
Contributor

ripcurlx commented Aug 2, 2020

@cd2357 I'm still unable to build this against current master & OpenJDK 14.0.1 with ./gradlew build on macOS, some test fails, but ./gradlew :desktop:build works and produces the jar file. However, it throws exceptions when unlocking the wallet (password input dialog doesn't appear):

java.lang.IllegalAccessException: class bisq.desktop.components.JFXTextFieldSkinBisqStyle cannot access a member of class javafx.scene.control.skin.TextFieldSkin with modifiers "private"
        at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:376)
        at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:647)
        at java.base/java.lang.reflect.Field.checkAccess(Field.java:1073)
        at java.base/java.lang.reflect.Field.get(Field.java:414)
        at bisq.desktop.components.JFXTextFieldSkinBisqStyle.createPromptNode(JFXTextFieldSkinBisqStyle.java:139)
        at bisq.desktop.components.JFXTextFieldSkinBisqStyle.lambda$new$1(JFXTextFieldSkinBisqStyle.java:54)
        at com.jfoenix.skins.PromptLinesWrapper.init(PromptLinesWrapper.java:114)
        at bisq.desktop.components.JFXTextFieldSkinBisqStyle.<init>(JFXTextFieldSkinBisqStyle.java:54)
        at bisq.desktop.components.PasswordTextField.createDefaultSkin(PasswordTextField.java:33)
        at javafx.scene.control.Control.doProcessCSS(Control.java:897)
        at javafx.scene.control.Control$1.doProcessCSS(Control.java:89)
        at com.sun.javafx.scene.control.ControlHelper.processCSSImpl(ControlHelper.java:67)
        at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
        at javafx.scene.Parent.doProcessCSS(Parent.java:1400)
        at javafx.scene.Parent$1.doProcessCSS(Parent.java:125)
        at com.sun.javafx.scene.ParentHelper.processCSSImpl(ParentHelper.java:98)
        at com.sun.javafx.scene.NodeHelper.processCSS(NodeHelper.java:145)
        at javafx.scene.Node.processCSS(Node.java:9542)
        at javafx.scene.Scene.doCSSPass(Scene.java:569)
        at javafx.scene.Scene.preferredSize(Scene.java:1781)
        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.WalletPasswordWindow.show(WalletPasswordWindow.java:145)
        at bisq.desktop.main.MainViewModel.lambda$setupHandlers$14(MainViewModel.java:322)
        at bisq.core.app.BisqSetup.lambda$initWallet$9(BisqSetup.java:578)
        at bisq.core.app.WalletAppSetup.lambda$init$2(WalletAppSetup.java:167)
        at bisq.common.reactfx.FxTimer.lambda$restart$0(FxTimer.java:93)
        at com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(TimelineClipCore.java:239)
        at com.sun.scenario.animation.shared.TimelineClipCore.playTo(TimelineClipCore.java:180)
        at javafx.animation.Timeline.doPlayTo(Timeline.java:175)
        at javafx.animation.AnimationAccessorImpl.playTo(AnimationAccessorImpl.java:39)
        at com.sun.scenario.animation.shared.SingleLoopClipEnvelope.timePulse(SingleLoopClipEnvelope.java:97)
        at javafx.animation.Animation.doTimePulse(Animation.java:1101)
        at javafx.animation.Animation$1.lambda$timePulse$0(Animation.java:186)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
        at javafx.animation.Animation$1.timePulse(Animation.java:185)
        at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:344)
        at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:559)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
        at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)

and

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:1207)
        at javafx.scene.Parent.layout(Parent.java:1214)
        at javafx.scene.Scene.doLayoutPass(Scene.java:576)
        at javafx.scene.Scene.preferredSize(Scene.java:1784)
        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.WalletPasswordWindow.show(WalletPasswordWindow.java:145)
        at bisq.desktop.main.MainViewModel.lambda$setupHandlers$14(MainViewModel.java:322)
        at bisq.core.app.BisqSetup.lambda$initWallet$9(BisqSetup.java:578)
        at bisq.core.app.WalletAppSetup.lambda$init$2(WalletAppSetup.java:167)
        at bisq.common.reactfx.FxTimer.lambda$restart$0(FxTimer.java:93)
        at com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(TimelineClipCore.java:239)
        at com.sun.scenario.animation.shared.TimelineClipCore.playTo(TimelineClipCore.java:180)
        at javafx.animation.Timeline.doPlayTo(Timeline.java:175)
        at javafx.animation.AnimationAccessorImpl.playTo(AnimationAccessorImpl.java:39)
        at com.sun.scenario.animation.shared.SingleLoopClipEnvelope.timePulse(SingleLoopClipEnvelope.java:97)
        at javafx.animation.Animation.doTimePulse(Animation.java:1101)
        at javafx.animation.Animation$1.lambda$timePulse$0(Animation.java:186)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
        at javafx.animation.Animation$1.timePulse(Animation.java:185)
        at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:344)
        at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:559)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:543)
        at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:536)
        at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:342)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)

Yes, there seem to be changes required in our custom components (access of variables/methods changed in the most up-to-data JavaFX version)

@coinzdude
Copy link

coinzdude commented Aug 4, 2020

@cd2357 I had to change the build to ignore test results, but I would very much like to solve this as this build you have going here seems to be the first that runs without crashing under WSL.

In build, I'm getting this. I'm not versed enough yet to know which particular test is failing.

./gradlew build
Task :core:compileTestJava
Note: /home//bisq/core/src/test/java/bisq/core/payment/ReceiptValidatorTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Task :core:test
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
bisq.core.util.FeeReceiverSelectorTest > unnecessary Mockito stubbings FAILED
org.mockito.exceptions.misusing.UnnecessaryStubbingException at StrictRunner.java:49

@coinzdude
Copy link

I can confirm the wallet crash issue is also present with WSL/Ubuntu 20.04

@stale
Copy link

stale bot commented Sep 5, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the was:dropped label Sep 5, 2020
@cd2357
Copy link
Contributor Author

cd2357 commented Sep 11, 2020

Still relevant

Update the gradle dependency to JavaFX 14.

This brings to Bisq the latest JavaFX fixes and improvements, especially
 in the areas of UI performance, memory management and security.

JavaFX can be upgraded independently of the JDK used to build the
application, so this change is modular and does not affect other parts
of the build process.

Related / likely related to: bisq-network#350 bisq-network#2135 bisq-network#2509 bisq-network#3128 bisq-network#3307 bisq-network#3308 bisq-network#3343
bisq-network#3430 bisq-network#3657 bisq-network#3677 bisq-network#3683 bisq-network#3686 bisq-network#3786 bisq-network#3787 bisq-network#3892 bisq-network#3917 bisq-network#3918 bisq-network#3936
@maxim-belkin
Copy link
Contributor

@cd2357, I'd recommend rebasing the upgrade-javafax-14 branch on top of master instead of periodically merging master into your branch -- it'll make your changes more obvious, easier to review and, more importantly, when merged it won't undo changes made in master after you synced your branch with master.

Needs to be either only executed on macOS or adapted to work with Windows as well
used for mobile notification pairing because of missing current macOS support by currently used webcam library
@ripcurlx
Copy link
Contributor

@cd2357 It is not perfect, but IMO the PR is in a mergable state. Everyone is welcome to give binaries created by this PR a shot: https://www.dropbox.com/sh/bos203ga9bq0akp/AAB6j5DPAINCPbCP9vyRB3n-a?dl=0

The deterministic jar is not included anymore as we'll have different libs included by JavaFX based on the OS it is compiled in. We might be able to do something similar as we had in the past, but not in the first step. The jar is compiled with Java 11 and the binaries are bundling a current Java 15 runtime. So in the best (normal) case it should behave similar to the current binaries, but more reliable (on my Windows VM it "feels" faster). Please let me know if you run into any issues so we can merge this PR for the upcoming release. Thanks!

Especially I would be interested in Windows updates/installations ( we had some workarounds in place for user accounts containing special characters and auth cookie issues with TOR) which we left out in this upgrade as we think it shouldn't be necessary anymore. If you have installed v1.6.2 already you might need to uninstall it before as the Wix prevents overwritting of the same application version.

@maxim-belkin
Copy link
Contributor

Tried this new version on macOS -- no requests for input monitoring, no crashes, so 👍🏻 . The first time I opened the app, the list of open trades was empty but the "Portfolio" tab had a red badge with the correct number of open trades (even though they were not listed in the main window). Restarted the app and all open trades were visible again.

@BtcContributor
Copy link
Contributor

Tried on Windows 10 after uninstalling "official" 1.6.2 version. Everything's fine and smooth.
Nothing to declare.
Great work!

@ghost
Copy link

ghost commented Apr 20, 2021

Tested on Ubuntu Linux: look/feel exactly the same as before. 👍

@maxim-belkin
Copy link
Contributor

One "feature" I've noticed (not sure if it was like that before) is that chat window moves in parallel to the main window. This might be a problem in a 2+ monitor setup: if you move chat window to a different display and then move the main window to an outmost display -- chat window may go outside the visible area... not a big deal but just an FYI.

@ripcurlx
Copy link
Contributor

One "feature" I've noticed (not sure if it was like that before) is that chat window moves in parallel to the main window. This might be a problem in a 2+ monitor setup: if you move chat window to a different display and then move the main window to an outmost display -- chat window may go outside the visible area... not a big deal but just an FYI.

As far as I remember that was already the case on master. Not sure if it is just a setting to undock the window.

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.

ACK - Tested a full release and did lots of developer testing while doing customizations on it myself.

Following workarounds were deprecated for now:

  • handle special characters on Windows (might be solved by the new installer)
  • remove the old Tor workaround to prevent Auth Cookie issues (might be solved by the new installer and upgraded Tor library)
  • Deterministic jar inclusion in release (difficult to solve as we are bundling different (reduced) fat jars for each OS
  • Scan QR code with webcam to pair with your mobile notification app was temporarily disabled as the webcam library is not supported anymore and notarization is not possible right now.

We'll do for the upcoming release a pre-release again to get feedback on the new installers and runtimes.

@ripcurlx
Copy link
Contributor

@cd2357 Could you please move the state of this PR from Draft to Ready for Review? Thanks!

@ghubstan
Copy link
Member

I ran ./gradlew --console=plain packageInstallers on Ubuntu 20.04.2.

It created bisq-1.6.2-1.x86_64.rpm, bisq_1.6.2-1_amd64.deb, and desktop-1.6.2-SNAPSHOT-all.jar.SHA-256.

I installed the deb pkg and started Bisq, running the bundled JDK: System info: os.name=Linux; os.version=5.8.0-50-generic; os.arch=amd64; sun.arch.data.model=64; JRE=15.0.2+7 (AdoptOpenJDK); JVM=15.0.2+7 (OpenJDK 64-Bit Server VM)

I noticed the installer created /opt/bisq, formerly /opt/Bisq. I'm guessing that was intended, and a 'fix'.

But Environment variable BISQ_SHARED_FOLDER was set to null (resulting in linux installers being created in :desktop/null).

I clicked around the UI while it sync'd, and didn't see any NPEs.

Great work!!! I know this had to be difficult.

@ghubstan
Copy link
Member

About the Gradle upgrade... Gradle 7.0 removes a lot deprecated API, and this PR's build file would need to migrate to all the new dependency configurations compile -> api or implementation, testCompile -> testImplementation, etc... to get it to work with Gradle 7.0 There are other changes that will need to be made as well. We got by using a lot of deprecated parts of the Gradle API that will break the Bisq build in 7.0.

I got a Gradle 7 build working yesterday, and you might be interested in discussing some of the changes needed to upgrade to v7.0 after this PR is merged.

@ghubstan
Copy link
Member

Glad the jfoenix upgrade finally happened. Now the api test harness can start Bob & Alice desktops w/out those NPEs. This makes some release testing go much quicker.

@ripcurlx
Copy link
Contributor

@cd2357 As I haven't heard from you for 10+ days (hopefully everything is fine!) I'll create a PR based on this branch myself to get it into master for the upcoming releases.

Superseded by #5431.

@ripcurlx ripcurlx closed this Apr 22, 2021
@cd2357
Copy link
Contributor Author

cd2357 commented Apr 22, 2021

@cd2357 As I haven't heard from you for 10+ days (hopefully everything is fine!) I'll create a PR based on this branch myself to get it into master for the upcoming releases.

Superseded by #5431.

Yes all good, was just busy for a while then had to travel so didn't get to check Keybase :) Sorry for the late reply.

Looks like the PR is already merged, let me know if there's anything open / anything else I can do to help finalize it.

@cd2357 cd2357 deleted the upgrade-javafax-14 branch May 9, 2021 12:21
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.

None yet

9 participants