gui: Opening wallet dialog doesn’t close for certain wallet names #15455

issue fanquake openend this issue on February 21, 2019
  1. fanquake commented at 6:32 am on February 21, 2019: member

    When you open wallets with exotic names, i.e 🦹🏿‍♂️ (Emoji Version 11), via the “Open Wallet” menu, the opening wallet dialog never closes, even after the wallet has finished loading.

    screen shot 2019-02-21 at 2 34 06 pm

  2. fanquake added the label GUI on Feb 21, 2019
  3. promag commented at 8:09 am on February 21, 2019: member
    Please tag 0.18.
  4. fanquake added this to the milestone 0.18.0 on Feb 21, 2019
  5. promag commented at 5:16 pm on February 21, 2019: member
    But was the wallet loaded?
  6. promag commented at 11:18 pm on February 21, 2019: member

    It is really weird such paths always trigger the bug. The following patch fixes it:

     0index bc88dd5e0..2e7cf65e9 100644
     1--- a/src/qt/bitcoingui.cpp
     2+++ b/src/qt/bitcoingui.cpp
     3@@ -396,6 +396,7 @@ void BitcoinGUI::createActions()
     4                     connect(activity, &OpenWalletActivity::opened, this, &BitcoinGUI::setCurrentWallet);
     5                     connect(activity, &OpenWalletActivity::finished, activity, &QObject::deleteLater);
     6                     connect(activity, &OpenWalletActivity::finished, dialog, &QObject::deleteLater);
     7+                    QMetaObject::invokeMethod(activity, "open", Qt::QueuedConnection);
     8                 });
     9             }
    10         });
    11diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp
    12index c532ffbbf..fab86a791 100644
    13--- a/src/qt/walletcontroller.cpp
    14+++ b/src/qt/walletcontroller.cpp
    15@@ -59,7 +59,6 @@ OpenWalletActivity* WalletController::openWallet(const std::string& name, QWidge
    16 {
    17     OpenWalletActivity* activity = new OpenWalletActivity(this, name);
    18     activity->moveToThread(&m_activity_thread);
    19-    QMetaObject::invokeMethod(activity, "open", Qt::QueuedConnection);
    20     return activity;
    21 }
    

    @fanquake mind testing it? The bug happens because the signal OpenWalletActivity::finished is emitted before the connection to this signal is made.

    And I’m inclined to push this to 0.18 branch only due to the simple change.

    However for master I’m refactoring the WalletController and OpenWalletActivity which can auto fix this issue.

  7. fanquake commented at 1:03 am on February 22, 2019: member
    @promag I’ve tested that the above patch fixes this issue. Using it I can open a wallet named 🦹🏿‍♂️ from the Open Wallet menu, and the progress dialog closes when the wallet is loaded.
  8. laanwj closed this on Feb 27, 2019

  9. laanwj referenced this in commit 6f43ed4c5a on Feb 27, 2019
  10. PastaPastaPasta referenced this in commit d90e81919f on Oct 25, 2021
  11. pravblockc referenced this in commit b47d70de1c on Nov 18, 2021
  12. DrahtBot locked this on Dec 16, 2021


fanquake promag

Labels
GUI

Milestone
0.18.0


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-11-17 15:12 UTC

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