The gui doesn't handle exceptions very well #18643

issue MarcoFalke opened this issue on April 15, 2020
  1. MarcoFalke commented at 1:17 AM on April 15, 2020: member

    The GUI crashes on exceptions such as NonFatalCheckError. I think it is more user friendly for a GUI to catch the exception and display it to the user, then abort the current action and leave the main window running.

    I tested this by mutating the conditional in a CHECK_NONFATAL.

    $ ./src/qt/bitcoin-qt 
    QSocketNotifier: Can only be used with threads started with QThread
    
    
    ************************
    EXCEPTION: 18NonFatalCheckError       
    wallet/wallet.cpp:2636 (IsCurrentForAntiFeeSniping)
    Internal bug detected: '!chain.findBlock(block_hash, FoundBlock().time(block_time))'
    You may report this issue here: https://github.com/bitcoin/bitcoin/issues
           
    bitcoin in Runaway exception       
    
    terminate called after throwing an instance of 'NonFatalCheckError'
      what():  wallet/wallet.cpp:2636 (IsCurrentForAntiFeeSniping)
    Internal bug detected: '!chain.findBlock(block_hash, FoundBlock().time(block_time))'
    You may report this issue here: https://github.com/bitcoin/bitcoin/issues
    
    Aborted (core dumped)
    

    Screenshot from 2020-04-14 21-11-32

  2. MarcoFalke added the label Bug on Apr 15, 2020
  3. MarcoFalke commented at 1:18 AM on April 15, 2020: member

    The RPC currently handles them nicely, by wrapping any exception into an JSONRPCError and returning from the call gracefully.

  4. MarcoFalke commented at 1:19 AM on April 15, 2020: member

    And unrelated: "Bitcoin can no longer continue safely" sounds interesting, but should probably be replaced by PACKAGE_NAME

  5. fanquake added the label GUI on Apr 15, 2020
  6. fanquake cross-referenced this on Apr 15, 2020 from issue gui: use PACKAGE_NAME in exception message by fanquake
  7. MarcoFalke referenced this in commit 18f11fb24b on Apr 15, 2020
  8. hebasto cross-referenced this on May 6, 2020 from issue qt: Handle exceptions instead of crash by hebasto
  9. hebasto commented at 12:04 PM on May 6, 2020: member

    @MarcoFalke Mind looking into #18897?

  10. hebasto cross-referenced this on May 6, 2020 from issue gui: Display warnings as rich text by hebasto
  11. instagibbs commented at 6:41 PM on May 9, 2020: member

    Seems related: #18924

  12. ComputerCraftr referenced this in commit b8579c56cd on Jun 10, 2020
  13. fanquake cross-referenced this on Sep 15, 2020 from issue The gui doesn't handle exceptions very well by fanquake
  14. fanquake commented at 8:37 AM on September 15, 2020: member
  15. fanquake closed this on Sep 15, 2020

  16. hebasto cross-referenced this on Mar 27, 2021 from issue Handle exceptions instead of crash by hebasto
  17. laanwj referenced this in commit 03ecceedf6 on Apr 14, 2021
  18. bitcoin locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:54 UTC