Bug 278876

Summary: kmail/kontact crash on exit [QAbstractItemView::selectionModel, MailCommon::FolderTreeWidget::selectedCollections, KMMainWidget::updateFolderMenu]
Product: [Applications] kmail2 Reporter: Benjamin M <alvanx>
Component: message listAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: aguinaldo_lorrayne, alan.house, auxsvr, christosf318, clark, crglasoe, dreibh, giwo_internet, ingo, julien.couret, manc0ntr0, olaf.meltzer, paul.j.mitchell, roger.luedecke, Stefan.Borggraefe, teo78, thomas, Uriel.home, wim.delvaux, winter
Priority: NOR    
Version: 4.7   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.0
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi

Description Benjamin M 2011-07-30 18:00:35 UTC
Version:           2.1.1 (using KDE 4.7.0) 
OS:                Linux

My GUI freezes up as soon as I enter a folder. The email list is loaded. However, the pre-selected email never loads, and from this point, the entire kmail GUI is frozen up. I can still minimize and maximize with the tray icon (which is still responsive. I can even start a new, not frozen message from the tray!), and in between crashes, kmail also manages to show me the correct amount of new mail downloaded. Restarting kmail doesn't help. Restarting akonadi doesn't help. However, kmail only crashes when I restart akonadi before loading up kmail again. 

Reproducible: Always

Steps to Reproduce:
See above.

Actual Results:  
Crash, or, if I don't restart akonadi in between, kmail freezes up as soon as I enter the GUI and load a folder (apparently, loading the message within the folder is the problem, which succeeeded only once, but always freezes up kmail). 

Expected Results:  
Normal behavior, no crashes, no freezes! :-)

Backtrace from when kmail crashes, after I restart akonadi: 
Application: KMail (kmail), signal: Segmentation fault
[Current thread is 1 (Thread 0xb1fdc930 (LWP 18478))]

