Attempt to restore a non-readable wallet.dat silently crashes the GUI client #661

issue luke-jr openend this issue on September 4, 2022
  1. luke-jr commented at 7:20 pm on September 4, 2022: member
    02022-09-04T19:17:59Z GUI: Qt has caught an exception thrown from an event handler. Throwing
    1exceptions from an event handler is not supported in Qt.
    2You must not let any exception whatsoever propagate through Qt code.
    3If that is not possible, in Qt 5 you must at least reimplement
    4QCoreApplication::notify() and catch all exceptions there.
    5
    6terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
    7  what():  filesystem error: cannot copy file: Permission denied [/tmp/usehd0.dat] [/home/dev/.bitcoin/regtest/wallets/nonHD/wallet.dat]
    8Aborted
    

    Two issues here:

    1. Unhandled exceptions should be displayed in the GUI before quitting.
    2. Failure to restore a wallet should not crash.
  2. luke-jr added the label Bug on Sep 4, 2022
  3. luke-jr cross-referenced this on Sep 4, 2022 from issue util::Result has confusing interface for std::*_ptr T by luke-jr
  4. luke-jr cross-referenced this on Sep 4, 2022 from issue Wallet: Fix error handling (copy_file failure in RestoreWallet, and in general via interfaces) by luke-jr
  5. w0xlt commented at 11:54 pm on September 4, 2022: contributor
    When this feature was merged, this use case was working. It seems this bug was introduced later (as suggested in https://github.com/bitcoin/bitcoin/issues/26004). Perhaps automated GUI tests can avoid this kind of error.
  6. ryanofsky referenced this in commit 4b8ee99dea on Sep 6, 2022
  7. hebasto added the label Wallet on Sep 15, 2022
  8. fanquake closed this on Sep 19, 2022

  9. sidhujag referenced this in commit 3bd691fae1 on Sep 20, 2022
  10. ryanofsky referenced this in commit b69cc6f1fa on Sep 20, 2022
  11. bitcoin-core locked this on Sep 19, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-23 00:20 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me