Skip to content

Commit

Permalink
Merge #17695: gui: disable File->CreateWallet during startup
Browse files Browse the repository at this point in the history
d65fafc gui: disable File->CreateWallet during startup (fanquake)

Pull request description:

  Same as #16118. Early calls to Create Wallet will crash bitcoin-qt.

  ```bash
  lldb /Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt -- --regtest -debug

  Process 18143 launched: '/Users/michael/github/bitcoin/src/qt/bitcoin-qt' (x86_64)
  2019-12-07 15:49:37.823867-0500 bitcoin-qt[18143:5696499] MessageTracer: Falling back to default whitelist
  Process 18143 stopped
  * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)
      frame #0: 0x00000001000d2d9d bitcoin-qt`CreateWalletActivity::createWallet() + 381
  bitcoin-qt`CreateWalletActivity::createWallet:
  ->  0x1000d2d9d <+381>: movq   0x18(%rax), %r14
      0x1000d2da1 <+385>: movq   %r15, -0xa8(%rbp)
      0x1000d2da8 <+392>: leaq   -0xa0(%rbp), %r12
      0x1000d2daf <+399>: leaq   -0x80(%rbp), %rsi
  Target 0: (bitcoin-qt) stopped.
  (lldb) bt
  * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x18)
    * frame #0: 0x00000001000d2d9d bitcoin-qt`CreateWalletActivity::createWallet() + 381
      frame #1: 0x0000000100833e6f bitcoin-qt`QMetaObject::activate(QObject*, int, int, void**) + 1631
      frame #2: 0x0000000100a1fc47 bitcoin-qt`QDialog::done(int) + 247
      frame #3: 0x0000000100833ef5 bitcoin-qt`QMetaObject::activate(QObject*, int, int, void**) + 1765
      frame #4: 0x00000001009e04c2 bitcoin-qt`QDialogButtonBoxPrivate::_q_handleButtonClicked() + 786
  ```

ACKs for top commit:
  jonasschnelli:
    utACK d65fafc
  promag:
    ACK d65fafc.

Tree-SHA512: 12d7f9e8772508bffbb0163849d9eceec5b1c80068c5d377a4d0973c713dc5f8ad38be8f793fec843d7fb604f0e60a72398b0c95f0a8b775dab39d25b29ac046
  • Loading branch information
fanquake committed Dec 9, 2019
2 parents 1ebf640 + d65fafc commit c8e65ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ void BitcoinGUI::createActions()
m_close_wallet_action->setStatusTip(tr("Close wallet"));

m_create_wallet_action = new QAction(tr("Create Wallet..."), this);
m_create_wallet_action->setEnabled(false);
m_create_wallet_action->setStatusTip(tr("Create a new wallet"));

showHelpMessageAction = new QAction(tr("&Command-line options"), this);
Expand Down Expand Up @@ -618,6 +619,7 @@ void BitcoinGUI::setWalletController(WalletController* wallet_controller)

m_wallet_controller = wallet_controller;

m_create_wallet_action->setEnabled(true);
m_open_wallet_action->setEnabled(true);
m_open_wallet_action->setMenu(m_open_wallet_menu);

Expand Down

0 comments on commit c8e65ad

Please sign in to comment.