Bug 226396

Summary: [steps] Kontact crashed on close with search window opened [KMKernel::config, KMail::SearchWindow::~SearchWindow, qDeleteInEventHandler]
Product: [Applications] kontact Reporter: Rolf Eike Beer <kde>
Component: mailAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: crash CC: sreejiththulaseedharan
Priority: NOR    
Version: 4.4 rc1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 4.6
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi

Description Rolf Eike Beer 2010-02-11 21:45:54 UTC
Application: kontact (4.4 rc2)
KDE Platform Version: 4.3.98 (KDE 4.3.98 (KDE 4.4 RC3)) "release 216"
Qt Version: 4.6.1
Operating System: Linux 2.6.31.5-0.1-desktop i686
Distribution: "openSUSE 11.2 (i586)"

-- Information about the crash:
I searched a mail, then switched to akgregator and then closed Kontact. The mail search window was still open.

 -- Backtrace:
Application: Kontact (kontact), signal: Segmentation fault
[KCrash Handler]
#6  0xafc61e68 in operator bool (this=<value optimized out>) at /usr/include/ksharedptr.h:106
#7  KMKernel::config (this=<value optimized out>) at /usr/src/debug/kdepim-4.3.98/kmail/kmkernel.cpp:2316
#8  0xafc99bf4 in KMail::SearchWindow::~SearchWindow (this=0xa7fe470, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at /usr/src/debug/kdepim-4.3.98/kmail/searchwindow.cpp:387
#9  0xb6cae6e3 in qDeleteInEventHandler(QObject*) () from /usr/lib/libQtCore.so.4
#10 0xb6cafe88 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#11 0xb6229400 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#12 0xb61c92ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#13 0xb61d0188 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#14 0xb71bf281 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#15 0xb6c9efbe in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#16 0xb6ca19c3 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#17 0xb6ca1b1c in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/libQtCore.so.4
#18 0xb6ccc04d in ?? () from /usr/lib/libQtCore.so.4
#19 0xb40344c2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0xb4037d98 in ?? () from /usr/lib/libglib-2.0.so.0
#21 0xb4037ebe in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#22 0xb6ccbb31 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#23 0xb62896ca in ?? () from /usr/lib/libQtGui.so.4
#24 0xb6ca1d83 in QCoreApplication::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#25 0xab5507fa in ?? () from /usr/lib/libknodecommon.so.4
#26 0xab5a1374 in KNMainWidget::prepareShutdown() () from /usr/lib/libknodecommon.so.4
#27 0xacfe319b in ?? () from /usr/lib/kde4/knodepart.so
#28 0xb75f8848 in KontactInterface::Plugin::~Plugin() () from /usr/lib/libkontactinterface.so.4
#29 0xb02bcf4c in ?? () from /usr/lib/kde4/kontact_knodeplugin.so
#30 0xb7785ef7 in Kontact::MainWindow::~MainWindow() () from /usr/lib/libkontactprivate.so.4
#31 0xb6cae6e3 in qDeleteInEventHandler(QObject*) () from /usr/lib/libQtCore.so.4
#32 0xb6cafe88 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#33 0xb6229400 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#34 0xb6654964 in QMainWindow::event(QEvent*) () from /usr/lib/libQtGui.so.4
#35 0xb72793b4 in KMainWindow::event(QEvent*) () from /usr/lib/libkdeui.so.5
#36 0xb729bd72 in KXmlGuiWindow::event(QEvent*) () from /usr/lib/libkdeui.so.5
#37 0xb61c92ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#38 0xb61d0188 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#39 0xb71bf281 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#40 0xb6c9efbe in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#41 0xb6ca19c3 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#42 0xb6ca1b1c in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/libQtCore.so.4
#43 0xb6ccc04d in ?? () from /usr/lib/libQtCore.so.4
#44 0xb40344c2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#45 0xb4037d98 in ?? () from /usr/lib/libglib-2.0.so.0
#46 0xb4037ebe in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#47 0xb6ccbb31 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#48 0xb62896ca in ?? () from /usr/lib/libQtGui.so.4
#49 0xb6c9d62d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#50 0xb6c9da79 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#51 0xb6ca1bf0 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#52 0xb61c9354 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#53 0x0804b506 in _start ()

