Unexpected test fail: wallet/wallet.cpp:3113:51: runtime error: division by zero #20542

issue promag openend this issue on December 2, 2020
  1. promag commented at 0:12 am on December 2, 2020: member

    After building https://github.com/promag/gui/commit/0b0d91e22a8d1f973f8d008b85e3da4217b7af24

    In https://bitcoinbuilds.org/index.php?ansilog=8847a501-fb20-47ed-8a8a-88d83ca7d381.log#l2039

     0L2035   ********* Start testing of WalletTests *********
     1L2036   Config: Using QtTest library 5.9.5, Qt 5.9.5 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 7.4.0)
     2L2037   PASS   : WalletTests::initTestCase()
     3L2038   wallet/wallet.cpp:3113:51: runtime error: division by zero
     4L2039       [#0](/bitcoin-bitcoin/0/) 0x559bf8ddde17 in CWallet::CreateTransactionInternal(std::vector<CRecipient, std::allocator<CRecipient> > const&, std::shared_ptr<CTransaction const>&, long&, int&, bilingual_str&, CCoinControl const&, FeeCalculation&, bool) /home/ubuntu/src/src/wallet/wallet.cpp:3113:51
     5L2040       [#1](/bitcoin-bitcoin/1/) 0x559bf8dd78a0 in CWallet::CreateTransaction(std::vector<CRecipient, std::allocator<CRecipient> > const&, std::shared_ptr<CTransaction const>&, long&, int&, bilingual_str&, CCoinControl const&, FeeCalculation&, bool) /home/ubuntu/src/src/wallet/wallet.cpp:3133:16
     6L2041       [#2](/bitcoin-bitcoin/2/) 0x559bf8b384ba in interfaces::(anonymous namespace)::WalletImpl::createTransaction(std::vector<CRecipient, std::allocator<CRecipient> > const&, CCoinControl const&, bool, int&, long&, bilingual_str&) /home/ubuntu/src/src/interfaces/wallet.cpp:235:24
     7L2042       [#3](/bitcoin-bitcoin/3/) 0x559bf7bc7685 in WalletModel::prepareTransaction(WalletModelTransaction&, CCoinControl const&) /home/ubuntu/src/src/qt/walletmodel.cpp:203:27
     8L2043       [#4](/bitcoin-bitcoin/4/) 0x559bf7afd1cd in SendCoinsDialog::PrepareSendText(QString&, QString&, QString&) /home/ubuntu/src/src/qt/sendcoinsdialog.cpp:267:28
     9L2044       [#5](/bitcoin-bitcoin/5/) 0x559bf7b02931 in SendCoinsDialog::on_sendButton_clicked() /home/ubuntu/src/src/qt/sendcoinsdialog.cpp:377:10
    10L2045       [#6](/bitcoin-bitcoin/6/) 0x559bf7c3d24d in SendCoinsDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/ubuntu/src/src/qt/moc_sendcoinsdialog.cpp:203:21
    11L2046       [#7](/bitcoin-bitcoin/7/) 0x7fe02a1a7002 in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x29b002)
    12L2047       [#8](/bitcoin-bitcoin/8/) 0x7fe02a1a947c in QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x29d47c)
    13L2048       [#9](/bitcoin-bitcoin/9/) 0x559bf780b54c in QMetaObject::invokeMethod(QObject*, char const*, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs.h:466:16
    14L2049       [#10](/bitcoin-bitcoin/10/) 0x559bf780b54c in (anonymous namespace)::SendCoins(CWallet&, SendCoinsDialog&, boost::variant<CNoDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessUnknown> const&, long, bool) /home/ubuntu/src/src/qt/test/wallettests.cpp:76
    15L2050       [#11](/bitcoin-bitcoin/11/) 0x559bf78043ff in (anonymous namespace)::TestGUI(interfaces::Node&) /home/ubuntu/src/src/qt/test/wallettests.cpp:187:21
    16L2051       [#12](/bitcoin-bitcoin/12/) 0x559bf7801c68 in WalletTests::walletTests() /home/ubuntu/src/src/qt/test/wallettests.cpp:285:5
    17L2052       [#13](/bitcoin-bitcoin/13/) 0x559bf78339f2 in WalletTests::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/ubuntu/src/src/qt/test/moc_wallettests.cpp:70:21
    18L2053       [#14](/bitcoin-bitcoin/14/) 0x7fe02a1a7002 in QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0x29b002)
    19L2054       [#15](/bitcoin-bitcoin/15/) 0x7fe029ce5799  (/usr/lib/x86_64-linux-gnu/libQt5Test.so.5+0x13799)
    20L2055       [#16](/bitcoin-bitcoin/16/) 0x7fe029ce64ef  (/usr/lib/x86_64-linux-gnu/libQt5Test.so.5+0x144ef)
    21L2056       [#17](/bitcoin-bitcoin/17/) 0x7fe029ce6a60  (/usr/lib/x86_64-linux-gnu/libQt5Test.so.5+0x14a60)
    22L2057       [#18](/bitcoin-bitcoin/18/) 0x7fe029ce702a in QTest::qExec(QObject*, int, char**) (/usr/lib/x86_64-linux-gnu/libQt5Test.so.5+0x1502a)
    23L2058       [#19](/bitcoin-bitcoin/19/) 0x559bf77ac2cc in main /home/ubuntu/src/src/qt/test/test_main.cpp:94:9
    24L2059       [#20](/bitcoin-bitcoin/20/) 0x7fe026937b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
    25L2060       [#21](/bitcoin-bitcoin/21/) 0x559bf76b4d59 in _start (/home/ubuntu/src/src/qt/test/test_bitcoin-qt+0x2633d59)
    26L2061   
    27L2062   SUMMARY: UndefinedBehaviorSanitizer: float-divide-by-zero wallet/wallet.cpp:3113:51 in 
    28L2063   FAIL qt/test/test_bitcoin-qt (exit status: 1)
    
  2. promag added the label Bug on Dec 2, 2020
  3. fanquake commented at 0:26 am on December 2, 2020: member
    Just to clarify, this isn’t a problem with master, but a failure you’ve seen in your own PR https://github.com/bitcoin-core/gui/pull/121 ?
  4. promag commented at 0:28 am on December 2, 2020: member
    @fanquake yes, but posted here because I think it’s unrelated to my PR.
  5. MarcoFalke commented at 7:43 am on December 2, 2020: member
    Which line of code is this? Note that there is a assert(nSubtractFeeFromAmount != 0);
  6. MarcoFalke closed this on Dec 2, 2020

  7. promag commented at 8:52 am on December 2, 2020: member
    Thanks @MarcoFalke, needs rebase then.
  8. jamesob referenced this in commit 5b78055d59 on Dec 22, 2021
  9. 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: 2024-10-30 03:12 UTC

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