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

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

    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. 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.

  4. ryanofsky referenced this in commit 4b8ee99dea on Sep 6, 2022
  5. hebasto added the label Wallet on Sep 15, 2022
  6. fanquake closed this on Sep 19, 2022

  7. sidhujag referenced this in commit 3bd691fae1 on Sep 20, 2022
  8. ryanofsky referenced this in commit b69cc6f1fa on Sep 20, 2022
  9. bitcoin-core locked this on Sep 19, 2023
  10. delta1 referenced this in commit 9f650062fc on Nov 27, 2024
Contributors
Labels

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: 2026-05-25 07:20 UTC