Reported using DrKonqi
Comment 1 Rolf Eike Beer 2010-02-13 10:46:42 UTC
Ok, I've tried again with KDE SC 4.4.0 and it's still there. And it's absolutely trivial to reproduce for me:

-open Kontact
-choose KMail
-open search window in any folder (doesn't matter if local or DIMAP)
-close Kontact
->crash

You don't even need to search or enter any search terms.
Comment 2 Dario Andres 2010-02-18 20:43:53 UTC
*** Bug 227522 has been marked as a duplicate of this bug. ***
Comment 3 Christophe Marin 2010-03-26 13:13:21 UTC
*** Bug 229660 has been marked as a duplicate of this bug. ***
Comment 4 Nicolas L. 2010-04-29 09:00:43 UTC
reproduced here on kde 4.4.2 under mandriva.
Comment 5 Nicolas L. 2010-04-29 09:03:06 UTC
Thread 1 (Thread 0xb317d6d0 (LWP 31705)):
[KCrash Handler]
#6  0xffffe424 in __kernel_vsyscall ()
#7  0xb4a51a81 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#8  0xb4a533d2 in abort () at abort.c:92
#9  0xb4a4ab08 in __assert_fail (assertion=0xafd476b8 "mySelf", file=0xafd4709c "/home/niconico/SVN/4.4/kdepim/kmail/kmkernel.cpp", line=2320, function=
    0xafd489c0 "static KSharedPtr<KSharedConfig> KMKernel::config()") at assert.c:81