Thread 2 (Thread 0xb06fcb70 (LWP 18485)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb593c105 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb5f09aec in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libc.so.6
#3  0xb3adce17 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /usr/lib/libQtWebKit.so.4
#4  0xb5937b05 in start_thread () from /lib/libpthread.so.0
#5  0xb5efbd5e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb1fdc930 (LWP 18478)):
[KCrash Handler]
#7  0xb677ece4 in operator QItemSelectionModel* (this=0x0) at ../../src/corelib/kernel/qpointer.h:78
#8  QAbstractItemView::selectionModel (this=0x0) at itemviews/qabstractitemview.cpp:760
#9  0xb509df16 in MailCommon::FolderTreeWidget::selectedCollections (this=0x0) at /usr/src/debug/kdepim-4.7.0/mailcommon/foldertreewidget.cpp:209
#10 0xb6f075bc in KMMainWidget::updateFolderMenu (this=0x82c6370) at /usr/src/debug/kdepim-4.7.0/kmail/kmmainwidget.cpp:3822
#11 0xb6f1566e in KMMainWidget::slotEndCheckMail (this=0x82c6370) at /usr/src/debug/kdepim-4.7.0/kmail/kmmainwidget.cpp:417
#12 0xb6f164ad in KMMainWidget::qt_metacall (this=0x82c6370, _c=QMetaObject::InvokeMetaMethod, _id=27, _a=0xbfd25f9c) at /usr/src/debug/kdepim-4.7.0/build/kmail/kmmainwidget.moc:373
#13 0xb6cc407d in QMetaObject::metacall (object=0x82c6370, cl=QMetaObject::InvokeMetaMethod, idx=54, argv=0xbfd25f9c) at kernel/qmetaobject.cpp:237
#14 0xb6cd34cc in QMetaObject::activate (sender=0xbfd27208, m=0xb700b624, local_signal_index=4, argv=0x0) at kernel/qobject.cpp:3278
#15 0xb6eb88f5 in KMKernel::endCheckMail (this=0xbfd27208) at /usr/src/debug/kdepim-4.7.0/build/kmail/kmkernel.moc:241
#16 0xb6ebc228 in KMKernel::slotProgressItemCompletedOrCanceled (this=0xbfd27208, item=0x0) at /usr/src/debug/kdepim-4.7.0/kmail/kmkernel.cpp:1689
#17 0xb6ec8217 in KMKernel::qt_metacall (this=0xbfd27208, _c=QMetaObject::InvokeMetaMethod, _id=36, _a=0xbfd261a8) at /usr/src/debug/kdepim-4.7.0/build/kmail/kmkernel.moc:205
#18 0xb6cc407d in QMetaObject::metacall (object=0xbfd27208, cl=QMetaObject::InvokeMetaMethod, idx=40, argv=0xbfd261a8) at kernel/qmetaobject.cpp:237
#19 0xb6cd34cc in QMetaObject::activate (sender=0x82f1c00, m=0xb4cfad18, local_signal_index=2, argv=0xbfd261a8) at kernel/qobject.cpp:3278
#20 0xb4cc9495 in KPIM::ProgressManager::progressItemCompleted (this=0x82f1c00, _t1=0x83f3b00) at /usr/src/debug/kdepim-4.7.0/build/libkdepim/progressmanager.moc:272
#21 0xb4cc9e10 in KPIM::ProgressManager::slotTransactionCompleted (this=0x82f1c00, item=0x83f3b00) at /usr/src/debug/kdepim-4.7.0/libkdepim/progressmanager.cpp:219
#22 0xb4cca355 in KPIM::ProgressManager::qt_metacall (this=0x82f1c00, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0xbfd262e8) at /usr/src/debug/kdepim-4.7.0/build/libkdepim/progressmanager.moc:246
#23 0xb6cc407d in QMetaObject::metacall (object=0x82f1c00, cl=QMetaObject::InvokeMetaMethod, idx=15, argv=0xbfd262e8) at kernel/qmetaobject.cpp:237
#24 0xb6cd34cc in QMetaObject::activate (sender=0x83f3b00, m=0xb4cfad08, local_signal_index=2, argv=0xbfd262e8) at kernel/qobject.cpp:3278
#25 0xb4cc8ee5 in KPIM::ProgressItem::progressItemCompleted (this=0x83f3b00, _t1=0x83f3b00) at /usr/src/debug/kdepim-4.7.0/build/libkdepim/progressmanager.moc:121
#26 0xb4cc9b3d in KPIM::ProgressItem::setComplete (this=0x83f3b00) at /usr/src/debug/kdepim-4.7.0/libkdepim/progressmanager.cpp:61
#27 0xb4ccb6c2 in KPIM::AgentProgressMonitor::Private::instanceStatusChanged (this=0x8645c98, instance=...) at /usr/src/debug/kdepim-4.7.0/libkdepim/agentprogressmonitor.cpp:87
#28 0xb4ccb85e in KPIM::AgentProgressMonitor::qt_metacall (this=0x8440b38, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0xbfd26468) at /usr/src/debug/kdepim-4.7.0/build/libkdepim/agentprogressmonitor.moc:78
#29 0xb6cc407d in QMetaObject::metacall (object=0x8440b38, cl=QMetaObject::InvokeMetaMethod, idx=6, argv=0xbfd26468) at kernel/qmetaobject.cpp:237
#30 0xb6cd34cc in QMetaObject::activate (sender=0x80f5d80, m=0xb552f8e0, local_signal_index=4, argv=0xbfd26468) at kernel/qobject.cpp:3278
#31 0xb53bb075 in Akonadi::AgentManager::instanceStatusChanged (this=0x80f5d80, _t1=...) at /usr/src/debug/kdepimlibs-4.7.0/build/akonadi/agentmanager.moc:177
#32 0xb53f95fc in Akonadi::AgentManagerPrivate::agentInstanceStatusChanged (this=0x80f69c8, identifier=..., status=0, msg=...) at /usr/src/debug/kdepimlibs-4.7.0/akonadi/agentmanager.cpp:129
#33 0xb53fb9a1 in Akonadi::AgentManager::qt_metacall (this=0x80f5d80, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0xbfd265d0) at /usr/src/debug/kdepimlibs-4.7.0/build/akonadi/agentmanager.moc:131
#34 0xb6cc407d in QMetaObject::metacall (object=0x80f5d80, cl=QMetaObject::InvokeMetaMethod, idx=18, argv=0xbfd265d0) at kernel/qmetaobject.cpp:237
#35 0xb6cd34cc in QMetaObject::activate (sender=0x80f6b68, m=0xb5535744, local_signal_index=7, argv=0xbfd265d0) at kernel/qobject.cpp:3278
#36 0xb54c3015 in OrgFreedesktopAkonadiAgentManagerInterface::agentInstanceStatusChanged (this=0x80f6b68, _t1=..., _t2=0, _t3=...) at /usr/src/debug/kdepimlibs-4.7.0/build/akonadi/agentmanagerinterface.moc:285
#37 0xb54c3671 in OrgFreedesktopAkonadiAgentManagerInterface::qt_metacall (this=0x80f6b68, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfd269cc) at /usr/src/debug/kdepimlibs-4.7.0/build/akonadi/agentmanagerinterface.moc:167
#38 0xb596c080 in QDBusConnectionPrivate::deliverCall (this=0x8085748, object=0x80f6b68, msg=..., metaTypes=..., slotIdx=0) at qdbusintegrator.cpp:941
#39 0xb59775a6 in QDBusCallDeliveryEvent::placeMetaCall (this=0x8552918, object=0x80f6b68) at qdbusintegrator_p.h:103
#40 0xb6cd2dbf in QObject::event (this=0x80f6b68, e=0x8552918) at kernel/qobject.cpp:1217
#41 0xb61e1684 in QApplicationPrivate::notify_helper (this=0x8096880, receiver=0x80f6b68, e=0x8552918) at kernel/qapplication.cpp:4462
#42 0xb61ea427 in QApplication::notify (this=0xbfd2727c, receiver=0x80f6b68, e=0x8552918) at kernel/qapplication.cpp:3862
#43 0xb74f67b1 in KApplication::notify (this=0xbfd2727c, receiver=0x80f6b68, event=0x8552918) at /usr/src/debug/kdelibs-4.7.0/kdeui/kernel/kapplication.cpp:311
#44 0xb6cbd78e in QCoreApplication::notifyInternal (this=0xbfd2727c, receiver=0x80f6b68, event=0x8552918) at kernel/qcoreapplication.cpp:731
#45 0xb6cc151c in sendEvent (receiver=0x0, event_type=0, data=0x8055958) at kernel/qcoreapplication.h:215
#46 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x8055958) at kernel/qcoreapplication.cpp:1372
#47 0xb6cc166c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1265
#48 0xb6cebdf4 in sendPostedEvents (s=0x8098b00) at kernel/qcoreapplication.h:220
#49 postEventSourceDispatch (s=0x8098b00) at kernel/qeventdispatcher_glib.cpp:277
#50 0xb4610509 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#51 0xb4610d10 in ?? () from /lib/libglib-2.0.so.0
#52 0xb4610fce in g_main_context_iteration () from /lib/libglib-2.0.so.0
#53 0xb6cebf7b in QEventDispatcherGlib::processEvents (this=0x80554e8, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#54 0xb62981da in QGuiEventDispatcherGlib::processEvents (this=0x80554e8, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#55 0xb6cbca6d in QEventLoop::processEvents (this=0xbfd27194, flags=...) at kernel/qeventloop.cpp:149
#56 0xb6cbcc99 in QEventLoop::exec (this=0xbfd27194, flags=...) at kernel/qeventloop.cpp:201
#57 0xb6cc1740 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#58 0xb61df3d4 in QApplication::exec () at kernel/qapplication.cpp:3736
#59 0x0804a887 in main (argc=-1241963200, argv=0x8085078) at /usr/src/debug/kdepim-4.7.0/kmail/main.cpp:145
Comment 1 Christophe Marin 2011-08-28 14:51:07 UTC
*** Bug 280562 has been marked as a duplicate of this bug. ***
Comment 2 Christophe Marin 2011-10-12 21:49:47 UTC
*** Bug 283886 has been marked as a duplicate of this bug. ***
Comment 3 Benjamin M 2011-10-13 08:22:40 UTC
This bug could be related to the database backend. One possible workaround to this might be to switch to PostgreSQL - this is what worked for me anyway. Make sure you have the package installed, then follow the steps detailed <a href="http://forum.kde.org/viewtopic.php?f=20&t=96296">here</a>.
Comment 4 Christophe Marin 2011-10-15 10:07:15 UTC
*** Bug 284065 has been marked as a duplicate of this bug. ***
Comment 5 Christophe Marin 2011-10-21 14:30:48 UTC
*** Bug 284159 has been marked as a duplicate of this bug. ***
Comment 6 Robert Clark 2011-10-26 22:20:53 UTC
Created attachment 64916 [details]
New crash information added by DrKonqi

kontact (4.7.2) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.2

- What I was doing when the application crashed:

Crash occurs whenever kmail or kontact exits. As far as I could tell, no automatic mail chckes or filtering operations were in progress at the time. This happens about 90% of the time when I close the application.

-- Backtrace (Reduced):
#6  0x00007fc8f9a1ce34 in QAbstractItemView::selectionModel() const () from /usr/lib64/qt4/libQtGui.so.4
#7  0x00007fc8e1f6a81e in MailCommon::FolderTreeWidget::selectedCollections() const () from /usr/lib64/libmailcommon.so.4
#8  0x00007fc8e231fce4 in KMMainWidget::updateFolderMenu() () from /usr/lib64/libkmailprivate.so.4
#9  0x00007fc8e2329e45 in KMMainWidget::slotEndCheckFetchCollectionsDone(KJob*) () from /usr/lib64/libkmailprivate.so.4
#10 0x00007fc8e232a6f5 in KMMainWidget::slotEndCheckMail() () from /usr/lib64/libkmailprivate.so.4
Comment 7 Christophe Marin 2011-10-29 12:31:14 UTC
*** Bug 285196 has been marked as a duplicate of this bug. ***
Comment 8 Christophe Marin 2011-10-29 14:12:45 UTC
*** Bug 284839 has been marked as a duplicate of this bug. ***
Comment 9 Christophe Marin 2011-11-04 23:35:03 UTC
*** Bug 285500 has been marked as a duplicate of this bug. ***
Comment 10 Christophe Marin 2011-11-10 15:00:22 UTC
*** Bug 285800 has been marked as a duplicate of this bug. ***
Comment 11 Christophe Marin 2011-11-17 15:00:44 UTC
*** Bug 286743 has been marked as a duplicate of this bug. ***
Comment 12 Christophe Marin 2011-11-20 11:14:58 UTC
*** Bug 287050 has been marked as a duplicate of this bug. ***
Comment 13 Christophe Marin 2011-11-21 11:46:07 UTC
*** Bug 287137 has been marked as a duplicate of this bug. ***
Comment 14 Christophe Marin 2011-12-01 13:04:43 UTC
*** Bug 287964 has been marked as a duplicate of this bug. ***
Comment 15 Christophe Marin 2011-12-03 15:55:38 UTC
*** Bug 288141 has been marked as a duplicate of this bug. ***
Comment 16 Christophe Marin 2011-12-03 15:57:54 UTC
from #288141

-- Information about the crash:
- What I was doing when the application crashed:
Shutdown Kontact.
I have Kmail, Akregator, address book and Knode selected in Kontact.

The crash can be reproduced every time.
Comment 17 Christophe Marin 2011-12-05 18:35:33 UTC
*** Bug 288269 has been marked as a duplicate of this bug. ***
Comment 18 Sebastián Ramírez 2011-12-06 23:21:18 UTC
Created attachment 66452 [details]
New crash information added by DrKonqi

kontact (4.7.2) on KDE Platform 4.7.2 (4.7.2) "release 5" using Qt 4.7.4

- What I was doing when the application crashed:

La interfaz gráfica de Kontact falla al cerrar el programa luego de un uso normal.

-- Backtrace (Reduced):
#6  0xb69b8cb4 in operator QItemSelectionModel* (this=) at ../../src/corelib/kernel/qpointer.h:78
#7  QAbstractItemView::selectionModel (this=0x1) at itemviews/qabstractitemview.cpp:760
#8  0xaf44f796 in MailCommon::FolderTreeWidget::selectedCollections (this=0x1) at /usr/src/debug/kdepim-4.7.2/mailcommon/foldertreewidget.cpp:237
#9  0xaf5e784f in KMMainWidget::updateFolderMenu (this=0x84814c0) at /usr/src/debug/kdepim-4.7.2/kmail/kmmainwidget.cpp:3861
#10 0xaf5f67e9 in KMMainWidget::slotEndCheckFetchCollectionsDone (this=0x84814c0, job=0x0) at /usr/src/debug/kdepim-4.7.2/kmail/kmmainwidget.cpp:436
Comment 19 Allen Winter 2011-12-10 21:19:29 UTC
I fixed this one for version 4.7.4

please update to this version when you can.

reopen as needed.
Comment 20 Christophe Marin 2011-12-12 20:50:11 UTC
*** Bug 288832 has been marked as a duplicate of this bug. ***
Comment 21 Christophe Marin 2011-12-25 13:16:59 UTC
*** Bug 289772 has been marked as a duplicate of this bug. ***
Comment 22 Christophe Marin 2011-12-27 12:00:46 UTC
*** Bug 289893 has been marked as a duplicate of this bug. ***
Comment 23 Christophe Marin 2011-12-27 12:01:20 UTC
reopen. bug 289893 happens with 4.7.4
Comment 24 Allen Winter 2011-12-28 20:38:31 UTC
sorry, I had fixed this for 4.8.0 but not for 4.7.4

so you'll need to wait for the 4.8.8 release or ask your distribution to patch the fix for you.
Comment 25 Alan House 2011-12-28 21:57:55 UTC
Hate to ask, but where can I find the updated version and compile myself? I
love this app but it's unusable now.

On Wed, Dec 28, 2011 at 2:38 PM, Allen Winter <winter@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=278876
>
>
> Allen Winter <winter@kde.org> changed:
>
>           What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>             Status|UNCONFIRMED                 |RESOLVED
>   Version Fixed In|4.7.4                       |4.8.0
>         Resolution|                            |FIXED
>
>
>
>
> --- Comment #24 from Allen Winter <winter kde org>  2011-12-28 20:38:31 ---
> sorry, I had fixed this for 4.8.0 but not for 4.7.4
>
> so you'll need to wait for the 4.8.8 release or ask your distribution to
> patch
> the fix for you.
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
Comment 26 Christophe Marin 2012-01-02 19:39:08 UTC
*** Bug 290104 has been marked as a duplicate of this bug. ***
Comment 27 Christophe Marin 2012-01-14 20:56:28 UTC
*** Bug 291533 has been marked as a duplicate of this bug. ***
Comment 28 Christophe Marin 2012-01-16 10:03:14 UTC
*** Bug 291596 has been marked as a duplicate of this bug. ***
Comment 29 Christophe Marin 2012-01-21 11:18:44 UTC
*** Bug 291873 has been marked as a duplicate of this bug. ***
Comment 30 Christophe Marin 2012-01-26 17:45:57 UTC
*** Bug 292362 has been marked as a duplicate of this bug. ***
Comment 31 Christophe Marin 2012-02-04 10:33:35 UTC
*** Bug 293260 has been marked as a duplicate of this bug. ***
Comment 32 Christophe Marin 2012-03-08 21:52:44 UTC
*** Bug 295122 has been marked as a duplicate of this bug. ***
Comment 33 auxsvr 2014-07-13 22:12:22 UTC
Created attachment 87723 [details]
New crash information added by DrKonqi

kontact (4.13.2) on KDE Platform 4.13.2 using Qt 4.8.5

- What I was doing when the application crashed:

Kontact was exiting while the system load was high.

-- Backtrace (Reduced):
#7  data (this=0x5) at ../../src/corelib/tools/qscopedpointer.h:135
[...]
#10 QItemSelectionModel::selectedIndexes (this=0x1) at itemviews/qitemselectionmodel.cpp:1432
#11 0xac676208 in MailCommon::FolderTreeWidget::selectedCollections (this=0x962f2f0) at /usr/src/debug/kdepim-4.13.2/mailcommon/folder/foldertreewidget.cpp:244
#12 0xac7e55d8 in KMMainWidget::updateFolderMenu (this=this@entry=0x963f800) at /usr/src/debug/kdepim-4.13.2/kmail/kmmainwidget.cpp:4112
#13 0xac7e6108 in KMMainWidget::slotUpdateActionsAfterMailChecking (this=this@entry=0x963f800) at /usr/src/debug/kdepim-4.13.2/kmail/kmmainwidget.cpp:439