gui: Crash if shutdown during processNewTransaction #18090

issue fanquake opened this issue on February 7, 2020
  1. fanquake commented at 6:02 AM on February 7, 2020: member

    i.e call generatetoaddress and shutdown bitcoin-qt:

    * thread [#1](/bitcoin-bitcoin/1/), queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x45)
        frame [#0](/bitcoin-bitcoin/0/): 0x0000000100268cae bitcoin-qt`WalletView::processNewTransaction(this=0x00000001280ce250, parent=0x00007ffeefbfcf78, start=3, (null)=3) at walletview.cpp:136:61
       133 	void WalletView::processNewTransaction(const QModelIndex& parent, int start, int /*end*/)
       134 	{
       135 	    // Prevent balloon-spam when initial block download is in progress
    -> 136 	    if (!walletModel || !clientModel || clientModel->node().isInitialBlockDownload())
       137 	        return;
       138 	
       139 	    TransactionTableModel *ttm = walletModel->getTransactionTableModel();
    Target 0: (bitcoin-qt) stopped.
    
    * thread [#1](/bitcoin-bitcoin/1/), queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x45)
      * frame [#0](/bitcoin-bitcoin/0/): 0x0000000100268c7d bitcoin-qt`WalletView::processNewTransaction(this=0x000000010df82250, parent=0x00007ffeefbfcf78, start=19, (null)=19) at walletview.cpp:139:50
        frame [#1](/bitcoin-bitcoin/1/): 0x000000010026c134 bitcoin-qt`QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1, 2>, QtPrivate::List<QModelIndex const&, int, int>, void, void (WalletView::*)(QModelIndex const&, int, int)>::call(f=f0 8b 26 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x000000010df82250, arg=0x00007ffeefbfcfb0)(QModelIndex const&, int, int), WalletView*, void**) at qobjectdefs_impl.h:152:13
        frame [#2](/bitcoin-bitcoin/2/): 0x000000010026c006 bitcoin-qt`void QtPrivate::FunctionPointer<void (WalletView::*)(QModelIndex const&, int, int)>::call<QtPrivate::List<QModelIndex const&, int, int>, void>(f=f0 8b 26 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x000000010df82250, arg=0x00007ffeefbfcfb0)(QModelIndex const&, int, int), WalletView*, void**) at qobjectdefs_impl.h:185:13
        frame [#3](/bitcoin-bitcoin/3/): 0x000000010026bec4 bitcoin-qt`QtPrivate::QSlotObject<void (WalletView::*)(QModelIndex const&, int, int), QtPrivate::List<QModelIndex const&, int, int>, void>::impl(which=1, this_=0x0000000127e5f2a0, r=0x000000010df82250, a=0x00007ffeefbfcfb0, ret=0x0000000000000000) at qobjectdefs_impl.h:414:17
        frame [#4](/bitcoin-bitcoin/4/): 0x0000000104e326e2 QtCore`___lldb_unnamed_symbol2576$$QtCore + 1138
        frame [#5](/bitcoin-bitcoin/5/): 0x0000000104db29c0 QtCore`QAbstractItemModel::endInsertRows() + 272
        frame [#6](/bitcoin-bitcoin/6/): 0x00000001001e375f bitcoin-qt`TransactionTablePriv::updateWallet(this=0x000000012af59850, wallet=0x000000012af15d50, hash=0x00007ffeefbfd498, status=0, showTransaction=true) at transactiontablemodel.cpp:147:29
        frame [#7](/bitcoin-bitcoin/7/): 0x00000001001e2a7b bitcoin-qt`TransactionTableModel::updateTransaction(this=0x000000012af59710, hash=0x000000010560c830, status=0, showTransaction=true) at transactiontablemodel.cpp:251:11
        frame [#8](/bitcoin-bitcoin/8/): 0x000000010027dcdd bitcoin-qt`TransactionTableModel::qt_static_metacall(_o=0x000000012af59710, _c=InvokeMetaMethod, _id=0, _a=0x00000001056202b0) at moc_transactiontablemodel.cpp:91:21
        frame [#9](/bitcoin-bitcoin/9/): 0x0000000104e2addd QtCore`QObject::event(QEvent*) + 957
        frame [#10](/bitcoin-bitcoin/10/): 0x0000000104082bcd QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 269
        frame [#11](/bitcoin-bitcoin/11/): 0x0000000104084005 QtWidgets`QApplication::notify(QObject*, QEvent*) + 581
        frame [#12](/bitcoin-bitcoin/12/): 0x0000000104e00994 QtCore`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
        frame [#13](/bitcoin-bitcoin/13/): 0x0000000104e01a43 QtCore`QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 691
    
  2. fanquake added the label Bug on Feb 7, 2020
  3. fanquake added the label GUI on Feb 7, 2020
  4. MarcoFalke added the label Tests on Feb 7, 2020
  5. emilengler commented at 5:24 PM on February 7, 2020: contributor

    I can't reproduce. Have you called the command from the GUI console or through the RPC interface? When I do it over the GUI console my bitcoin-qt freezes and the shutdown happens after everything's finished

  6. emilengler commented at 5:32 PM on February 7, 2020: contributor

    Can reproduce it through the RPC interface

  7. jonasschnelli commented at 5:42 PM on February 7, 2020: contributor

    Reproduce in GUI:

    • open console
    • generatetoaddress(1000,getnewaddress())
    • Quit Bitcoin-Qt
    • segfault
  8. emilengler commented at 6:28 PM on February 7, 2020: contributor

    @jonasschnelli My Computer freezes during generatetoaddress is executed. I can't close bitcoin-qt then. Well it works when calling the command through bitcoin-cli.

  9. laanwj closed this on Feb 10, 2020

  10. PastaPastaPasta referenced this in commit 5049c4bdb7 on Jun 27, 2021
  11. PastaPastaPasta referenced this in commit 6650b11c9a on Jun 28, 2021
  12. PastaPastaPasta referenced this in commit a6dc870292 on Jun 29, 2021
  13. PastaPastaPasta referenced this in commit 9399a98956 on Jul 1, 2021
  14. PastaPastaPasta referenced this in commit 2c05c74c18 on Jul 1, 2021
  15. PastaPastaPasta referenced this in commit 4357992b16 on Jul 14, 2021
  16. PastaPastaPasta referenced this in commit 7ace8e55e3 on Jul 14, 2021
  17. PastaPastaPasta referenced this in commit 9cdcdf2c5d on Jul 15, 2021
  18. DrahtBot locked this on Feb 15, 2022
  19. gades referenced this in commit 33a9765cbb on May 8, 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-13 18:14 UTC

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