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

Qt GUI does not show GUI error and does not quit in case RPC connection is lost after wallet loaded #1024

Closed
kristapsk opened this issue Sep 23, 2021 · 0 comments · Fixed by #1132

Comments

@kristapsk
Copy link
Member

Only error in console is printed, no feedback at all for GUI-only user.

Steps to reproduce:

  1. Start Bitcoin node;
  2. Start JoinMarketQt;
  3. Load JoinMarket wallet;
  4. Shutdown Bitcoin node.

I believe problem is return None instead of sys.exit here:

try:
res = self.jsonRpc.call(method, args)
except JsonRpcConnectionError as e:
# note that we only raise this in case the connection error is
# a refusal, or is unrecognized/unknown by our code. So this does
# NOT happen in a reset or broken pipe scenario.
# It is safest to simply shut down.
# Why not sys.exit? sys.exit calls do *not* work inside delayedCalls
# or deferreds in twisted, since a bare exception catch prevents
# an actual system exit (i.e. SystemExit is caught as a
# BareException type).
log.error("Failure of RPC connection to Bitcoin Core. "
"Application cannot continue, shutting down.")
stop_reactor()
return None
# note that JsonRpcError is not caught here; for some calls, we
# have specific behaviour requirements depending on these errors,
# so this is handled elsewhere in BitcoinCoreInterface.
return res

I'm not so familiar with Reactor, but could we raise some exception instead? @AdamISZ ?

@kristapsk kristapsk added the bug label Dec 1, 2021
AdamISZ added a commit that referenced this issue Dec 27, 2021
Fixes #1024.
Prior to this commit, if the RPC connection were lost
while JoinmarketQt was running, the reactor would be
stopped, but the qt5reactor shutdown does not stop
the Qt Application. This commit fixes that by injecting
a custom reactor stop function wrapper into jmbase,
which triggers the close event of the Qt main window.
takinbo pushed a commit to takinbo/joinmarket-clientserver that referenced this issue May 27, 2022
Fixes JoinMarket-Org#1024.
Prior to this commit, if the RPC connection were lost
while JoinmarketQt was running, the reactor would be
stopped, but the qt5reactor shutdown does not stop
the Qt Application. This commit fixes that by injecting
a custom reactor stop function wrapper into jmbase,
which triggers the close event of the Qt main window.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant