Bug 287923 - KMail crash when dragging mail to a folder
Summary: KMail crash when dragging mail to a folder
Status: RESOLVED UNMAINTAINED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: libakonadi (show other bugs)
Version: 4.8
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 288492 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-30 17:11 UTC by Aaron J. Seigo
Modified: 2017-01-07 21:56 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron J. Seigo 2011-11-30 17:11:46 UTC
Application: kontact (4.8 beta1)
KDE Platform Version: 4.7.3 (4.7.3) (Compiled from sources)
Qt Version: 4.7.4
Operating System: Linux 2.6.37.6-0.9-desktop i686
Distribution: "openSUSE 11.4 (i586)"

-- Information about the crash:
- What I was doing when the application crashed:

Dragging an email from my local inbox to a folder in the tree.

- Custom settings of the application:

Local maildir folders fetching from a pop3 service (holy old school, i know ;).

Additionally, when filters are applied I am routinely getting an error title "Error appying mail filter move" with the text "Unknown error. (No collection found)". This error appears once for each email that does not get properly filtered.

This started after an update 2-3 days ago of akonadi, kdepimlibs, kdepim-runtime and kdepim. No configuration changes were made after this update.

The crash can be reproduced some of the time.

-- Backtrace:
Application: Kontact (kontact), signal: Segmentation fault
[Current thread is 1 (Thread 0xb2b069a0 (LWP 10508))]

