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. MarcoFalke referenced this in commit 18f11fb24b on Apr 15, 2020
  7. hebasto commented at 12:04 PM on May 6, 2020: member

    @MarcoFalke Mind looking into #18897?

  8. instagibbs commented at 6:41 PM on May 9, 2020: member

    Seems related: #18924

  9. ComputerCraftr referenced this in commit b8579c56cd on Jun 10, 2020
  10. fanquake commented at 8:37 AM on September 15, 2020: member
  11. fanquake closed this on Sep 15, 2020

  12. laanwj referenced this in commit 03ecceedf6 on Apr 14, 2021
  13. DrahtBot 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-01 18:14 UTC

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