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.
#include <qt/guiconstants.h>
#include <qt/guiutil.h>
#include <qt/intro.h>
#include <qt/networkstyle.h>
#include <qt/optionsmodel.h>
#include <qt/platformstyle.h>
#include <qt/splashscreen.h>
#include <qt/utilitydialog.h>
#include <qt/winshutdownmonitor.h>
#ifdef ENABLE_WALLET
#include <qt/paymentserver.h>
#include <qt/walletmodel.h>
#endif
#include <init.h>
#include <rpc/server.h>
#include <ui_interface.h>
#include <util.h>
#include <warnings.h>
#ifdef ENABLE_WALLET
#include <wallet/wallet.h>
#endif
#include <stdint.h>
#include <boost/thread.hpp>
#include <QApplication>
#include <QDebug>
#include <QLibraryInfo>
#include <QLocale>
#include <QMessageBox>
#include <QSettings>
#include <QThread>