Bug 185544 (kontact_starts_twice)

Summary: Kontact is sometimes started twice and crashes when closing the 2nd instance
Product: [Applications] kontact Reporter: cmf <cfreier>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: albl500, chris-walter, Ekkehard.Blanz, g+kde, jamundso, spuroolou, swisskomputer
Priority: HI    
Version: 4.3   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: kdepim 4.6
Sentry Crash Report:
Attachments: New crash information added by DrKonqi
New crash information added by DrKonqi
output of akonadictl start
New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi
Test kontact config file.
2 crashs in 15 days with the fixed settings done
New crash information added by DrKonqi
New crash information added by DrKonqi
Screenshot showing bug with KDE 4.6
New crash information added by DrKonqi
New crash information added by DrKonqi
New crash information added by DrKonqi

Description cmf 2009-02-25 17:41:48 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    Unlisted Binary Package

After system startup kontact opens in two instances on 2 different workspaces of the desktop. One is called "kontact", the other "kontact <2>". Closing the latter one results in a SIGSEGV crash and all kontacts closed.

my system: arch linux on x86_64

Details:

Anwendung: Kontact (kontact), Signal SIGSEGV
0x00007f30511a2001 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 3138)]

Thread 3 (Thread 0x7f303a480950 (LWP 3168)):
#0  0x00007f3052b4dfed in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3052dbbae7 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#2  0x00007f3052db31f9 in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007f3052dbad79 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007f3052b49fc7 in start_thread () from /lib/libpthread.so.0
#5  0x00007f30511d25dd in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f3039a55950 (LWP 3169)):
#0  0x00007f3052b4dfed in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f3052dbbae7 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#2  0x00007f3052db31f9 in ?? () from /usr/lib/libQtCore.so.4
#3  0x00007f3052dbad79 in ?? () from /usr/lib/libQtCore.so.4
#4  0x00007f3052b49fc7 in start_thread () from /lib/libpthread.so.0
#5  0x00007f30511d25dd in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f3057366750 (LWP 3138)):
[KCrash Handler]
#5  0x00007f303ffc4b39 in KMMainWidget::initializeFilterActions () from /usr/lib/libkmailprivate.so.4
#6  0x00007f304059e182 in KMailPart::guiActivateEvent () from /usr/lib/kde4/kmailpart.so
#7  0x00007f3052e9a03d in QObject::event () from /usr/lib/libQtCore.so.4
#8  0x00007f3051d934ed in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#9  0x00007f3051d9987a in QApplication::notify () from /usr/lib/libQtGui.so.4
#10 0x00007f3053c6f46b in KApplication::notify () from /usr/lib/libkdeui.so.5
#11 0x00007f3052e8c401 in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#12 0x00007f305451d7a7 in KParts::MainWindow::createGUI () from /usr/lib/libkparts.so.4
#13 0x00007f3056480b96 in Kontact::MainWindow::~MainWindow () from /usr/lib/libkontactprivate.so.4
#14 0x0000000000404806 in _start ()
Comment 1 Dario Andres 2009-02-26 11:28:33 UTC
If you can reproduce the crash at will, may you read http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_useful_crash_reports and post a complete backtrace here?
If you are using KDEMOD you will need to install the "-debug" packages for Kontact and KMail.
Thanks :)
Comment 2 cmf 2009-02-26 15:44:45 UTC
The bug occurs everytime after logging out of KDE without closing Kontact. After the next login, a message window appears: "kontact is already running in another window. start anyway?" After clicking on "no", kontact is not opened at all. After clicking on "yes" two kontact windows appear. Closing either of them leads to the described crash.

Regarding the backtrace: I'm not using the KDEmod packages right now and can not easily provide a more detailed backtrace at the moment. If I find time enough I can switch to these other packages, but maybe somebody else can reproduce this bug and provide the backtrace?
Cheers
Comment 3 Christophe Marin 2009-04-24 10:56:40 UTC
Changing this bug status until we get an useful backtrace for this crash.
Comment 4 Dario Andres 2009-05-17 23:06:35 UTC
*** Bug 186898 has been marked as a duplicate of this bug. ***
Comment 5 Dario Andres 2009-05-17 23:07:15 UTC
Bug 178875 may have a good backtrace.. However the reporter stated the bug is fixed.
Thanks
Comment 6 Santiago J. Flores 2009-05-19 18:56:32 UTC
I will try to reproduce it and to send a backtrace
Comment 7 Santiago J. Flores 2009-05-19 19:08:12 UTC
Ok, this is the backtrace I've got, but I'm afraid it doesn't contribute more information:

Aplicación: Kontact (kontact), señal SIGABRT
[Current thread is 0 (LWP 19294)]

Thread 3 (Thread 0xacd58b90 (LWP 19346)):
#0  0xb7f97430 in __kernel_vsyscall ()
#1  0xb50ef412 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb5909344 in pthread_cond_timedwait () from /lib/tls/i686/cmov/libc.so.6
#3  0xb5af598c in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#4  0xb5aeae76 in ?? () from /usr/lib/libQtCore.so.4
#5  0xb5af496e in ?? () from /usr/lib/libQtCore.so.4
#6  0xb50eb4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7  0xb58fa49e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread 0xac52bb90 (LWP 19348)):
#0  0xb7f97430 in __kernel_vsyscall ()
#1  0xb50ef412 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb5909344 in pthread_cond_timedwait () from /lib/tls/i686/cmov/libc.so.6
#3  0xb5af598c in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
#4  0xb5aeae76 in ?? () from /usr/lib/libQtCore.so.4
#5  0xb5af496e in ?? () from /usr/lib/libQtCore.so.4
#6  0xb50eb4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7  0xb58fa49e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb4805700 (LWP 19294)):
[KCrash Handler]
#6  0xb7f97430 in __kernel_vsyscall ()
#7  0xb58416d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb5843098 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb583a5ce in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#10 0xb0f6513c in KMKernel::self () from /usr/lib/libkmailprivate.so.4
#11 0xb103d38c in kmcrashHandler () from /usr/lib/libkmailprivate.so.4
#12 0xb6d4e17a in KCrash::defaultCrashHandler () from /usr/lib/libkdeui.so.5
#13 <signal handler called>
#14 0xb7f97430 in __kernel_vsyscall ()
#15 0xb58416d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#16 0xb5843098 in abort () from /lib/tls/i686/cmov/libc.so.6
#17 0xb583a5ce in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#18 0xb0f6513c in KMKernel::self () from /usr/lib/libkmailprivate.so.4
#19 0xb104fdf7 in KMMainWidget::initializeFilterActions () from /usr/lib/libkmailprivate.so.4
#20 0xb14c39d6 in ?? () from /usr/lib/kde4/kmailpart.so
#21 0xb7112dc4 in KParts::Part::customEvent () from /usr/lib/libkparts.so.4
#22 0xb5bf93ff in QObject::event () from /usr/lib/libQtCore.so.4
#23 0xb60b9e9c in QApplicationPrivate::notify_helper () from /usr/lib/libQtGui.so.4
#24 0xb60c219e in QApplication::notify () from /usr/lib/libQtGui.so.4
#25 0xb6cdd94d in KApplication::notify () from /usr/lib/libkdeui.so.5
#26 0xb5be8a3b in QCoreApplication::notifyInternal () from /usr/lib/libQtCore.so.4
#27 0xb711eaba in KParts::MainWindow::createGUI () from /usr/lib/libkparts.so.4
#28 0xb78537d5 in Kontact::MainWindow::~MainWindow () from /usr/lib/libkontactprivate.so.4
#29 0x0804c0ae in _start ()
Comment 8 Dario Andres 2009-05-19 19:09:34 UTC
@Santiago: tell us your KDE4 version and Linux distribution. If you install the debug packages for kdepim/kmail you will get a better backtrace. Thanks
Comment 9 Santiago J. Flores 2009-05-19 19:43:47 UTC
Kubuntu 9.04
KDE: 4.2.2
Kontact: 1.4.2
Kmail: 1.11.2

