Bug 389804 - Crash on clicking on spam folder
Summary: Crash on clicking on spam folder
Status: RESOLVED DUPLICATE of bug 387903
Alias: None
Product: kmail2
Classification: Applications
Component: message list (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-02 18:45 UTC by Allan Sandfeld
Modified: 2018-02-02 22:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allan Sandfeld 2018-02-02 18:45:59 UTC
KMail now consistently crashes when I click on my spam folder (which somehow also got itself changed to "act on new email"). 

The backtrace shows it is a recursive loop and probably a stack-overflow. It has more than 4000 entries that all look the same:

Thread 1 "kmail" received signal SIGSEGV, Segmentation fault.
0x00007ffff5796ea2 in QListData::append(int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
(gdb) bt
#0  0x00007ffff5796ea2 in QListData::append(int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#1  0x00007ffff3ab2f40 in QList<MessageList::Core::MessageItem*>::append (this=<optimized out>, t=<optimized out>)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:602
#2  0x00007ffff3aaeb6d in MessageList::Core::MessageItem::subTreeToList (this=0x8efabf0, list=...)
    at /workspace/build/messagelist/src/core/messageitem.cpp:587
#3  0x00007ffff3aaebaf in MessageList::Core::MessageItem::subTreeToList (this=<optimized out>, list=...)
    at /workspace/build/messagelist/src/core/messageitem.cpp:594
#4  0x00007ffff3aaebaf in MessageList::Core::MessageItem::subTreeToList (this=<optimized out>, list=...)
    at /workspace/build/messagelist/src/core/messageitem.cpp:594
#5  0x00007ffff3aaebaf in MessageList::Core::MessageItem::subTreeToList (this=<optimized out>, list=...)
    at /workspace/build/messagelist/src/core/messageitem.cpp:594

<snip>
#33943 0x00007ffff3aaebaf in MessageList::Core::MessageItem::subTreeToList (this=<optimized out>, list=...)
    at /workspace/build/messagelist/src/core/messageitem.cpp:594
#33944 0x00007ffff3aaebaf in MessageList::Core::MessageItem::subTreeToList (this=<optimized out>, list=...)
    at /workspace/build/messagelist/src/core/messageitem.cpp:594
#33945 0x00007ffff3aaebaf in MessageList::Core::MessageItem::subTreeToList (this=<optimized out>, list=...)
    at /workspace/build/messagelist/src/core/messageitem.cpp:594

I haven't found the bottom. The kmail version is 17.12.1 from neon.
Comment 1 Allan Sandfeld 2018-02-02 18:47:53 UTC
Ah, found the bottom, I thought for a moment gdb was also in some infinite loop: 

#174610 0x00007ffff3aaebaf in MessageList::Core::MessageItem::subTreeToList (this=<optimized out>, list=...)
    at /workspace/build/messagelist/src/core/messageitem.cpp:594
#174611 0x00007ffff3aaebaf in MessageList::Core::MessageItem::subTreeToList (this=this@entry=0x8efafe0, list=...)
    at /workspace/build/messagelist/src/core/messageitem.cpp:594
#174612 0x00007ffff3ae8e6c in MessageList::Core::View::selectionAsMessageItemList (this=0xc0a2b0, 
    includeCollapsedChildren=includeCollapsedChildren@entry=true) at /workspace/build/messagelist/src/core/view.cpp:908
#174613 0x00007ffff3b1b74b in MessageList::Widget::getSelectionStats (this=0xbb82d0, selectedItems=..., selectedVisibleItems=..., 
    allSelectedBelongToSameThread=allSelectedBelongToSameThread@entry=0x7fffffffc4af, includeCollapsedChildren=<optimized out>)
    at /workspace/build/messagelist/src/widget.cpp:674
#174614 0x00007ffff3b0f6af in MessageList::Pane::getSelectionStats (this=<optimized out>, selectedItems=..., selectedVisibleItems=..., 
    allSelectedBelongToSameThread=allSelectedBelongToSameThread@entry=0x7fffffffc4af, 
    includeCollapsedChildren=includeCollapsedChildren@entry=true) at /workspace/build/messagelist/src/pane.cpp:992
#174615 0x00007ffff77f74b7 in KMMainWidget::updateMessageActions (this=this@entry=0xa8d060, fast=fast@entry=true)
    at /workspace/build/src/kmmainwidget.cpp:3618
#174616 0x00007ffff77f758e in KMMainWidget::startUpdateMessageActionsTimer (this=0xa8d060) at /workspace/build/src/kmmainwidget.cpp:3606
#174617 0x00007ffff59475a6 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174618 0x00007ffff59475a6 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174619 0x00007ffff3b1a6ce in MessageList::Widget::viewSelectionChanged (this=0xbb82d0)
    at /workspace/build/messagelist/src/widget.cpp:302
#174620 0x00007ffff3ae916c in MessageList::Core::View::slotSelectionChanged (this=0xc0a2b0)
    at /workspace/build/messagelist/src/core/view.cpp:1891
#174621 0x00007ffff59475a6 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174622 0x00007ffff58ca877 in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174623 0x00007ffff58cf5eb in QItemSelectionModel::emitSelectionChanged(QItemSelection const&, QItemSelection const&) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174624 0x00007ffff58d24b6 in QItemSelectionModel::select(QItemSelection const&, QFlags<QItemSelectionModel::SelectionFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174625 0x00007ffff58cca3c in QItemSelectionModel::select(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174626 0x00007ffff58cacc4 in QItemSelectionModel::setCurrentIndex(QModelIndex const&, QFlags<QItemSelectionModel::SelectionFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174627 0x00007ffff3ae5a12 in MessageList::Core::View::setCurrentMessageItem (this=0xc0a2b0, it=0x8efafe0, center=center@entry=false)
    at /workspace/build/messagelist/src/core/view.cpp:859
#174628 0x00007ffff3ac0a73 in MessageList::Core::ModelPrivate::viewItemJobStep (this=0xba8c00)
    at /workspace/build/messagelist/src/core/model.cpp:3977
#174629 0x00007ffff59475a6 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174630 0x00007ffff5953b07 in QTimer::timeout(QTimer::QPrivateSignal) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174631 0x00007ffff5953e08 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174632 0x00007ffff5948273 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174633 0x00007ffff6677b9c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#174634 0x00007ffff667f5a7 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#174635 0x00007ffff591adf8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174636 0x00007ffff596fa7e in QTimerInfoList::activateTimers() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174637 0x00007ffff5970301 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174638 0x00007fffe8e1d197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#174639 0x00007fffe8e1d3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#174640 0x00007fffe8e1d49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#174641 0x00007ffff59706af in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174642 0x00007ffff5918e2a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174643 0x00007ffff5921d64 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#174644 0x0000000000403673 in main (argc=1, argv=0x7fffffffdd28) at /workspace/build/src/main.cpp:156
Comment 2 Allen Winter 2018-02-02 22:40:29 UTC
I also have this happening quite often.
Coincidentally I made a little patch last night to address it.

I'll put up the patch on phabricator so you can test.

this is a dupe.

*** This bug has been marked as a duplicate of bug 387903 ***
Comment 3 Allen Winter 2018-02-02 22:47:44 UTC
see https://phabricator.kde.org/D10255