KMail Qt6 git master crashes on shutdown. It appears that KSelectionProxyModel::columnCount() calls sourceModel()->columnCount() after the model's sourceModel() has either been unset or deleted. Backtrace: #0 0x0000001800080001 in () [3/100] #1 0x00007fffed5a3f25 in KSelectionProxyModel::columnCount(QModelIndex const&) const (this=0x555555ac30f0, index=...) at /data/KDE/src/frameworks/kitemmodels/src/core/kselectionproxymodel.cpp:2362 #2 0x00007fffeaf0c525 in QSortFilterProxyModelPrivate::find_source_sort_column() const (this=this@entry=0x555555abfe50) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/itemmodels/qsortfilterproxymodel.cpp:659 #3 0x00007fffeaf10108 in QSortFilterProxyModelPrivate::_q_clearMapping() (this=0x555555abfe50) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/itemmodels/qsortfilterproxymodel.cpp:467 #4 0x00007fffeaf211b1 in QSortFilterProxyModelPrivate::_q_sourceReset() (this=0x555555abfe50) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/itemmodels/qsortfilterproxymodel.cpp:1587 #5 QSortFilterProxyModel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qsortfilterproxymodel.cpp:587 #6 0x00007fffead91543 in doActivate<false>(QObject*, int, void**) (sender=0x555555ac30f0, signal_index=21, argv=0x7fffffffb7d0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qobject.cpp:4004 #7 0x00007fffeaee7687 in QAbstractItemModel::modelReset(QAbstractItemModel::QPrivateSignal) (_t1=..., this=0x555555ac30f0) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qabstractitemmodel.cpp:1408 #8 QAbstractItemModel::endResetModel() (this=0x555555ac30f0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/itemmodels/qabstractitemmodel.cpp:3403 #9 0x00007fffed5a41ad in KSelectionProxyModel::setSelectionModel(QItemSelectionModel*)::$_0::operator()() const (this=0x555555ac4830) at /data/KDE/src/frameworks/kitemmodels/src/core/kselectionproxymodel.cpp:2404 #10 0x00007fffead9134a in QtPrivate::QSlotObjectBase::call(QObject*, void**) (a=0x7fffffffb930, r=0x555555ac30f0, this=0x555555ac4820, this=<optimized out>, r=<optimized out>, a=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qobjectdefs_impl.h:363 #11 doActivate<false>(QObject*, int, void**) (sender=0x555555ac3050, signal_index=7, argv=0x7fffffffb930) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qobject.cpp:3992 #12 0x00007fffeaf06640 in QItemSelectionModel::modelChanged(QAbstractItemModel*) (_t1=<optimized out>, this=<optimized out>) at /usr/src/debug/qt6-base/build/src/corelib/Core_autogen/include/moc_qitemselectionmodel.cpp:804 #13 QItemSelectionModelPrivate::modelChanged(QAbstractItemModel*) (mod=<optimized out>, this=0x555555afed30) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/itemmodels/qitemselectionmodel_p.h:61 #14 QObjectCompatProperty<QItemSelectionModelPrivate, QAbstractItemModel*, &QItemSelectionModelPrivate::_qt_property_model_offset, &QItemSelectionModelPrivate::setModel, &QItemSelectionModelPrivate::modelChanged, decltype(nullptr)>::notify() (this=0x555555afeda8) at /usr/src/debug/qt6-base/build/include/QtCore/6.5.2/QtCore/private/../../../../../../qtbase-everywhere-src-6.5.2/src/corelib/kernel/qproperty_p.h:642 #15 0x00007fffead91543 in doActivate<false>(QObject*, int, void**) (sender=0x555555fbeff0, signal_index=0, argv=0x7fffffffc2d0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qobject.cpp:4004 #16 0x00007fffead80d15 in QObject::destroyed(QObject*) (_t1=0x555555fbeff0, this=0x555555fbeff0) at /usr/src/debug/qt6-base/build/src/corelib/kernel/moc_qobject.cpp:266 #17 QObject::~QObject() (this=0x555555fbeff0, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qobject.cpp:1014 #18 0x00007fffea593e39 in MailCommon::FolderTreeWidgetProxyModel::~FolderTreeWidgetProxyModel() (this=0x555555fbeff0) at /data/KDE/src/kde/pim/mailcommon/src/folder/foldertreewidgetproxymodel.cpp:91 #19 0x00007fffead7d57b in QObjectPrivate::deleteChildren() (this=this@entry=0x555555ca93b0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qobject.cpp:2174 q #20 0x00007fffebda8a39 in QWidget::~QWidget() (this=0x555555fd93a0, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/widgets/kernel/qwidget.cpp:1531 #21 0x00007fffea5928b9 in MailCommon::FolderTreeWidget::~FolderTreeWidget() (this=0x555555fbeff0) at /data/KDE/src/kde/pim/mailcommon/src/folder/foldertreewidget.cpp:131 #22 0x00007fffead7d57b in QObjectPrivate::deleteChildren() (this=this@entry=0x555555b06fd0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qobject.cpp:2174 #23 0x00007fffebda8a39 in QWidget::~QWidget() (this=0x555555a18880, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/widgets/kernel/qwidget.cpp:1531 #24 0x00007fffebf5f5dd in QSplitter::~QSplitter() (this=0x555555a18880, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/widgets/widgets/qsplitter.cpp:951 #25 0x00007fffead7d57b in QObjectPrivate::deleteChildren() (this=this@entry=0x555555b027c0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qobject.cpp:2174 #26 0x00007fffebda8a39 in QWidget::~QWidget() (this=0x55555624e3b0, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/widgets/kernel/qwidget.cpp:1531 #27 0x00007fffebf5f5dd in QSplitter::~QSplitter() (this=0x55555624e3b0, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/widgets/widgets/qsplitter.cpp:951 #28 0x00007ffff7eeb963 in KMMainWidget::deleteWidgets() (this=0x555556092230) at /data/KDE/src/kde/pim/kmail/src/kmmainwidget.cpp:981 #29 KMMainWidget::destruct() (this=this@entry=0x555556092230) at /data/KDE/src/kde/pim/kmail/src/kmmainwidget.cpp:388 #30 0x00007ffff7eeb672 in KMMainWidget::~KMMainWidget() (this=0x555556092230) at /data/KDE/src/kde/pim/kmail/src/kmmainwidget.cpp:372 #31 0x00007ffff7eebad9 in KMMainWidget::~KMMainWidget() (this=0x555555fbeff0) at /data/KDE/src/kde/pim/kmail/src/kmmainwidget.cpp:369 #32 0x00007fffead7d57b in QObjectPrivate::deleteChildren() (this=this@entry=0x555555ff4eb0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qobject.cpp:2174 #33 0x00007fffebda8a39 in QWidget::~QWidget() (this=0x555555f5ad20, this=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/widgets/kernel/qwidget.cpp:1531 #34 0x00007fffeca0f235 in KMainWindow::~KMainWindow() (this=0x555555f5ad20) at /data/KDE/src/frameworks/kxmlgui/src/kmainwindow.cpp:436 #35 0x00007ffff7e882ed in KMMainWin::~KMMainWin() (this=0x555555f5ad20, vtt=<optimized out>) at /data/KDE/src/kde/pim/kmail/src/kmmainwin.cpp:107 #36 KMMainWin::~KMMainWin() (this=0x555555f5ad20) at /data/KDE/src/kde/pim/kmail/src/kmmainwin.cpp:103 #37 KMMainWin::~KMMainWin() (this=0x555555f5ad20) at /data/KDE/src/kde/pim/kmail/src/kmmainwin.cpp:103 #38 0x00007fffead7cf58 in qDeleteInEventHandler(QObject*) (o=0x555555f5ad20) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qobject.cpp:4864 #39 QObject::event(QEvent*) (this=0x555555f5ad20, e=0x555556ba6a80) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qobject.cpp:1378 #40 0x00007fffeca1169a in KMainWindow::event(QEvent*) (this=0x555555f5ad20, ev=0x555556ba6a80) at /data/KDE/src/frameworks/kxmlgui/src/kmainwindow.cpp:911 #41 0x00007fffeca52434 in KXmlGuiWindow::event(QEvent*) (this=0x555555fbeff0, ev=0x7fffffffb498) at /data/KDE/src/frameworks/kxmlgui/src/kxmlguiwindow.cpp:220 #42 0x00007fffebd7136b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x555555f5ad20, e=0x555556ba6a80) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/widgets/kernel/qapplication.cpp:3287 #43 0x00007fffead3b718 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x555555f5ad20, event=event@entry=0x555556ba6a80) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qcoreapplication.cpp:1118 #44 0x00007fffead3ba9b in QCoreApplication::sendEvent(QObject*, QEvent*) (event=0x555556ba6a80, receiver=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qcoreapplication.cpp:1536 #45 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x555555569ba0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qcoreapplication.cpp:1898 #46 0x00007fffeaf34854 in QCoreApplication::sendPostedEvents(QObject*, int) (receiver=0x0, event_type=0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qcoreapplication.cpp:1757 #47 postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x555555640170) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qeventdispatcher_glib.cpp:243 #48 0x00007fffe7f34f19 in g_main_dispatch (context=0x7fffcc000ef0) at ../glib/glib/gmain.c:3476 #49 0x00007fffe7f932b7 in g_main_context_dispatch_unlocked (context=0x7fffcc000ef0) at ../glib/glib/gmain.c:4284 #50 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7fffcc000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349 #51 0x00007fffe7f33112 in g_main_context_iteration (context=0x7fffcc000ef0, may_block=1) at ../glib/glib/gmain.c:4414 #52 0x00007fffeaf32794 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55555563f580, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qeventdispatcher_glib.cpp:393 #53 0x00007fffead45623 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=..., this=0x7fffffffcc40) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qeventloop.cpp:100 #54 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffffffcc40, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/kernel/qeventloop.cpp:182 #55 0x00007fffead3f1f8 in QCoreApplication::exec() () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.5.2/src/corelib/global/qflags.h:74 #56 0x00005555555592e2 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /data/KDE/src/kde/pim/kmail/src/main.cpp:173
*** This bug has been marked as a duplicate of bug 470097 ***