New trace after installing kdepim-dbg and kdepimlibs-dbg (I haven't found any kmail-dbg, kontact-dbg or similar):

Aplicación: Kontact (kontact), señal SIGABRT
[Current thread is 0 (LWP 4447)]

Thread 2 (Thread 0xacdfab90 (LWP 4495)):
#0  0xb8039430 in __kernel_vsyscall ()
#1  0xb5191412 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/tls/i686/cmov/libpthread.so.0
#2  0xb59ab344 in pthread_cond_timedwait () from /lib/tls/i686/cmov/libc.so.6
#3  0xb5b9798c in QWaitCondition::wait (this=0xb23fd10, mutex=0xb23fd0c, time=30000) at thread/qwaitcondition_unix.cpp:85
#4  0xb5b8ce76 in QThreadPoolThread::run (this=0xb23fe58) at concurrent/qthreadpool.cpp:140
#5  0xb5b9696e in QThreadPrivate::start (arg=0xb23fe58) at thread/qthread_unix.cpp:189
#6  0xb518d4ff in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#7  0xb599c49e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread 0xb48a7700 (LWP 4447)):
[KCrash Handler]
#6  0xb8039430 in __kernel_vsyscall ()
#7  0xb58e36d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb58e5098 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb58dc5ce in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#10 0xb100713c in KMKernel::self () at /build/buildd/kdepim-4.2.2/kmail/kmkernel.cpp:2118
#11 0xb10df38c in kmcrashHandler (sigId=6) at /build/buildd/kdepim-4.2.2/kmail/kmstartup.cpp:69
#12 0xb6df017a in KCrash::defaultCrashHandler (sig=6) at /build/buildd/kde4libs-4.2.2/kdeui/util/kcrash.cpp:224
#13 <signal handler called>
#14 0xb8039430 in __kernel_vsyscall ()
#15 0xb58e36d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#16 0xb58e5098 in abort () from /lib/tls/i686/cmov/libc.so.6
#17 0xb58dc5ce in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#18 0xb100713c in KMKernel::self () at /build/buildd/kdepim-4.2.2/kmail/kmkernel.cpp:2118
#19 0xb10f1df7 in KMMainWidget::initializeFilterActions (this=0xaeb8fc8) at /build/buildd/kdepim-4.2.2/kmail/kmmainwidget.cpp:4761
#20 0xb15659d6 in KMailPart::guiActivateEvent (this=0xa2c60e0, e=0xbfb55208) at /build/buildd/kdepim-4.2.2/kmail/kmail_part.cpp:181
#21 0xb71b4dc4 in KParts::Part::customEvent (this=0xa2c60e0, ev=0xbfb55208) at /build/buildd/kde4libs-4.2.2/kparts/part.cpp:321
#22 0xb5c9b3ff in QObject::event (this=0xa2c60e0, e=0xbfb55208) at kernel/qobject.cpp:1149
#23 0xb615be9c in QApplicationPrivate::notify_helper (this=0x9f47570, receiver=0xa2c60e0, e=0xbfb55208) at kernel/qapplication.cpp:4084
#24 0xb616419e in QApplication::notify (this=0xbfb552d8, receiver=0xa2c60e0, e=0xbfb55208) at kernel/qapplication.cpp:3631
#25 0xb6d7f94d in KApplication::notify (this=0xbfb552d8, receiver=0xa2c60e0, event=0xbfb55208) at /build/buildd/kde4libs-4.2.2/kdeui/kernel/kapplication.cpp:307
#26 0xb5c8aa3b in QCoreApplication::notifyInternal (this=0xbfb552d8, receiver=0xa2c60e0, event=0xbfb55208) at kernel/qcoreapplication.cpp:602
#27 0xb71c0aba in KParts::MainWindow::createGUI (this=0x9f38ee8, part=0x0) at /usr/include/qt4/QtCore/qcoreapplication.h:213
#28 0xb78f57d5 in ~MainWindow (this=0x9f38ee8) at /build/buildd/kdepim-4.2.2/kontact/src/mainwindow.cpp:256
#29 0x0804c0ae in main (argc=3, argv=0xbfb555d4) at /usr/include/qt4/QtCore/qalgorithms.h:350
Comment 10 Robet Piasek 2009-06-11 22:22:57 UTC
I managed to reproduce the problem on 4.2.90.

Compiled with no debugging support (-fomit-frame-pointers and stripped), so no useful backtrace.

Thanks,
Rob
Comment 11 Christophe Marin 2009-06-11 22:48:17 UTC

*** This bug has been marked as a duplicate of bug 180669 ***
Comment 12 Robet Piasek 2009-06-12 08:47:06 UTC
You sure it's a duplicate? From what I can see, there are two completely different bugs.
Comment 13 Dario Andres 2009-06-19 17:56:30 UTC
Bug 197140 also looks related to the original reported issue here (but in 4.2.90). Thanks
Comment 14 Christophe Marin 2009-06-20 21:13:56 UTC
ok let's reopen for now. The real issue so far are the two kontact instances.
Comment 15 Christophe Marin 2009-06-20 21:14:08 UTC
*** Bug 197140 has been marked as a duplicate of this bug. ***
Comment 16 goretux 2009-07-04 01:36:02 UTC
Hello,
I 've got exactly the same problem here with kde 4.3 rc1 from Kubuntu Backports PPA.

Thanks,
Eric

Two instance off Kontact(In reply to comment #2)
> The bug occurs everytime after logging out of KDE without closing Kontact.
> After the next login, a message window appears: "kontact is already running in
> another window. start anyway?" After clicking on "no", kontact is not opened at
> all. After clicking on "yes" two kontact windows appear. Closing either of them
> leads to the described crash.
> 
> Regarding the backtrace: I'm not using the KDEmod packages right now and can
> not easily provide a more detailed backtrace at the moment. If I find time
> enough I can switch to these other packages, but maybe somebody else can
> reproduce this bug and provide the backtrace?
> Cheers
Comment 17 Christophe Marin 2009-07-11 15:27:20 UTC
*** Bug 198791 has been marked as a duplicate of this bug. ***
Comment 18 Christophe Marin 2009-07-11 15:38:26 UTC

*** This bug has been marked as a duplicate of bug 143187 ***
Comment 19 Christophe Marin 2009-07-23 10:19:40 UTC
*** Bug 201193 has been marked as a duplicate of this bug. ***
Comment 20 Dario Andres 2009-08-09 23:41:35 UTC
*** Bug 203192 has been marked as a duplicate of this bug. ***
Comment 21 Dario Andres 2009-08-13 01:21:36 UTC
*** Bug 203646 has been marked as a duplicate of this bug. ***
Comment 22 Dario Andres 2009-10-21 17:14:22 UTC
*** Bug 211338 has been marked as a duplicate of this bug. ***
Comment 23 Christophe Marin 2009-10-29 13:58:45 UTC
*** Bug 212276 has been marked as a duplicate of this bug. ***
Comment 24 Christophe Marin 2009-11-05 11:42:57 UTC
*** Bug 213217 has been marked as a duplicate of this bug. ***
Comment 25 k17031965 2009-11-05 17:08:11 UTC
Hello,
I 've got exactly the same problem here with kde 4.3.1 from Gentoo 64bit.
Kontact starts alone after login, but Kontact it is not in Flodder Autostart an last time i closed Kontact bevor shutdown.
Comment 26 Christophe Marin 2009-11-05 18:01:41 UTC
*** Bug 213279 has been marked as a duplicate of this bug. ***
Comment 27 Dario Andres 2009-11-10 22:45:06 UTC
*** Bug 214034 has been marked as a duplicate of this bug. ***
Comment 28 Dario Andres 2009-11-11 21:46:01 UTC
*** Bug 214170 has been marked as a duplicate of this bug. ***
Comment 29 Christophe Marin 2009-11-15 03:43:30 UTC
*** Bug 211733 has been marked as a duplicate of this bug. ***
Comment 30 Christophe Marin 2009-11-19 22:25:25 UTC
*** Bug 215304 has been marked as a duplicate of this bug. ***
Comment 31 Dario Andres 2009-12-06 20:46:45 UTC
*** Bug 217028 has been marked as a duplicate of this bug. ***
Comment 32 Dario Andres 2009-12-10 22:38:00 UTC
*** Bug 218151 has been marked as a duplicate of this bug. ***
Comment 33 Dario Andres 2010-01-06 20:10:25 UTC
*** Bug 221546 has been marked as a duplicate of this bug. ***
Comment 34 René Krell 2010-01-07 10:12:21 UTC
Problem confirmed for KDE 4.3.85, kmail 1.13.0.
Comment 35 Dario Andres 2010-01-15 00:27:12 UTC
*** Bug 222763 has been marked as a duplicate of this bug. ***
Comment 36 Dario Andres 2010-01-19 13:15:03 UTC
*** Bug 223394 has been marked as a duplicate of this bug. ***
Comment 37 Santiago J. Flores 2010-01-19 19:28:33 UTC
Maybe this bug is related to this other: https://bugs.kde.org/show_bug.cgi?id=143187
Comment 38 Dario Andres 2010-01-19 19:33:47 UTC
*** Bug 143187 has been marked as a duplicate of this bug. ***
Comment 39 Robet Piasek 2010-01-23 10:24:55 UTC
4.4 RC2 sill present.

PS why status was changed to:
"Status:  	UNCONFIRMED"

??
Comment 40 Sergio Cambra 2010-01-23 11:34:24 UTC
I get two instances of kontact if I wait to enter kwallet password, then I get the message "kontact is already running in another window. start anyway?". Clicking yes open two instances, and closing a instance crash the other one. Here is the backtrace:

[KCrash Handler]
#5  QListData::begin (this=0x31d9ff0) at /usr/include/qt4/QtCore/qlist.h:90
#6  QList<KMFilter*>::begin (this=0x31d9ff0) at /usr/include/qt4/QtCore/qlist.h:238
#7  KMMainWidget::initializeFilterActions (this=0x31d9ff0) at ../../kmail/kmmainwidget.cpp:4783
#8  0x00007f1badda8c16 in KMailPart::guiActivateEvent (this=0x303db50, e=0x7fff7fd87cf0) at ../../kmail/kmail_part.cpp:183
#9  0x00007f1bc2b35155 in QObject::event (this=0x303db50, e=0x7fff7fd87cf0) at kernel/qobject.cpp:1142
#10 0x00007f1bc3449efc in QApplicationPrivate::notify_helper (this=0x22d7630, receiver=0x303db50, e=0x7fff7fd87cf0) at kernel/qapplication.cpp:4056
#11 0x00007f1bc34511ce in QApplication::notify (this=0x7fff7fd8b1e0, receiver=0x303db50, e=0x7fff7fd87cf0) at kernel/qapplication.cpp:4021
#12 0x00007f1bc4080e56 in KApplication::notify (this=0x7fff7fd8b1e0, receiver=0x303db50, event=0x7fff7fd87cf0) at ../../kdeui/kernel/kapplication.cpp:302
#13 0x00007f1bc2b25c2c in QCoreApplication::notifyInternal (this=0x7fff7fd8b1e0, receiver=0x303db50, event=0x7fff7fd87cf0) at kernel/qcoreapplication.cpp:610
#14 0x00007f1bc214377a in QCoreApplication::sendEvent (this=0x28dd170, part=0x303db50) at /usr/include/qt4/QtCore/qcoreapplication.h:213
#15 KParts::MainWindow::createGUI (this=0x28dd170, part=0x303db50) at ../../kparts/mainwindow.cpp:127
#16 0x00007f1bc49f38ed in Kontact::MainWindow::selectPlugin (this=0x28dd170, plugin=0x30142c0) at ../../../kontact/src/mainwindow.cpp:824
#17 0x00007f1bc49f80a2 in Kontact::MainWindow::qt_metacall (this=0x28dd170, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff7fd882b0) at ./mainwindow.moc:107
#18 0x00007f1bc2b3addc in QMetaObject::activate (sender=0x2fa2e40, from_signal_index=<value optimized out>, to_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3113
#19 0x00007f1bc49f923f in Kontact::SidePaneBase::pluginSelected (this=0x7fff7fd87470, _t1=0x30142c0) at ./sidepanebase.moc:84
#20 0x00007f1bc49f9290 in Kontact::SidePaneBase::qt_metacall (this=0x2fa2e40, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff7fd88420) at ./sidepanebase.moc:71
#21 0x00007f1bc49f9488 in Kontact::IconSidePane::qt_metacall (this=0x7fff7fd87470, _c=53462720, _id=36335873, _a=0x1) at ./iconsidepane.moc:133
#22 0x00007f1bc2b3addc in QMetaObject::activate (sender=0x2f39720, from_signal_index=<value optimized out>, to_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3113
#23 0x00007f1bc49f952f in Kontact::Navigator::pluginActivated (this=0x7fff7fd87470, _t1=0x30142c0) at ./iconsidepane.moc:90
#24 0x00007f1bc49f95c0 in Kontact::Navigator::slotCurrentChanged (this=0x2f39720, current=...) at ../../../kontact/src/iconsidepane.cpp:436
#25 0x00007f1bc49f9cf1 in Kontact::Navigator::qt_metacall (this=0x2f39720, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff7fd885a0) at ./iconsidepane.moc:76
#26 0x00007f1bc2b3addc in QMetaObject::activate (sender=0x2587e00, from_signal_index=<value optimized out>, to_signal_index=<value optimized out>, argv=0x1) at kernel/qobject.cpp:3113
#27 0x00007f1bc396d3ba in QItemSelectionModel::currentChanged (this=0x7fff7fd87470, _t1=<value optimized out>, _t2=<value optimized out>) at .moc/release-shared/moc_qitemselectionmodel.cpp:153
#28 0x00007f1bc396d502 in QItemSelectionModel::setCurrentIndex (this=0x2587e00, index=..., command=<value optimized out>) at itemviews/qitemselectionmodel.cpp:1123
#29 0x00007f1bc3922254 in QAbstractItemView::mousePressEvent (this=0x2f39720, event=<value optimized out>) at itemviews/qabstractitemview.cpp:1514
#30 0x00007f1bc34989a6 in QWidget::event (this=0x2f39720, event=0x7fff7fd892c0) at kernel/qwidget.cpp:7545
#31 0x00007f1bc37f42a6 in QFrame::event (this=0x2f39720, e=0x7fff7fd892c0) at widgets/qframe.cpp:559
#32 0x00007f1bc392721b in QAbstractItemView::viewportEvent (this=0x2f39720, event=0x7fff7fd892c0) at itemviews/qabstractitemview.cpp:1476
#33 0x00007f1bc2b24f47 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x2f2be30, event=0x7fff7fd892c0) at kernel/qcoreapplication.cpp:726
#34 0x00007f1bc3449ecc in QApplicationPrivate::notify_helper (this=0x22d7630, receiver=0x2f2be30, e=0x7fff7fd892c0) at kernel/qapplication.cpp:4052
#35 0x00007f1bc3451011 in QApplication::notify (this=<value optimized out>, receiver=0x2f2be30, e=0x7fff7fd892c0) at kernel/qapplication.cpp:3758
#36 0x00007f1bc4080e56 in KApplication::notify (this=0x7fff7fd8b1e0, receiver=0x2f2be30, event=0x7fff7fd892c0) at ../../kdeui/kernel/kapplication.cpp:302
#37 0x00007f1bc2b25c2c in QCoreApplication::notifyInternal (this=0x7fff7fd8b1e0, receiver=0x2f2be30, event=0x7fff7fd892c0) at kernel/qcoreapplication.cpp:610
#38 0x00007f1bc34508e0 in QCoreApplication::sendSpontaneousEvent (receiver=0x2f2be30, event=0x7fff7fd892c0, alienWidget=0x2f2be30, nativeWidget=0x28dd170, buttonDown=<value optimized out>, 
    lastMouseReceiver=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:216
#39 QApplicationPrivate::sendMouseEvent (receiver=0x2f2be30, event=0x7fff7fd892c0, alienWidget=0x2f2be30, nativeWidget=0x28dd170, buttonDown=<value optimized out>, 
    lastMouseReceiver=<value optimized out>) at kernel/qapplication.cpp:2924
#40 0x00007f1bc34b6a0e in QETWidget::translateMouseEvent (this=0x28dd170, event=<value optimized out>) at kernel/qapplication_x11.cpp:4409
#41 0x00007f1bc34b5aa9 in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fff7fd8adf0) at kernel/qapplication_x11.cpp:3550
#42 0x00007f1bc34ded0c in x11EventSourceDispatch (s=<value optimized out>, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#43 0x00007f1bbc39fbce in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#44 0x00007f1bbc3a3598 in ?? () from /lib/libglib-2.0.so.0
#45 0x00007f1bbc3a36c0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#46 0x00007f1bc2b4e1a6 in QEventDispatcherGlib::processEvents (this=0x22a6cb0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:327
#47 0x00007f1bc34de4be in QGuiEventDispatcherGlib::processEvents (this=0x7fff7fd87470, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#48 0x00007f1bc2b24532 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#49 0x00007f1bc2b24904 in QEventLoop::exec (this=0x7fff7fd8b120, flags=) at kernel/qeventloop.cpp:201
#50 0x00007f1bc2b26ab9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#51 0x0000000000403f47 in main (argc=<value optimized out>, argv=<value optimized out>) at ../../../kontact/src/main.cpp:218
Comment 41 Christophe Marin 2010-01-23 15:12:55 UTC
Changing the title. The crash is not the issue in this bug. Kontact must not start twice.
Comment 42 Sergio Cambra 2010-01-23 15:59:41 UTC
I suppose the backtrace is not useful, how can I help to fix it? Can I get some debug info which is useful for you?
Comment 43 Dario Andres 2010-01-27 13:41:47 UTC
@Sergio: the backtraces are ok, but they are irrelevant in this case as the root cause is another (non-crash) bug. Regards
Comment 44 Dario Andres 2010-01-28 22:57:56 UTC
*** Bug 224534 has been marked as a duplicate of this bug. ***
Comment 45 Kévin FERRARE 2010-02-17 05:01:45 UTC
I am getting the same problem with kde 4.4.0 too (I always had this bug since I started to use kontact in kde 4).
Comment 46 Marc González Majoral 2010-02-24 10:58:11 UTC
Bug confirmed here too. Been happening to me since i upgraded Kubuntu to use KDE4. Really annoying, been there for more than a year now.
Comment 47 Sandro Bonazzola 2010-03-17 08:00:28 UTC
Created attachment 41706 [details]
New crash information added by DrKonqi

Same error here with Fedora kdepim-4.4.1-2.fc12.i686
Comment 48 Dario Andres 2010-03-20 15:48:51 UTC
*** Bug 231395 has been marked as a duplicate of this bug. ***
Comment 49 Christophe Marin 2010-03-26 22:50:25 UTC
*** Bug 223827 has been marked as a duplicate of this bug. ***
Comment 50 Christophe Marin 2010-03-27 09:57:45 UTC
*** Bug 228135 has been marked as a duplicate of this bug. ***
Comment 51 Christophe Marin 2010-03-27 21:30:27 UTC
*** Bug 226444 has been marked as a duplicate of this bug. ***
Comment 52 Christophe Marin 2010-03-27 21:57:51 UTC
*** Bug 226050 has been marked as a duplicate of this bug. ***
Comment 53 Christophe Marin 2010-03-27 22:04:38 UTC
*** Bug 225999 has been marked as a duplicate of this bug. ***
Comment 54 Christophe Marin 2010-03-27 22:11:18 UTC
*** Bug 225913 has been marked as a duplicate of this bug. ***
Comment 55 Roman Zimmermann 2010-03-27 22:55:54 UTC
I haven't seen this since I upgraded to 4.4.1 (previously <=4.3) - so for met it seems to be fixed.
Comment 56 Christophe Marin 2010-03-28 15:50:09 UTC
*** Bug 203917 has been marked as a duplicate of this bug. ***
Comment 57 Christophe Marin 2010-03-28 15:52:10 UTC
*** Bug 203751 has been marked as a duplicate of this bug. ***
Comment 58 Christophe Marin 2010-03-28 20:27:31 UTC
*** Bug 196163 has been marked as a duplicate of this bug. ***
Comment 59 Christophe Marin 2010-04-08 08:45:31 UTC
*** Bug 233320 has been marked as a duplicate of this bug. ***
Comment 60 selth.blackwings 2010-04-20 09:24:05 UTC
Created attachment 42914 [details]
New crash information added by DrKonqi

This happens at every boot, konversation seems to be started twice and the second instance being exited causes the first one to crash. using fedora 12, latest stable packages
Comment 61 Eggert Ehmke 2010-05-01 10:49:43 UTC
I can confirm this bug for Gentoo AMD64 KDE 4.3.5. I can provide a backtrace if needed.
Comment 62 Freek de Kruijf 2010-05-01 12:16:03 UTC
I have not seen this issue in the latest stable KDE 4.4 (4.4.2)
Comment 63 Nicolas L. 2010-06-04 17:03:47 UTC
from comments #55 and #62  i close this bugreport


Please reopen if you still experience it
Comment 64 goretux 2010-06-04 19:58:09 UTC
I would want that bug to be reopen. I try on two different PC KDE 4.4.4 (via the ppa) with Kubuntu 10.04, and the bug is still there.
It was the same with KDE 4.4.3.

IIRC, with KDE first 4.4.x release (just after 4.3.5), the bug vanished.
(However, I really can't ascertain this fact.)
But the bug reappeared some releases later.
Comment 65 goretux 2010-06-05 14:08:10 UTC
It seems strange as only my laptop has the problem now.
My desktop I just rebooted didn't reveal the bug.
(both have the same config, except the kernel of my laptop, but it really seems unrelated)
Comment 66 Nicolas L. 2010-06-05 15:49:43 UTC
please give the output of akonadictl start ( with akonadictl stop before if akonadi is already running )
Comment 67 goretux 2010-06-05 16:50:48 UTC
Created attachment 47705 [details]
output of akonadictl start

Here the output of "akonadictl start" as requested.
Comment 68 Christophe Marin 2010-06-06 15:38:10 UTC
*** Bug 240725 has been marked as a duplicate of this bug. ***
Comment 69 Christophe Marin 2010-06-06 22:56:19 UTC
*** Bug 238326 has been marked as a duplicate of this bug. ***
Comment 70 Christophe Marin 2010-06-06 23:51:38 UTC
*** Bug 236715 has been marked as a duplicate of this bug. ***
Comment 71 Christophe Marin 2010-06-07 01:22:28 UTC
*** Bug 235378 has been marked as a duplicate of this bug. ***
Comment 72 Christophe Marin 2010-06-07 01:55:28 UTC
*** Bug 234238 has been marked as a duplicate of this bug. ***
Comment 73 Christophe Marin 2010-06-10 12:04:06 UTC
*** Bug 241254 has been marked as a duplicate of this bug. ***
Comment 74 Arne Schmitz 2010-06-19 09:13:54 UTC
I have a similar (same?) bug. Kontact crashes on every other login, complaining that another instance is already running. Using KDE 4.4.4 on OpenSUSE 11.2. The (not fully equipped) backtrace that I got so far is:

Application: Kontact (kontact), signal: Segmentation fault
[KCrash Handler]
#6  0xb67bbaa2 in QAccessible::updateAccessibility (o=0x8182948, who=0, reason=ObjectHide) at accessible/qaccessible_unix.cpp:99
#7  0xb6267e9d in QWidgetPrivate::hideChildren (this=0x811e0d8, spontaneous=false) at kernel/qwidget.cpp:7583
#8  0xb626802a in QWidgetPrivate::hide_helper (this=0x811e0d8) at kernel/qwidget.cpp:7309
#9  0xb6271a70 in QWidget::setVisible (this=0x811deb8, visible=false) at kernel/qwidget.cpp:7481
#10 0xb6275277 in QWidget::hide (this=0x811deb8) at ../../src/gui/kernel/qwidget.h:489
#11 0xb626efe8 in QWidgetPrivate::close_helper (this=0x811e0d8, mode=CloseNoEvent) at kernel/qwidget.cpp:7616
#12 0xb62715c9 in QWidget::~QWidget (this=0x811deb8, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1425
#13 0xb667743f in QFrame::~QFrame (this=0x811deb8, __in_chrg=<value optimized out>) at widgets/qframe.cpp:242
#14 0xb7596502 in ?? () from /usr/lib/libakonadi-kde.so.4
#15 0xb74e2253 in Akonadi::Control::~Control() () from /usr/lib/libakonadi-kde.so.4
#16 0xb759ec3a in ?? () from /usr/lib/libakonadi-kde.so.4
#17 0xb74c9372 in ?? () from /usr/lib/libakonadi-kde.so.4
#18 0xb75902b9 in ?? () from /usr/lib/libakonadi-kde.so.4
#19 0xb5ead111 in ?? () from /lib/libc.so.6
#20 0xb5ead16d in exit () from /lib/libc.so.6
#21 0xaf3cb488 in KMail::lockOrDie() () from /usr/lib/libkmailprivate.so.4
#22 0xaf7e1985 in ?? () from /usr/lib/kde4/kmailpart.so
#23 0xaf7e34d4 in QObject* KPluginFactory::createPartInstance<KMailPart>(QWidget*, QObject*, QList<QVariant> const&) () from /usr/lib/kde4/kmailpart.so
#24 0xb6f613af in KPluginFactory::create(char const*, QWidget*, QObject*, QList<QVariant> const&, QString const&) () from /usr/lib/libkdecore.so.5
#25 0xb7633be3 in KontactInterface::Core::createPart(char const*) () from /usr/lib/libkontactinterface.so.4
#26 0xb7634167 in KontactInterface::Plugin::loadPart() () from /usr/lib/libkontactinterface.so.4
#27 0xaf8c803a in ?? () from /usr/lib/kde4/kontact_kmailplugin.so
#28 0xb7635510 in KontactInterface::Plugin::part() () from /usr/lib/libkontactinterface.so.4
#29 0xb77c5572 in Kontact::MainWindow::selectPlugin(KontactInterface::Plugin*) () from /usr/lib/libkontactprivate.so.4
#30 0xb77bf9cc in Kontact::MainWindow::loadSettings() () from /usr/lib/libkontactprivate.so.4
#31 0xb77c8915 in Kontact::MainWindow::initObject() () from /usr/lib/libkontactprivate.so.4
#32 0xb77c9fe7 in Kontact::MainWindow::MainWindow() () from /usr/lib/libkontactprivate.so.4
#33 0x0804be5e in _start ()
Comment 75 goretux 2010-06-22 14:03:25 UTC
It seems that the bug did not trigger with my desktop once. But in fact the problem currently hit my desktop. And I see the same problem affecting a third machine (same configuration kubuntu 10.04 with KDE 4.4.4).

(In reply to comment #65)
> It seems strange as only my laptop has the problem now.
> My desktop I just rebooted didn't reveal the bug.
> (both have the same config, except the kernel of my laptop, but it really seems
> unrelated)
Comment 76 Eggert Ehmke 2010-07-03 15:51:07 UTC
Since I upgraded my Gentoo System on AMD64 to KDE 4.4.4 the bug did not show up anymore.
Comment 77 Johann Renner Rouliez 2010-07-14 15:12:43 UTC
I'm running KDE 4.4.92 (KDE 4.5 RC2) and the problem is still here. AFAICS, it just happens when kontact is opened before kwallet (i.e. when the kwallet password is not entered before kontact is opened).

This behavior has been reported at least in comment 40, and:
- bug 143187, comment 23.
- bug 143187, comment 24.
Comment 78 Christophe Marin 2010-09-19 13:46:13 UTC
*** Bug 248768 has been marked as a duplicate of this bug. ***
Comment 79 Christophe Marin 2010-09-19 14:01:59 UTC
*** Bug 248879 has been marked as a duplicate of this bug. ***
Comment 80 Christophe Marin 2010-09-19 19:01:46 UTC
*** Bug 250306 has been marked as a duplicate of this bug. ***
Comment 81 Christophe Marin 2010-09-19 21:59:40 UTC
*** Bug 248824 has been marked as a duplicate of this bug. ***
Comment 82 Christophe Marin 2010-09-21 00:47:59 UTC
*** Bug 251850 has been marked as a duplicate of this bug. ***
Comment 83 David Huang 2010-09-21 04:13:39 UTC
Created attachment 51840 [details]
New crash information added by DrKonqi

When I started Kontact, the KDE Wallet poped out to let me enter password. Before entering password, I clicked Kaddressbook, but Kaddressbook did not start. Then I entered the password for KDE Wallet, and two Kontacts started. I closed the second one, all Kontacts crashes.
Comment 84 Christophe Marin 2010-09-29 13:18:42 UTC
*** Bug 252610 has been marked as a duplicate of this bug. ***
Comment 85 dave 2010-09-30 06:28:57 UTC
Created attachment 52097 [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:

Kontact crashed when closing second instance after reboot.

-- Backtrace (Reduced):
#6  QListData::begin (this=0x28b1180) at /usr/include/qt4/QtCore/qlist.h:97
#7  QList<KMFilter*>::begin (this=0x28b1180) at /usr/include/qt4/QtCore/qlist.h:255
#8  KMMainWidget::initializeFilterActions (this=0x28b1180) at ../../kmail/kmmainwidget.cpp:4743
#9  0x00007fe677282e11 in KMailPart::guiActivateEvent (this=0x2781380, e=0x7fffee820fe0) at ../../kmail/kmail_part.cpp:183
#10 0x00007fe6919c5edc in QObject::event (this=0x2781380, e=<value optimized out>) at kernel/qobject.cpp:1250
Comment 86 Christophe Marin 2010-10-13 14:35:17 UTC
*** Bug 253981 has been marked as a duplicate of this bug. ***
Comment 87 Christophe Marin 2010-10-16 23:48:54 UTC
*** Bug 254341 has been marked as a duplicate of this bug. ***
Comment 88 Christophe Marin 2010-10-19 11:49:46 UTC
*** Bug 254626 has been marked as a duplicate of this bug. ***
Comment 89 Christophe Marin 2010-10-19 11:52:57 UTC
*** Bug 254576 has been marked as a duplicate of this bug. ***
Comment 90 Patrick Zimmermann 2010-10-27 11:03:05 UTC
Still occurs for me in KDE 4.5.1 (Kubuntu 10.10). On restart I get a pop up window "Kontact is already started" when clicking "yes" it will start kontact twice, if clicking "no", no kontact is started.
Comment 91 cmf 2010-11-16 22:52:23 UTC
This bug still exists in KDE 4.5.3 on arch Linux. Greets me every morning when I get to work!
Comment 92 Johann Renner Rouliez 2010-11-17 14:12:15 UTC
I can confirm the same as comment #91 with kubuntu linux.
Comment 93 Justin 2010-11-29 19:53:07 UTC
Created attachment 53869 [details]
New crash information added by DrKonqi

kontact (4.4.7) on KDE Platform 4.5.3 (KDE 4.5.3) using Qt 4.7.0

- What I was doing when the application crashed:
Seems sometimes when I restart or reboot the system Kontact is already running. It then tries to load kontact again, I get an error about how two are running and I could lose mail if I close one, then it crashes.

-- Backtrace (Reduced):
#6  KMKernel::toggleMainWin (this=0x0) at ../../kmail/kmkernel.cpp:2195
#7  0x00007f2cd1eb134d in KMSystemTray::slotActivated (this=<value optimized out>, reason=QSystemTrayIcon::Trigger) at ../../kmail/kmsystemtray.cpp:286
#8  0x00007f2cd1eb4233 in KMSystemTray::qt_metacall (this=0x13c8c80, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff543aae20) at ./kmsystemtray.moc:85
[...]
#10 0x00007f2cedcc32ae in QSystemTrayIcon::activated (this=0x0, _t1=QSystemTrayIcon::Trigger) at .moc/release-shared/moc_qsystemtrayicon.cpp:134
#11 0x00007f2cedc981b6 in QSystemTrayIconSys::mousePressEvent (this=0x13cacd0, ev=0x7fff543ab720) at util/qsystemtrayicon_x11.cpp:298
Comment 94 Andreas Bourges 2010-12-06 06:02:16 UTC
same behaviour on debian/sid (experimental snapshots) since upgrade to kde 4.5.x
Comment 95 Andreas Bourges 2010-12-06 06:06:21 UTC
one thing I noticed - during startup kwalletmgr asks for the password to open my wallet (used for ssh-agent and mail passwords). If I wait with entering the password until kontact has beed loaded, there's no problem. If I enter my password *before* kontact appears, it gets loaded twice with the behaviour shown in this bug.
Comment 96 Christophe Marin 2010-12-24 19:40:37 UTC
*** Bug 261172 has been marked as a duplicate of this bug. ***
Comment 97 Christophe Marin 2010-12-26 23:29:38 UTC
*** Bug 260989 has been marked as a duplicate of this bug. ***
Comment 98 Christophe Marin 2010-12-30 12:23:03 UTC
*** Bug 261598 has been marked as a duplicate of this bug. ***
Comment 99 ctvoigt 2011-01-03 12:59:19 UTC
Created attachment 55515 [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:
Started Computer (KDE)
Opened Kontact
KDE opened second Kontact (was open befor shutdown)
Closed One Kontact
---CRASH---

-- Backtrace (Reduced):
#6  0x00007f6a928568c9 in KMFolder::noContent (this=<value optimized out>) at ../../kmail/kmfolder.cpp:359
#7  0x00007f6a9280df97 in KMail::FolderViewItem::updateCounts (this=0x2af9540) at ../../kmail/folderview.cpp:2849
#8  0x00007f6a9280e41e in KMail::FolderView::updateCountsForChildren (this=0x2a8db40, it=0x2af81c0, tStart=...) at ../../kmail/folderview.cpp:871
#9  0x00007f6a9280e3dc in KMail::FolderView::updateCountsForChildren (this=0x2a8db40, it=0x2b00f70, tStart=...) at ../../kmail/folderview.cpp:843
#10 0x00007f6a9280e3dc in KMail::FolderView::updateCountsForChildren (this=0x2a8db40, it=0x23e44e0, tStart=...) at ../../kmail/folderview.cpp:843
Comment 100 Christophe Marin 2011-01-10 12:35:25 UTC
*** Bug 262651 has been marked as a duplicate of this bug. ***
Comment 101 Christophe Marin 2011-01-13 19:22:59 UTC
*** Bug 263052 has been marked as a duplicate of this bug. ***
Comment 102 Christophe Marin 2011-01-21 12:25:12 UTC
*** Bug 183836 has been marked as a duplicate of this bug. ***
Comment 103 S. Burmeister 2011-01-23 14:03:48 UTC
This bug got worse since I updated KDE to 4.6 RC2 and kdepim 4.4.9.

Before that the issue did not appear if one allowed kontact permanent access to kwallet.

Now it appears if one has "special dates" enabled or if one has an imap account, i.e. disabling "special dates" does not solve it unless one has no imap account.
Comment 104 Christophe Marin 2011-01-24 19:12:28 UTC
*** Bug 264194 has been marked as a duplicate of this bug. ***
Comment 105 Christophe Marin 2011-01-24 19:32:11 UTC
Created attachment 56395 [details]
Test kontact config file.

@All: please try the following thing:

Quit Kontact,
- Backup your ~.kde/share/config/kontactrc file (can be in a different directory, depending on your distro)

- Replace it with the one attached in this comment,

Then try to reproduce (for almost all of you, running kontact, logging out then back in is enough)
Comment 106 S. Burmeister 2011-01-24 20:08:19 UTC
With special dates and planner disabled and removing the line

ActivePlugin=kontact_kmailplugin

from the [View] section of kontactrc it does not crash anymore.
Comment 107 S. Burmeister 2011-01-24 20:11:23 UTC
and you have to change

X-KDE-KontactPartLoadOnStart=true

to false in /usr/share/kde4/services/kontact/kmailplugin.desktop

and maybe allow kontact permanent access to kwallet.
Comment 108 Christophe Marin 2011-01-24 21:41:49 UTC
Git commit cb87362163afbed2dca419c839c342a7b5ec675f by Christophe Giboudeaux.
Pushed by cgiboudeaux into branch '4.4'.

Disable the Special Dates and Planner plugins by default.
A new option is introduced for kdepim 4.4.10: KONTACT_ENABLE_MIXEDMODE_SUMMARY_PLUGINS (default: disabled)
This will prevent Kontact from starting twice when restoring the KDE session.

CCBUG: 185544
BUG: 263294
(and probably a few other Kontact bugs)

DO NOT BACKPORT. AFAIK, kontact from 4.6 is not affected.

M  +6    -2    kontact/plugins/CMakeLists.txt     

http://commits.kde.org/ee6cc38b/cb87362163afbed2dca419c839c342a7b5ec675f
Comment 109 Christopher Yeleighton 2011-01-25 10:13:43 UTC
(In reply to comment #105)
> Created an attachment (id=56395) [details]
> Test kontact config file.
> 
> @All: please try the following thing:
> 
> Quit Kontact,
> - Backup your ~.kde/share/config/kontactrc file (can be in a different
> directory, depending on your distro)

It is at ~/.kde4/share/config/kontactrc
Comment 110 Christophe Marin 2011-01-25 12:01:35 UTC
SVN commit 1216989 by cgiboudeaux:

    Disable the Special Dates and Planner plugins by default.
    A new option is introduced for kdepim 4.4.10: KONTACT_ENABLE_MIXEDMODE_SUMMARY_PLUGINS (default: disabled)
    This will prevent Kontact from starting twice when restoring the KDE session.
    
    CCBUG: 185544
    BUG: 263294
    (and probably a few other Kontact bugs)
    
    DO NOT BACKPORT. AFAIK, kontact from 4.6 is not affected.


 M  +4 -0      CMakeLists.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1216989
Comment 111 Christophe Marin 2011-01-27 13:51:18 UTC
*** Bug 256664 has been marked as a duplicate of this bug. ***
Comment 112 Christophe Marin 2011-01-27 13:52:27 UTC
*** Bug 228821 has been marked as a duplicate of this bug. ***
Comment 113 Christophe Marin 2011-01-28 10:52:21 UTC
*** Bug 264592 has been marked as a duplicate of this bug. ***
Comment 114 jamundso 2011-01-28 15:34:37 UTC
I've confirmed that the replacement kontactrc attached to comment 105, *and* the steps mentioned in comments 106 and 107 were required to fix this on my desktop.
Comment 115 Christophe Marin 2011-01-29 16:24:23 UTC
*** Bug 264754 has been marked as a duplicate of this bug. ***
Comment 116 Dominic Lyons 2011-01-29 16:36:07 UTC
The rc-files edits seem to me more like a workaround than a real solution. If someone starts Kontact manually a second time through the k-menu the problem is still thse same.

Wouldn't it be better to avoid Kontact running multiple instances? VLC, Amarok, Firefox and a lot of other applications handle it like that. If Kontact is started a second time it should for example only get the already running instance in the foreground and then quit the new instance.
Comment 117 Dimitrios Glentadakis 2011-01-29 16:43:58 UTC
in my system, even i start kontact manually many times, i have always one instance. You did a reboot after these settings ?
Comment 118 Christophe Marin 2011-01-29 16:48:15 UTC
(In reply to comment #116)
> The rc-files edits seem to me more like a workaround than a real solution. If
> someone starts Kontact manually a second time through the k-menu the problem is
> still thse same.

Assuming you're right, the special dates and planner plugins are not built in kdepim 4.4.10 by default.

> 
> Wouldn't it be better to avoid Kontact running multiple instances? VLC, Amarok,
> Firefox and a lot of other applications handle it like that. If Kontact is
> started a second time it should for example only get the already running
> instance in the foreground and then quit the new instance.


Patch welcome.

The crash cannot be reproduced in kdepim 4.6 and the last kdepim 4.4 version was released (4.4.10).

When kdepim 4.6 gets released, this bug will be closed.
Comment 119 Christophe Marin 2011-02-01 01:35:44 UTC
*** Bug 160598 has been marked as a duplicate of this bug. ***
Comment 120 Christophe Marin 2011-02-02 11:41:02 UTC
*** Bug 265179 has been marked as a duplicate of this bug. ***
Comment 121 jamundso 2011-02-11 03:39:11 UTC
(In reply to comment #110)
> SVN commit 1216989 by cgiboudeaux:
> 
>     Disable the Special Dates and Planner plugins by default.
>     A new option is introduced for kdepim 4.4.10:
> KONTACT_ENABLE_MIXEDMODE_SUMMARY_PLUGINS (default: disabled)
>     This will prevent Kontact from starting twice when restoring the KDE
> session.
> 
>     CCBUG: 185544
>     BUG: 263294
>     (and probably a few other Kontact bugs)
> 
>     DO NOT BACKPORT. AFAIK, kontact from 4.6 is not affected.
> 
> 
>  M  +4 -0      CMakeLists.txt  
> 
> 
> WebSVN link: http://websvn.kde.org/?view=rev&revision=1216989

What value is added here?
/usr/share/kde4/services/kontact/kmailplugin.desktop
still defaults to 
X-KDE-KontactPartLoadOnStart=true
so nothing is gained relative to this bug.
Comment 122 Christophe Marin 2011-02-14 16:00:54 UTC
*** Bug 266305 has been marked as a duplicate of this bug. ***
Comment 123 Dimitrios Glentadakis 2011-02-14 18:27:05 UTC
i have done the settings so it is fixed and i dont have the kontact twice at startup. But i had once before 15 days. I did nt take it seriously, but i had it now a second time in fifteen days so i post the backtrace

Application: Kontact (kontact), signal: Segmentation fault
[Current thread is 1 (Thread 0xb2ed06d0 (LWP 2915))]

Thread 3 (Thread 0xac967b70 (LWP 3190)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb42e9fa2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/i686/libpthread.so.0
#2  0xb60612c4 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/i686/libc.so.6
#3  0xb62206ec in wait (this=0x96bada4, mutex=0x96bada0, time=30000) at thread/qwaitcondition_unix.cpp:86
#4  QWaitCondition::wait (this=0x96bada4, mutex=0x96bada0, time=30000) at thread/qwaitcondition_unix.cpp:160
#5  0xb62153c6 in QThreadPoolThread::run (this=0x96bca50) at concurrent/qthreadpool.cpp:140
#6  0xb621fb0a in QThreadPrivate::start (arg=0x96bca50) at thread/qthread_unix.cpp:285
#7  0xb42e5ae5 in start_thread () from /lib/i686/libpthread.so.0
#8  0xb605303e in clone () from /lib/i686/libc.so.6
.....
Comment 124 Dimitrios Glentadakis 2011-02-14 18:30:16 UTC
Created attachment 57254 [details]
2 crashs in 15 days with the fixed settings done
Comment 125 Rex Dieter 2011-02-16 18:34:05 UTC
any dev/upstream feedback on comment #107 and comment #121 wrt /usr/share/kde4/services/kontact/kmailplugin.desktop and the value of key
X-KDE-KontactPartLoadOnStart=   ?

I'm being asked to modify this downstream, but would like some feedback on it first.
Comment 126 Christophe Marin 2011-02-16 22:19:26 UTC
Rex: Turning the key off will prevent the kmail module from being autoloaded when Kontact is launched (the user then have to explicitely select the module to load the kmailPart)

The counterpart is that kontact will likely crash if the users open the settings dialog and the kmail part wasn't loaded (see bug 209604)
Comment 127 Christopher Yeleighton 2011-02-17 12:58:46 UTC
(In reply to comment #125)
> any dev/upstream feedback on comment #107 and comment #121 wrt
> /usr/share/kde4/services/kontact/kmailplugin.desktop and the value of key
> X-KDE-KontactPartLoadOnStart=   ?
> 
> I'm being asked to modify this downstream, but would like some feedback on it
> first.

Do not get me wrong, but if an application relies on its editable configuration files lest it crash, it is still buggy as hell.  So it is only a band-aid anyway.

The offending plug-ins need to be fixed.
Comment 128 S. Burmeister 2011-02-17 14:54:25 UTC
The next KDEPIM release will fix this since kdepim 4.6 or whatever it will be called does not show this bug.
Comment 129 Christophe Marin 2011-02-21 18:09:48 UTC
If someone builds kdepim 4.4.10, please try the following patch and check if you still get the warning.
Now that two plugins are disabled, the only way to reproduce is to switch on the mail module before logging off.

the workaround from comment #107 is not needed anymore.

Index: kontact/src/mainwindow.cpp
===================================================================
--- kontact/src/mainwindow.cpp  (révision 1222060)
+++ kontact/src/mainwindow.cpp  (copie de travail)
@@ -524,7 +524,7 @@
     QVariant loadOnStart = it->property( "X-KDE-KontactPartLoadOnStart" );
     QVariant hasPartProp = it->property( "X-KDE-KontactPluginHasPart" );
 
-    if ( !loadOnStart.isNull() && loadOnStart.toBool() ) {
+    if ( !loadOnStart.isNull() && loadOnStart.toBool() && !kapp->isSessionRestored()) {
       mDelayedPreload.append( plugin );
     }
Comment 130 Christophe Marin 2011-02-21 19:14:20 UTC
Looks like that won't be enough. Forget the previous comment.
Comment 131 Christophe Marin 2011-03-06 12:11:26 UTC
*** Bug 267746 has been marked as a duplicate of this bug. ***
Comment 132 jamundso 2011-03-23 00:47:02 UTC
Not sure if this has been mentioned, but for me this only happens if, and only if, there is a network available during login - wired, favourite wireless, etc. If I have no network available, my desktop starts with simply a kontact window, and I briefly see a Korganizer daemon.
Comment 133 Christophe Marin 2011-04-06 15:33:56 UTC
*** Bug 256290 has been marked as a duplicate of this bug. ***
Comment 134 Christophe Marin 2011-04-08 15:29:06 UTC
*** Bug 254292 has been marked as a duplicate of this bug. ***
Comment 135 Christophe Marin 2011-04-10 13:59:11 UTC
*** Bug 270582 has been marked as a duplicate of this bug. ***
Comment 136 Christophe Marin 2011-04-11 23:51:57 UTC
*** Bug 270716 has been marked as a duplicate of this bug. ***
Comment 137 Jowany 2011-04-14 09:28:37 UTC
Created attachment 58945 [details]
New crash information added by DrKonqi

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

- What I was doing when the application crashed:
Kontact crash after say "already runing", i closed actual opening Kontact and already Kontakt.

-- Backtrace (Reduced):
#6  begin (this=0x22f8200) at /usr/include/QtCore/qlist.h:97
#7  begin (this=0x22f8200) at /usr/include/QtCore/qlist.h:255
#8  KMMainWidget::initializeFilterActions (this=0x22f8200) at /usr/src/debug/kdepim-4.4.10/kmail/kmmainwidget.cpp:4777
#9  0x00007f101b4714d1 in KMailPart::guiActivateEvent (this=0x1dff510, e=0x7fff3c16de90) at /usr/src/debug/kdepim-4.4.10/kmail/kmail_part.cpp:183
#10 0x00007f102dc7062c in QObject::event (this=0x1dff510, e=<value optimized out>) at kernel/qobject.cpp:1248
Comment 138 Christophe Marin 2011-04-28 15:54:51 UTC
*** Bug 270718 has been marked as a duplicate of this bug. ***
Comment 139 Christophe Marin 2011-05-04 19:24:00 UTC
*** Bug 191659 has been marked as a duplicate of this bug. ***
Comment 140 Christophe Marin 2011-05-21 18:28:44 UTC
*** Bug 273794 has been marked as a duplicate of this bug. ***
Comment 141 jamundso 2011-05-24 02:52:25 UTC
(In reply to comment #130)
> Looks like that won't be enough. Forget the previous comment.

I assume what is "enough" is still being researched? Still seeing the error at every login, and many duplicates added to this report.
Comment 142 Christophe Marin 2011-05-24 10:41:17 UTC
(In reply to comment #141)
> 
> I assume what is "enough" is still being researched? Still seeing the error at
> every login, and many duplicates added to this report.
Comment 143 Aleksey 2011-05-31 23:45:19 UTC
Created attachment 60531 [details]
New crash information added by DrKonqi

kontact (4.4.11) on KDE Platform 4.6.3 (4.6.3) "release 4" using Qt 4.7.3

- What I was doing when the application crashed:

Kontact was active when the system was shut down.  After reboot, Kontact started twice.

- Unusual behavior I noticed:

This bug appeared on my system ONLY on KDE 4.6.3. Kontact worked well on KDE 4.6.2.

-- Backtrace (Reduced):
#6  0x00007f26a0413aa8 in KMFolderImap::slotListResult (this=0x1843db0, subfolderNames=..., subfolderPaths=..., subfolderMimeTypes=..., subfolderAttributes=..., jobData=...) at /usr/src/debug/kdepim-4.4.11.1/kmail/kmfolderimap.cpp:789
#7  0x00007f26a04153b4 in KMFolderImap::qt_metacall (this=0x1843db0, _c=QMetaObject::InvokeMetaMethod, _id=21, _a=0x7fff60cb3bc0) at /usr/src/debug/kdepim-4.4.11.1/build/kmail/kmfolderimap.moc:182
[...]
#9  0x00007f26a03154e4 in KMail::ListJob::receivedFolders (this=<value optimized out>, _t1=<value optimized out>, _t2=<value optimized out>, _t3=<value optimized out>, _t4=<value optimized out>, _t5=<value optimized out>) at /usr/src/debug/kdepim-4.4.11.1/build/kmail/listjob.moc:97
#10 0x00007f26a0317504 in KMail::ListJob::slotListResult (this=0x1fa7420, job=0x2462350) at /usr/src/debug/kdepim-4.4.11.1/kmail/listjob.cpp:181
#11 0x00007f26a0317623 in KMail::ListJob::qt_metacall (this=0x1fa7420, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff60cb3d80) at /usr/src/debug/kdepim-4.4.11.1/build/kmail/listjob.moc:83
Comment 144 Christophe Marin 2011-07-09 10:24:57 UTC
Fixed in kdepim >= 4.6.

Clearing the CC list.
Comment 145 jamundso 2011-07-11 14:07:34 UTC
(In reply to comment #144)
> Fixed in kdepim >= 4.6.

That assumption is incorrect. See comment #143, and the screenshot I am about to attatch.

> Clearing the CC list.

Please re-instate it, and REOPEN this bug.
Comment 146 Christophe Marin 2011-07-11 14:14:40 UTC
comment #143 is about kontact 4.4.11.
Comment 147 jamundso 2011-07-11 14:17:51 UTC
Created attachment 61780 [details]
Screenshot showing bug with KDE 4.6

Hard to believe, I know...
Comment 148 Christophe Marin 2011-07-11 14:21:58 UTC
kontact --version please
Comment 149 jamundso 2011-07-11 16:26:55 UTC
(In reply to comment #148)
> kontact --version please

$ kontact --version
Qt: 4.7.3
KDE Development Platform: 4.6.3 (4.6.3)
Kontact: 4.4.11

Blah! My bad... sorry for the noise! I read "kdepim", but my brain registered "KDE". Carry on everybody, nothing to see here. :-)
Comment 150 Alex Leach 2011-07-12 08:20:14 UTC
Created attachment 61794 [details]
New crash information added by DrKonqi

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

- What I was doing when the application crashed:

Just after a boot & login, not even using Kontact. Like other bug reports, I had 2 instances of Kontact load at login.

- Unusual behavior I noticed:

Doubt it relates, but my Nepomuk Servuce Stub Daemon crashes all the time. Also, I thought this crash was going to be a duplicate of another Kontact-related crash (bug 269173), which apparently relates to my having a hotmail POP3 account. Looks like there's a patch, but whether it's been rolled out to the repository release versions yet, (so whether it's fixed on my system or not) I don't know.

Also, I think there's a deeper KDE daemon (dbus / ibus) which needs updating... E.g. Starting Kontact from the console, I get the following (those two QI... lines I see ALL the time with GUI startups on Kubuntu Desktop i386 & KDE on Ubuntu Server x86_64):-
> kontact
kontact(6138) KMFolder::updateIndicatorIcon: Could not read image from "" 
kontact(6138) KMFolder::updateIndicatorIcon: Could not read image from "" 
kontact(6138) KMFolder::updateIndicatorIcon: Could not read image from "" 
kontact(6138) KMFolder::updateIndicatorIcon: Could not read image from "" 
kontact(6138) KMFolder::updateIndicatorIcon: Could not read image from "" 
kontact(6138) KMFolder::updateIndicatorIcon: Could not read image from "" 
kontact(6138) KMFolder::updateIndicatorIcon: Could not read image from "" 
kontact(6138) KMFolder::updateIndicatorIcon: Could not read image from "" 
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory
QFileSystemWatcher: failed to add paths: /home/albl500/.config/ibus/bus
kontact(6138)/libkdepim Akonadi::PluginLoader::scan: missing or empty X-KDE-ClassName value in " "/usr/share/kde4/apps/akonadi/plugins/serializer/akonadi_serializer_addressee.desktop" " 

kontact(6138)/libkdepim Akonadi::PluginLoader::scan: missing or empty X-KDE-ClassName value in " "/usr/share/kde4/apps/akonadi/plugins/serializer/akonadi_serializer_bookmark.desktop" " 

kontact(6138)/libkdepim Akonadi::PluginLoader::scan: missing or empty X-KDE-ClassName value in " "/usr/share/kde4/apps/akonadi/plugins/serializer/akonadi_serializer_microblog.desktop" " 

kontact(6138)/libkdepim Akonadi::PluginLoader::scan: missing or empty X-KDE-ClassName value in " "/usr/share/kde4/apps/akonadi/plugins/serializer/akonadi_serializer_kcal.desktop" " 

kontact(6138)/libkdepim Akonadi::PluginLoader::scan: missing or empty X-KDE-ClassName value in " "/usr/share/kde4/apps/akonadi/plugins/serializer/akonadi_serializer_mail.desktop" " 

kontact(6138)/libkdepim Akonadi::PluginLoader::scan: missing or empty X-KDE-ClassName value in " "/usr/share/kde4/apps/akonadi/plugins/serializer/akonadi_serializer_contactgroup.desktop" " 

unnamed app(6153) main: Unknown resource type:  "notes" 
kontact(6138)/kdeui (kdelibs): No such XML file "/home/albl500/.kde/share/apps/kontact/default-.rc" 
metabuntu:mysql> kontact(6138) MessageList::Core::ModelPrivate::findMessageParent: Circular In-Reply-To reference loop detected in the message tree 
kontact(6138)/kio (KIOJob) KIO::TransferJob::slotData: mimeType() not emitted when sending first data!; job URL = KUrl("pop3s://xxxx%40hotmail.com@pop3.live.com:995/index") data size = 8 
kontact(6138)/kio (KIOJob) KIO::TransferJob::slotData: mimeType() not emitted when sending first data!; job URL = KUrl("pop3s://xxxx%40hotmail.com@pop3.live.com:995/uidl") data size = 40 
kontact(6138)/kio (KIOJob) KIO::TransferJob::slotData: mimeType() not emitted when sending first data!; job URL = KUrl("pop3s://xxxx%40hotmail.com@pop3.live.com:995/download/") data size = 0 

- Custom settings of the application:

1 x POP3 hotmail account (quite buggy with Kontact - duplicate emails all the time, forgets which messages I've read). 2 x IMAP accounts.

-- Backtrace (Reduced):
#6  0x00007fb06c9bdf1d in KMKernel::config() () from /usr/lib/libkmailprivate.so.4
#7  0x00007fb06c9bec63 in KMKernel::slotRunBackgroundTasks() () from /usr/lib/libkmailprivate.so.4
#8  0x00007fb06c9c9ccd in KMKernel::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkmailprivate.so.4
[...]
#10 0x00007fb088bfb1c9 in QObject::event (this=0x1d83aa0, e=<value optimized out>) at kernel/qobject.cpp:1190
#11 0x00007fb0895a69f4 in QApplicationPrivate::notify_helper (this=0x9c0340, receiver=0x1d83aa0, e=0x7fff235f2c90) at kernel/qapplication.cpp:4462
Comment 151 swisskomputer 2011-07-16 20:56:35 UTC
Created attachment 61927 [details]
New crash information added by DrKonqi

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

Kontact opens 2 instances

-- Backtrace (Reduced):
#15 0x06fd6d7a in QObjectUserData::~QObjectUserData (this=0xbf9d02ac, __in_chrg=<value optimized out>) at kernel/qobject.cpp:3645
#16 0x031cc1f8 in KMailPart::exportFolder (this=0xa4283b8, folder=0xa63a198) at ../../kmail/kmail_part.cpp:161
#17 0x031cc3c7 in KMailPart::qt_metacall (this=0xa4283b8, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0xbf9d03d8) at ./kmail_part.moc:96
[...]
#20 0xb3236093 in KMail::FolderViewManager::folderActivated (this=0xa639948, _t1=0xa63a198) at ./folderview.moc:88
#21 0xb323c683 in KMail::FolderViewManager::viewFolderActivated (this=0xa639948, view=0xa7139a8, fld=0xa63a198, middleButton=false) at ../../kmail/folderview.cpp:148
Comment 152 Christophe Marin 2011-07-22 09:09:37 UTC
*** Bug 278211 has been marked as a duplicate of this bug. ***
Comment 153 chris-walter 2011-08-12 11:49:09 UTC
I also encounter this bug on every startup. Kontact starts with the error message "kontact already running on other screen". Starting kontact manually works.

So I dont see how this bug is fixed...

Qt: 4.7.2
KDE: 4.6.2 (4.6.2)
Kontact: 4.4.10
Comment 154 chris-walter 2011-08-12 11:54:05 UTC
ahh ok, I see. It will be fixed on Kontact 4.6, not KDE 4.6.

Sorry for the inconvenience ;)
Comment 155 Christophe Marin 2011-08-28 15:14:24 UTC
*** Bug 279669 has been marked as a duplicate of this bug. ***
Comment 156 Ekkehard Blanz 2011-09-14 17:40:00 UTC
Created attachment 63648 [details]
New crash information added by DrKonqi

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

- What I was doing when the application crashed:

Kontact opens two instances upon login - closing one of them results in crash.

-- Backtrace (Reduced):
#7  0xb32958a5 in KMFolder::noContent (this=0x9661478) at ../../kmail/kmfolder.cpp:359
#8  0xb32453a1 in KMail::FolderViewItem::updateCounts (this=0x9af8588) at ../../kmail/folderview.cpp:2850
#9  0xb3245738 in KMail::FolderView::updateCountsForChildren (this=0x9aa9780, it=0x91a1b18, tStart=...) at ../../kmail/folderview.cpp:871
#10 0xb32456ba in KMail::FolderView::updateCountsForChildren (this=0x9aa9780, it=0x9aaf248, tStart=...) at ../../kmail/folderview.cpp:843
#11 0xb32457de in KMail::FolderView::slotUpdateCounts (this=0x9aa9780) at ../../kmail/folderview.cpp:904