In trying to debug #12337 I added a sleep at the end of AppInitMain() to simulate being able to close the application late in the AppInitMain() process. If I close the splash screen at this point, I get a reliable crash when the splashs screen is deleted as it tries to disconnect itself from the wallet ShowProgress signal after Shutdown() has been called and the wallet has been deleted.
WId getMainWinId() const;
public Q_SLOTS:
    void initializeResult(bool success);
    void shutdownResult();
    
    void handleRunawayException(const QString &message);
Q_SIGNALS:
    void requestedInitialize();
    void requestedShutdown();
    void stopThread();
    void splashFinished(QWidget *window);
private:
    QThread *coreThread;
    OptionsModel *optionsModel;
    ClientModel *clientModel;
    BitcoinGUI *window;
    QTimer *pollShutdownTimer;
#ifdef ENABLE_WALLET
    PaymentServer* paymentServer;
    WalletModel *walletModel;
#endif
    int returnValue;
    const PlatformStyle *platformStyle;
    std::unique_ptr<QWidget> shutdownWindow;
    void startThread();
};
#include <qt/bitcoin.moc>
BitcoinCore::BitcoinCore():