Thread 5 (Thread 0xb1a0bb70 (LWP 10509)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb4973105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb72285a7 in ?? () from /opt/kde4/lib/libQtWebKit.so.4
#3  0xb496eb05 in start_thread () from /lib/libpthread.so.0
#4  0xb471cd1e in clone () from /lib/libc.so.6

Thread 4 (Thread 0xb10e2b70 (LWP 10510)):
#0  0xb4970fcd in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0xb37afa9f in g_main_context_prepare () from /lib/libglib-2.0.so.0
#2  0xb37b08e2 in ?? () from /lib/libglib-2.0.so.0
#3  0xb37b0fce in g_main_context_iteration () from /lib/libglib-2.0.so.0
#4  0xb4b3f4a7 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/kde4/lib/libQtCore.so.4
#5  0xb4b113b9 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/kde4/lib/libQtCore.so.4
#6  0xb4b11602 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/kde4/lib/libQtCore.so.4
#7  0xb4a19693 in QThread::exec() () from /opt/kde4/lib/libQtCore.so.4
#8  0xb4a1972d in QThread::run() () from /opt/kde4/lib/libQtCore.so.4
#9  0xb4a1c242 in ?? () from /opt/kde4/lib/libQtCore.so.4
#10 0xb496eb05 in start_thread () from /lib/libpthread.so.0
#11 0xb471cd1e in clone () from /lib/libc.so.6

Thread 3 (Thread 0xae9b2b70 (LWP 10514)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb4973432 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb4a1c89f in QWaitCondition::wait(QMutex*, unsigned long) () from /opt/kde4/lib/libQtCore.so.4
#3  0xb4a10a61 in ?? () from /opt/kde4/lib/libQtCore.so.4
#4  0xb4a1c242 in ?? () from /opt/kde4/lib/libQtCore.so.4
#5  0xb496eb05 in start_thread () from /lib/libpthread.so.0
#6  0xb471cd1e in clone () from /lib/libc.so.6

Thread 2 (Thread 0xadfddb70 (LWP 10523)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb4973432 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb4a1c89f in QWaitCondition::wait(QMutex*, unsigned long) () from /opt/kde4/lib/libQtCore.so.4
#3  0xb4a10a61 in ?? () from /opt/kde4/lib/libQtCore.so.4
#4  0xb4a1c242 in ?? () from /opt/kde4/lib/libQtCore.so.4
#5  0xb496eb05 in start_thread () from /lib/libpthread.so.0
#6  0xb471cd1e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb2b069a0 (LWP 10508)):
[KCrash Handler]
#7  0xb3f26a54 in QListData::isEmpty (this=0x8) at /opt/kde4/include/QtCore/qlist.h:95
#8  0xb3f271bb in QList<QString>::isEmpty (this=0x8) at /opt/kde4/include/QtCore/qlist.h:139
#9  0xb404bb5d in Akonadi::RecentCollectionAction::addRecentCollection (this=0x0, id=39) at /home/aseigo/kdesrc/kdepimlibs/akonadi/recentcollectionaction.cpp:97
#10 0xb4025ac0 in Akonadi::StandardActionManager::Private::addRecentCollection (this=0x87660b8, id=39) at /home/aseigo/kdesrc/kdepimlibs/akonadi/standardactionmanager.cpp:1105
#11 0xb4025978 in Akonadi::StandardActionManager::Private::pasteTo (this=0x87660b8, selectionModel=0x852b568, action=0x8ba1a28, dropAction=Qt::MoveAction) at /home/aseigo/kdesrc/kdepimlibs/akonadi/standardactionmanager.cpp:1096
#12 0xb4024794 in Akonadi::StandardActionManager::Private::slotMoveItemTo (this=0x87660b8, action=0x8ba1a28) at /home/aseigo/kdesrc/kdepimlibs/akonadi/standardactionmanager.cpp:952
#13 0xb401deb2 in Akonadi::StandardActionManager::qt_metacall (this=0x87624f8, _c=QMetaObject::InvokeMetaMethod, _id=35, _a=0xbfedd208) at /home/aseigo/build/kdepimlibs/akonadi/standardactionmanager.moc:201
#14 0xb4b1880a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /opt/kde4/lib/libQtCore.so.4
#15 0xb4b276fd in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /opt/kde4/lib/libQtCore.so.4
#16 0xb5624793 in QMenu::triggered(QAction*) () from /opt/kde4/lib/libQtGui.so.4
#17 0xb562499b in ?? () from /opt/kde4/lib/libQtGui.so.4
#18 0xb562b5a3 in ?? () from /opt/kde4/lib/libQtGui.so.4
#19 0xb562c47e in QMenu::mouseReleaseEvent(QMouseEvent*) () from /opt/kde4/lib/libQtGui.so.4
#20 0xb51e6944 in QWidget::event(QEvent*) () from /opt/kde4/lib/libQtGui.so.4
#21 0xb562c957 in QMenu::event(QEvent*) () from /opt/kde4/lib/libQtGui.so.4
#22 0xb518d034 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/kde4/lib/libQtGui.so.4
#23 0xb519655a in QApplication::notify(QObject*, QEvent*) () from /opt/kde4/lib/libQtGui.so.4
#24 0xb5cfae36 in KApplication::notify (this=0xbfedf3e4, receiver=0x8ba17d0, event=0xbfedda78) at /home/aseigo/kdesrc/kdelibs/kdeui/kernel/kapplication.cpp:311
#25 0xb4b120fb in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /opt/kde4/lib/libQtCore.so.4
#26 0xb518dfa2 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /opt/kde4/lib/libQtGui.so.4
#27 0xb5218154 in ?? () from /opt/kde4/lib/libQtGui.so.4
#28 0xb5216467 in QApplication::x11ProcessEvent(_XEvent*) () from /opt/kde4/lib/libQtGui.so.4
#29 0xb5240902 in ?? () from /opt/kde4/lib/libQtGui.so.4
#30 0xb37b0509 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#31 0xb37b0d10 in ?? () from /lib/libglib-2.0.so.0
#32 0xb37b0fce in g_main_context_iteration () from /lib/libglib-2.0.so.0
#33 0xb4b3f46c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/kde4/lib/libQtCore.so.4
#34 0xb5240515 in ?? () from /opt/kde4/lib/libQtGui.so.4
#35 0xb4b113b9 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/kde4/lib/libQtCore.so.4
#36 0xb4b11602 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/kde4/lib/libQtCore.so.4
#37 0xb56289a4 in QMenu::exec(QPoint const&, QAction*) () from /opt/kde4/lib/libQtGui.so.4
#38 0xaf43da98 in MessageList::Widget::viewMessageListContextPopupRequest (this=0x86f21b8, selectedItems=..., globalPos=...) at /home/aseigo/kdesrc/kdepim/messagelist/widget.cpp:281
#39 0xaf411ae8 in MessageList::Core::View::mousePressEvent (this=0x86e3920, e=0xbfedec58) at /home/aseigo/kdesrc/kdepim/messagelist/core/view.cpp:2139
#40 0xb51e6af6 in QWidget::event(QEvent*) () from /opt/kde4/lib/libQtGui.so.4
#41 0xb55e3323 in QFrame::event(QEvent*) () from /opt/kde4/lib/libQtGui.so.4
#42 0xb5672e72 in QAbstractScrollArea::viewportEvent(QEvent*) () from /opt/kde4/lib/libQtGui.so.4
#43 0xb5713c2f in QAbstractItemView::viewportEvent(QEvent*) () from /opt/kde4/lib/libQtGui.so.4
#44 0xb575dc03 in QTreeView::viewportEvent(QEvent*) () from /opt/kde4/lib/libQtGui.so.4
#45 0xb5675785 in ?? () from /opt/kde4/lib/libQtGui.so.4
#46 0xb4b1229a in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /opt/kde4/lib/libQtCore.so.4
#47 0xb518d010 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /opt/kde4/lib/libQtGui.so.4
#48 0xb519655a in QApplication::notify(QObject*, QEvent*) () from /opt/kde4/lib/libQtGui.so.4
#49 0xb5cfae36 in KApplication::notify (this=0xbfedf3e4, receiver=0x86fb6f8, event=0xbfedec58) at /home/aseigo/kdesrc/kdelibs/kdeui/kernel/kapplication.cpp:311
#50 0xb4b120fb in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /opt/kde4/lib/libQtCore.so.4
#51 0xb518dfa2 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /opt/kde4/lib/libQtGui.so.4
#52 0xb5217f7c in ?? () from /opt/kde4/lib/libQtGui.so.4
#53 0xb5216467 in QApplication::x11ProcessEvent(_XEvent*) () from /opt/kde4/lib/libQtGui.so.4
#54 0xb5240902 in ?? () from /opt/kde4/lib/libQtGui.so.4
#55 0xb37b0509 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#56 0xb37b0d10 in ?? () from /lib/libglib-2.0.so.0
#57 0xb37b0fce in g_main_context_iteration () from /lib/libglib-2.0.so.0
#58 0xb4b3f46c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/kde4/lib/libQtCore.so.4
#59 0xb5240515 in ?? () from /opt/kde4/lib/libQtGui.so.4
#60 0xb4b113b9 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/kde4/lib/libQtCore.so.4
#61 0xb4b11602 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/kde4/lib/libQtCore.so.4
#62 0xb4b15faf in QCoreApplication::exec() () from /opt/kde4/lib/libQtCore.so.4
#63 0xb518ae47 in QApplication::exec() () from /opt/kde4/lib/libQtGui.so.4
#64 0x0804b878 in main (argc=1, argv=0xbfedf5c4) at /home/aseigo/kdesrc/kdepim/kontact/src/main.cpp:218

Reported using DrKonqi
Comment 1 Bogdan Udrescu 2011-12-02 23:07:01 UTC
I am pretty sure this is a duplicate of bug 285588
Comment 2 Christophe Marin 2011-12-08 18:08:40 UTC
*** Bug 288492 has been marked as a duplicate of this bug. ***
Comment 3 Christophe Marin 2011-12-08 18:09:24 UTC
from bug 288492 (4.8beta2)

-- Information about the crash:
- What I was doing when the application crashed:

3 messages marked, right-click in message list & select "move to" with another
dimap folder. Crash.
Comment 4 Andreas K. Huettel 2011-12-08 21:54:32 UTC
(In reply to comment #3)
> from bug 288492 (4.8beta2)
> 
> -- Information about the crash:
> - What I was doing when the application crashed:
> 
> 3 messages marked, right-click in message list & select "move to" with another
> dimap folder. Crash.

This seems reproducible as long as the target folder is not yet in the "recently used folders list".

On a related note, I cannot drag any messages from the message list directly into another folder; going via the context menu is the only working option. But this is likely a different bug.
Comment 5 András Manţia 2011-12-10 07:52:57 UTC
The problem is with the recently introduced mRecentCollectionMenu.
This is a mapping between the action type and the RecentCollectionAction. There is an entry added to the map every time the menu is about to show.

1) first problem: even though the map holds a smart pointer, QPointer to the RecentCollectionAction (should be QWeakPointer), when the pointer value is read, it is not checked for null, that's why it crash.

2) the reason I didn't fix it simply by checking the value for null is that I see no place where entries are removed from the map. This looks wrong to me, so I let Laurent go through his code and fix it. :)
Comment 6 Allen Winter 2011-12-10 13:57:41 UTC
Git commit 3bf8231b5c8064b02f7ca87aced1d717aee7e28d by Allen Winter.
Committed on 10/12/2011 at 14:55.
Pushed by winterz into branch 'master'.

in addRecentCollection(), add a crash guard for item's value being 0.
probably fixes the crash reported in 287923

BUG: 287923
FIXED-IN: 4.8.0
MERGE: could be merged to 4.7 is someone wants it

M  +3    -1    akonadi/standardactionmanager.cpp

http://commits.kde.org/kdepimlibs/3bf8231b5c8064b02f7ca87aced1d717aee7e28d
Comment 7 Allen Winter 2011-12-10 14:09:14 UTC
reopening...

the commit I made will fix the crash but doesn't fix the real problem and we really should look at seeing why the map has null values and why the map is not cleaned up.

so for future reference let's keep this one open
Comment 8 Bernd Oliver Sünderhauf 2012-11-28 20:05:24 UTC
How does this one relate to Bug #287923?
I'd say they're duplicates, though obviously two different fixes have been committed. I'd tend to mark the other one a duplicate of this, because only the other one stopped people from reporting.
There's a great number of obviously similar tickets around, I might then collect and close them as duplicates as well. But we should figure out which one we want to take as the root ticket.
Comment 9 Bernd Oliver Sünderhauf 2012-11-28 20:06:21 UTC
Sorry, I meant: How does this one relate to Bug #285588?
Comment 10 Denis Kurz 2016-09-24 20:43:24 UTC
This bug has only been reported for versions older than KDEPIM 4.14 (at most akonadi-1.3). Can anyone tell if this bug still present?

If noone confirms this bug for a recent version of akonadi (part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 11 Denis Kurz 2017-01-07 21:56:08 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.