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.

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.

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.