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

Buyer opens mediation while seller is offline - NullPointerException #5210

Closed
BtcContributor opened this issue Feb 20, 2021 · 6 comments · Fixed by #5219
Closed

Buyer opens mediation while seller is offline - NullPointerException #5210

BtcContributor opened this issue Feb 20, 2021 · 6 comments · Fixed by #5219

Comments

@BtcContributor
Copy link
Contributor

Description

When buyer opens a mediation while seller is offline, a Null Pointer Exception is launched when the seller returns online after the app has been launched.

Version

1.5.7 (Ongoing testing)

Steps to reproduce

  1. Alice has published a buy offer
  2. Bob has taken the buy offer
  3. Alice requests support when Bob is offline
  4. Bob returns online and the exception is launched

This has been reproduced in several tests that I have done.

OS

Windows 10

Log

java.lang.NullPointerException
	at bisq.core.trade.protocol.ProcessModel.getBtcWalletService(ProcessModel.java:326)
	at bisq.core.trade.Trade.getDelayedPayoutTx(Trade.java:681)
	at bisq.core.support.dispute.DisputeManager.onPeerOpenedDisputeMessage(DisputeManager.java:385)
	at bisq.core.support.dispute.mediation.MediationManager.onSupportMessage(MediationManager.java:113)
	at bisq.core.support.SupportManager.lambda$applyMessages$7(SupportManager.java:321)
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:804)
	at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
	at bisq.core.support.SupportManager.applyMessages(SupportManager.java:316)
	at bisq.core.support.SupportManager.tryApplyMessages(SupportManager.java:128)
	at bisq.core.support.SupportManager.lambda$new$1(SupportManager.java:79)
	at bisq.network.p2p.mailbox.MailboxMessageService.lambda$processMyMailboxItem$14(MailboxMessageService.java:474)
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:804)
	at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
	at bisq.network.p2p.mailbox.MailboxMessageService.processMyMailboxItem(MailboxMessageService.java:474)
	at bisq.network.p2p.mailbox.MailboxMessageService.handleMailboxItem(MailboxMessageService.java:464)
	at bisq.network.p2p.mailbox.MailboxMessageService.processSingleMailboxEntry(MailboxMessageService.java:386)
	at bisq.network.p2p.mailbox.MailboxMessageService.onAdded(MailboxMessageService.java:354)
	at bisq.network.p2p.mailbox.MailboxMessageService.addHashMapChangedListenerAndApply(MailboxMessageService.java:379)
	at bisq.network.p2p.mailbox.MailboxMessageService.onBootstrapped(MailboxMessageService.java:226)
	at bisq.network.p2p.P2PService.applyIsBootstrapped(P2PService.java:340)
	at bisq.network.p2p.P2PService.onUpdatedDataReceived(P2PService.java:313)
	at bisq.network.p2p.peers.getdata.RequestDataManager$2.onComplete(RequestDataManager.java:346)
	at bisq.network.p2p.peers.getdata.RequestDataHandler.onMessage(RequestDataHandler.java:204)
	at bisq.network.p2p.network.NetworkNode.lambda$onMessage$6(NetworkNode.java:392)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at bisq.network.p2p.network.NetworkNode.onMessage(NetworkNode.java:392)
	at bisq.network.p2p.network.Connection.lambda$onMessage$9(Connection.java:436)
	at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:804)
	at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
	at bisq.network.p2p.network.Connection.lambda$onMessage$10(Connection.java:436)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
	at java.base/java.lang.Thread.run(Thread.java:844)

Fix developer

If you valid this issue and think that a new dev like me could be able to find and develop a fix, I would like to have a chance to do that. If instead this is urgent, you are free to choose someone more experienced than me :)

@boring-cyborg
Copy link

boring-cyborg bot commented Feb 20, 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 20, 2021

First of all, good find! Looks like a module starting up out-of-order.
Standard advice is to start with good first issue.
But IDK maybe you are the new @chimp1984 !?! :trollface: ❤️

@chimp1984
Copy link
Contributor

Haha... @chimp1984 is still a bit around but less present ;-)

@ripcurlx
Copy link
Contributor

@BtcContributor Thanks for the bug report! As it would be great to get this fix into the v1.5.7 release I think it would be great if @jmacxx could pick this up?

@BtcContributor
Copy link
Contributor Author

Ok guys, no problem for me and thanks for validating!

@ghost
Copy link

ghost commented Feb 22, 2021

Unable to reproduce the same stack trace as above, but get a similar one when Bob has a password protected wallet. I'm looking into it. ==> [edit] Can also reproduce the OP's callstack consistently too. My environment was wrong initially.
Conclusion: Two slightly differing code paths to the same issue.

java.lang.NullPointerException
at bisq.core.trade.protocol.ProcessModel.getBtcWalletService(ProcessModel.java:326)
at bisq.core.trade.Trade.getDelayedPayoutTx(Trade.java:681)
at bisq.core.support.dispute.DisputeManager.onPeerOpenedDisputeMessage(DisputeManager.java:385)
at bisq.core.support.dispute.mediation.MediationManager.onSupportMessage(MediationManager.java:113)
at bisq.core.support.SupportManager.lambda$applyMessages$7(SupportManager.java:321)
at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:804)
at java.base/java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425)
at bisq.core.support.SupportManager.applyMessages(SupportManager.java:316)
at bisq.core.support.SupportManager.tryApplyMessages(SupportManager.java:128)
at bisq.core.support.dispute.DisputeManager.onAllServicesInitialized(DisputeManager.java:264)
at bisq.core.app.DomainInitialisation.initDomainServices(DomainInitialisation.java:200)
at bisq.core.app.BisqSetup.initDomainServices(BisqSetup.java:456)
at bisq.core.app.BisqSetup.step4(BisqSetup.java:310)
at bisq.core.app.BisqSetup.lambda$startP2pNetworkAndWallet$4(BisqSetup.java:408)
at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:181)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
at javafx.beans.binding.ObjectBinding.invalidate(ObjectBinding.java:170)
at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:52)
at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:136)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
at javafx.beans.property.BooleanPropertyBase.fireValueChangedEvent(BooleanPropertyBase.java:104)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:111)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:145)
at bisq.core.app.BisqSetup.lambda$initWallet$5(BisqSetup.java:434)
at bisq.desktop.main.overlays.windows.WalletPasswordWindow.lambda$addButtons$3(WalletPasswordWindow.java:223)
at bisq.core.crypto.ScryptUtil.lambda$deriveKeyWithScrypt$0(ScryptUtil.java:61)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
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:844)

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 a pull request may close this issue.

3 participants