#10 0xafacd958 in KMKernel::config () at /home/niconico/SVN/4.4/kdepim/kmail/kmkernel.cpp:2320
#11 0xafafae41 in KMail::SearchWindow::~SearchWindow (this=0xa9ec5c8, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at /home/niconico/SVN/4.4/kdepim/kmail/searchwindow.cpp:386
Comment 6 Filipe 2010-05-10 16:20:35 UTC
(In reply to comment #1)
> Ok, I've tried again with KDE SC 4.4.0 and it's still there. And it's
> absolutely trivial to reproduce for me:
> 
> -open Kontact
> -choose KMail
> -open search window in any folder (doesn't matter if local or DIMAP)
> -close Kontact
> ->crash
> 
> You don't even need to search or enter any search terms.

Same here. I can also add that none IMAP transaction get completed if I search for a message.
Kontact 4.3.5
Kmail 1.12.4
KDE 4.3.5
Kubuntu Packages 9.10
Application: Kontact (kontact), signal: Segmentation fault
[KCrash Handler]
#6  0x02bdffd0 in KSharedPtr<KSharedConfig>::operator bool () at /usr/include/ksharedptr.h:106
#7  KMKernel::config () at ../../kmail/kmkernel.cpp:2284
#8  0x02c1430f in ~SearchWindow (this=0x9f54010, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at ../../kmail/searchwindow.cpp:387
#9  0x00d9c135 in qDeleteInEventHandler (o=0x0) at kernel/qobject.cpp:3815
#10 0x00d9d62b in QObject::event (this=0x9f54010, e=0x9a82e80) at kernel/qobject.cpp:1094
#11 0x01056906 in QWidget::event (this=0x9f54010, event=0x9a82e80) at kernel/qwidget.cpp:7946
#12 0x01001f54 in QApplicationPrivate::notify_helper (this=0x9616910, receiver=0x9f54010, e=0x9a82e80) at kernel/qapplication.cpp:4056
#13 0x010095ca in QApplication::notify (this=0xbffaf074, receiver=0x9f54010, e=0x9a82e80) at kernel/qapplication.cpp:4021
#14 0x0073825a in KApplication::notify (this=0xbffaf074, receiver=0x9f54010, event=0x9a82e80) at ../../kdeui/kernel/kapplication.cpp:302
#15 0x00d8d6cb in QCoreApplication::notifyInternal (this=0xbffaf074, receiver=0x9f54010, event=0x9a82e80) at kernel/qcoreapplication.cpp:610
#16 0x00d8e2b2 in QCoreApplication::sendEvent (receiver=0x0, event_type=0, data=0x95e8820) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:213
#17 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x95e8820) at kernel/qcoreapplication.cpp:1247
#18 0x00d8e47d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1140
#19 0x00db83ff in QCoreApplication::sendPostedEvents (s=0x9611b90) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#20 postEventSourceDispatch (s=0x9611b90) at kernel/qeventdispatcher_glib.cpp:210
#21 0x049b1e88 in g_main_dispatch (context=0x9611b10) at /build/buildd/glib2.0-2.22.3/glib/gmain.c:1960
#22 IA__g_main_context_dispatch (context=0x9611b10) at /build/buildd/glib2.0-2.22.3/glib/gmain.c:2513
#23 0x049b5730 in g_main_context_iterate (context=0x9611b10, block=<value optimized out>, dispatch=1, self=0x96073c0) at /build/buildd/glib2.0-2.22.3/glib/gmain.c:2591
#24 0x049b5863 in IA__g_main_context_iteration (context=0x9611b10, may_block=1) at /build/buildd/glib2.0-2.22.3/glib/gmain.c:2654
#25 0x00db802c in QEventDispatcherGlib::processEvents (this=0x95e89f8, flags=...) at kernel/qeventdispatcher_glib.cpp:327
#26 0x010a2be5 in QGuiEventDispatcherGlib::processEvents (this=0x95e89f8, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#27 0x00d8bc79 in QEventLoop::processEvents (this=0xbffaefd4, flags=) at kernel/qeventloop.cpp:149
#28 0x00d8c0ca in QEventLoop::exec (this=0xbffaefd4, flags=...) at kernel/qeventloop.cpp:201
#29 0x00d8e53f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#30 0x01001dd7 in QApplication::exec () at kernel/qapplication.cpp:3525
#31 0x0804b4e6 in main (argc=1, argv=0xbffaf294) at ../../../kontact/src/main.cpp:218
Comment 7 Antonio 2010-05-19 00:28:27 UTC
Created attachment 43704 [details]
New crash information added by DrKonqi

Kontact crashed after I tryed to close it.
Comment 8 roland 2010-09-15 20:53:57 UTC
Created attachment 51697 [details]
New crash information added by DrKonqi

Closed Kontact after failing to load an entry in Contact list.
Comment 9 Ronny Standtke 2010-10-10 09:47:51 UTC
Created attachment 52383 [details]
New crash information added by DrKonqi

kontact (4.4.6) on KDE Platform 4.5.1 (KDE 4.5.1) using Qt 4.7.0

- What I was doing when the application crashed:

Same situation here, the backtrace just looks a little different.

-- Backtrace (Reduced):
#7  0xb2fbcbb3 in KSharedPtr<KSharedConfig>::operator bool () at /usr/include/ksharedptr.h:106
#8  KMKernel::config () at ../../kmail/kmkernel.cpp:2321
#9  0xb2ff5821 in ~SearchWindow (this=0xa355da0, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>) at ../../kmail/searchwindow.cpp:386
#10 0x03d67dc5 in qDeleteInEventHandler (o=0x0) at kernel/qobject.cpp:3988
#11 0x03d69ae8 in QObject::event (this=0xa355da0, e=0xbfe3b7cc) at kernel/qobject.cpp:1202
Comment 10 Christophe Marin 2011-01-08 12:27:15 UTC
*** Bug 262430 has been marked as a duplicate of this bug. ***
Comment 11 Christophe Marin 2011-01-15 13:28:22 UTC
(In reply to comment #1)
> Ok, I've tried again with KDE SC 4.4.0 and it's still there. And it's
> absolutely trivial to reproduce for me:
> 
> -open Kontact
> -choose KMail
> -open search window in any folder (doesn't matter if local or DIMAP)
> -close Kontact
> ->crash
> 
> You don't even need to search or enter any search terms.

I can't reproduce the crash with these steps in KDEPIM master.
Even changing the active plugin before quitting Kontact had no effect.
Comment 12 roland 2011-01-15 16:56:18 UTC
I will wager that you are testing with an empty or near empty mail
system and the bug reporter has thousands of mail messages which have
been migrated forward from version to version plus new stuff.

Because KDEPim doesn't have a complete backup/restore built into it like
Evolution, it becomes worthless to people who actually USE their desktop
for something other than distro hopping or distro development.  I,
myself, am running Evolution on KDE because migration is impossible with
KDEPIM.  It perpetually loses chunks of address information and the
developers thing everyone should know which super secret file to copy
where.  That Akondi (or whatever) was a God-foresaken mis-step.
Comment 13 Christophe Marin 2011-01-15 17:05:22 UTC
(In reply to comment #12)
> I will wager that you are testing with an empty or near empty mail
> system and the bug reporter has thousands of mail messages which have
> been migrated forward from version to version plus new stuff.
> 

Depends what you call empty. The KMail version I'm currently running has 4 email accounts configured and a bit more than 40000 messages stored.
Comment 14 roland 2011-01-15 21:01:41 UTC
I have only one email account, but I have folders with more than 4000
messages.  My email has migrated forward through many different versions
of both Ubuntu and OpenSuSE and I have quite a few messages from pre-Y2K
because they are still historically relevant.

I gave up on KDEPim and will soon be forced to give up on KDE because of
the way Evolution works on it, all because there isn't a clean
backup/restore for the entire PIM like there is with Evolution.

I'm willing to bet the bulk of this user's problem stems from the
completely undocumented half-arsed methods of migrating email forward
via KDEPIM.  That "copy your home directory, then restore after install"
trashes sooooooooooooooooooooooooo many things.  Because you don't have
a guaranteed-to-work-backup-and-restore-migration-utility built into the
product, the odds of getting them to wipe and clean install are null.
The "clean install" will most likely involve copying some files around
to save things, which is where the problem was created in the first
place.
Comment 15 Tim McKenzie 2011-01-16 02:21:45 UTC
Created attachment 56067 [details]
New crash information added by DrKonqi

kontact (4.4.8) on KDE Platform 4.5.4 (KDE 4.5.4) using Qt 4.6.3

- What I was doing when the application crashed:

I followed the steps in comment 1, in a folder belonging to a (gmail) IMAP account.  Regarding comment 11, did you have any IMAP accounts?

-- Backtrace (Reduced):
#6  0x0000003339a98787 in operator bool () at /usr/include/kde4/ksharedptr.h:106
#7  KMKernel::config () at /usr/src/debug/kdepim-4.4.8/kmail/kmkernel.cpp:2320
#8  0x0000003339ac7070 in KMail::SearchWindow::~SearchWindow (this=0x2da1990, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>)
    at /usr/src/debug/kdepim-4.4.8/kmail/searchwindow.cpp:386
#9  0x0000003339ac7409 in KMail::SearchWindow::~SearchWindow (this=0x2da1990, __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>)
    at /usr/src/debug/kdepim-4.4.8/kmail/searchwindow.cpp:395
#10 0x000000331fb62f55 in QObject::event (this=0x2da1990, e=0x31d2770) at kernel/qobject.cpp:1231
Comment 16 Christophe Marin 2011-01-16 02:31:27 UTC
(In reply to comment #15)
> kontact (4.4.8) on KDE Platform 4.5.4 (KDE 4.5.4) using Qt 4.6.3
> 

It would be interesting to know if someone can reproduce the crash with a recent kdepim 4.6 beta version.
Comment 17 Rolf Eike Beer 2011-01-16 15:06:55 UTC
Works for me with KDEpim 4.6 beta
Comment 18 Christophe Marin 2011-04-06 15:37:30 UTC
*** Bug 269845 has been marked as a duplicate of this bug. ***
Comment 19 Christophe Marin 2011-04-13 10:49:30 UTC
*** Bug 270774 has been marked as a duplicate of this bug. ***
Comment 20 Christophe Marin 2011-09-24 16:24:57 UTC
Closing then. Thanks for the feedback.
Comment 21 Christophe Marin 2011-09-29 15:46:20 UTC
*** Bug 282871 has been marked as a duplicate of this bug. ***
Comment 22 Christophe Marin 2011-09-29 15:47:11 UTC
Clearing the CC list. The issue is fixed in kdepim > 4.6