gui: crash with loadwallet & QT_FATAL_WARNINGS #16296

issue fanquake opened this issue on June 27, 2019
  1. fanquake commented at 7:30 AM on June 27, 2019: member

    Pretty sure this should be low priority, just keeping a record because there's been some discussion around using QT_FATAL_WARNINGS=1 during debugging.

    2019-06-27T07:23:13Z init message: Done loading
    2019-06-27T07:23:13Z GUI: Platform customization: "macosx"
    2019-06-27T07:23:17Z Using BerkeleyDB version Berkeley DB 4.8.30: (April  9, 2010)
    2019-06-27T07:23:17Z Using wallet /Users/michael/Library/Application Support/Bitcoin/testing
    2019-06-27T07:23:17Z BerkeleyEnvironment::Open: LogDir=/Users/michael/Library/Application Support/Bitcoin/testing/database ErrorFile=/Users/michael/Library/Application Support/Bitcoin/testing/db.log
    2019-06-27T07:23:17Z init message: Loading wallet...
    2019-06-27T07:23:17Z BerkeleyEnvironment::Open: LogDir=/Users/michael/Library/Application Support/Bitcoin/testing/database ErrorFile=/Users/michael/Library/Application Support/Bitcoin/testing/db.log
    2019-06-27T07:23:17Z [testing] nFileVersion = 189900
    2019-06-27T07:23:17Z [testing] Keys: 0 plaintext, 2001 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0
    2019-06-27T07:23:17Z [testing] Wallet completed loading in             113ms
    2019-06-27T07:23:17Z GUI: QObject::startTimer: Timers can only be used with threads started with QThread
    
    src/bitcoin-cli loadwallet testing
    
    lldb src/qt/bitcoin-qt
    (lldb) target create "src/qt/bitcoin-qt"
    Current executable set to 'src/qt/bitcoin-qt' (x86_64).
    (lldb) env QT_FATAL_WARNINGS=1
    (lldb) run
    Process 19523 launched: '/Users/michael/github/bitcoin/src/qt/bitcoin-qt' (x86_64)
    2019-06-27 15:23:04.327755+0800 bitcoin-qt[19523:550417] MessageTracer: Falling back to default whitelist
    Process 19523 stopped
    * thread [#21](/bitcoin-bitcoin/21/), name = 'bitcoin-httpworker.0', stop reason = signal SIGABRT
        frame [#0](/bitcoin-bitcoin/0/): 0x00007fff593ec2c6 libsystem_kernel.dylib`__pthread_kill + 10
    libsystem_kernel.dylib`__pthread_kill:
    ->  0x7fff593ec2c6 <+10>: jae    0x7fff593ec2d0            ; <+20>
        0x7fff593ec2c8 <+12>: movq   %rax, %rdi
        0x7fff593ec2cb <+15>: jmp    0x7fff593e6457            ; cerror_nocancel
        0x7fff593ec2d0 <+20>: retq   
    Target 0: (bitcoin-qt) stopped.
    
  2. fanquake added the label GUI on Jun 27, 2019
  3. promag commented at 7:41 AM on June 27, 2019: member

    Will take a look, "GUI: QObject::startTimer: Timers can only be used with threads started with QThread" is definitely something to fix.

  4. hebasto commented at 5:10 PM on June 29, 2019: member

    Cannot reproduce this bug on master (04710b6d8c9e286485f4241671df72216b0f4698). Testing system: macOS 10.13.6, Qt 5.11.2.

    UPDATE: #16296 (comment)

  5. MarcoFalke added the label macOS on Oct 12, 2019
  6. MarcoFalke commented at 3:22 PM on October 12, 2019: member

    is this still an issue @fanquake

  7. MarcoFalke commented at 3:24 PM on October 12, 2019: member

    I guess someone should run the functional test suite with QT_FATAL_WARNINGS=1 once (unrelated to this issue)

  8. fanquake commented at 3:40 PM on October 12, 2019: member

    is this still an issue @fanquake

    Yes. The GUI: QObject::startTimer: Timers can only be used with threads started with QThread warning still appears, so that same thing happens. Still low prio though.

  9. promag commented at 9:30 PM on October 12, 2019: member

    The problem is that QTimer::singleShot is called from a RPC thread, which is not a QThread. The startTimer that gives the warning comes from

    https://github.com/bitcoin/bitcoin/blob/561a7d30478b82f5d46dcf0f16e864a9608004f4/src/qt/walletcontroller.cpp#L105 And then: https://github.com/bitcoin/bitcoin/blob/561a7d30478b82f5d46dcf0f16e864a9608004f4/src/qt/walletmodel.cpp#L48-L50

  10. promag commented at 9:42 PM on October 12, 2019: member

    @hebasto how come you don't see the warning?

  11. hebasto commented at 9:58 PM on October 12, 2019: member

    @promag

    how come you don't see the warning?

    Will check again...

  12. hebasto commented at 9:48 AM on October 13, 2019: member

    how come you don't see the warning?

    The issue is confirmed on both Linux Mint 19.2 and macOS 10.13.6 (previously, I ran "loadwallet" in GUI console, not from bitcoin-cli).

  13. promag commented at 9:56 AM on October 13, 2019: member

    That makes sense! I'll re-test because I think this warning might cause the wallet balance to not update.

  14. promag commented at 11:30 AM on October 13, 2019: member

    I confirm that this is a bug (the wallet balance is not updated) and that the fix needs backport. cc @fanquake

  15. laanwj added the label Bug on Oct 14, 2019
  16. laanwj closed this on Oct 26, 2019

  17. sidhujag referenced this in commit bcfa469a4c on Oct 28, 2019
  18. sidhujag referenced this in commit 780a75e801 on Nov 10, 2020
  19. PastaPastaPasta referenced this in commit c904c38931 on Sep 21, 2021
  20. kittywhiskers referenced this in commit a201faacec on Oct 12, 2021
  21. MarcoFalke locked this on Dec 16, 2021
  22. gades referenced this in commit bf11b940ee on May 10, 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-04-20 00:14 UTC

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