I can reproduce an issue with master; v0.17.1rc1 works fine.

Steps to reproduce:
- `bitcoin-qt -regtest`
- open Console window
- repeat `generatetoaddress 1 AN_ADDRESS` some times until crash

Crash occurs both on wayland and x11.

[debug.log](https://github.com/bitcoin/bitcoin/files/2690776/debug.log)

[wallets.zip](https://github.com/bitcoin/bitcoin/files/2690781/wallets.zip)
#include <qt/macdockiconhandler.h>
#endif
#include <chainparams.h>
#include <interfaces/handler.h>
#include <interfaces/node.h>
#include <ui_interface.h>
#include <util/system.h>
#include <iostream>
#include <QAction>
#include <QApplication>
#include <QComboBox>
#include <QDateTime>
#include <QDesktopWidget>
#include <QDragEnterEvent>
#include <QListWidget>
#include <QMenuBar>
#include <QMessageBox>
#include <QMimeData>
#include <QProgressDialog>
#include <QSettings>
#include <QShortcut>
#include <QStackedWidget>
#include <QStatusBar>
#include <QStyle>
#include <QTimer>
#include <QToolBar>
#include <QUrlQuery>
#include <QVBoxLayout>
#include <QWindow>
#include <boost/bind.hpp>