Bug 280144 - When accepting a change of a shared event (received via e-mail), Kontact crashes
Summary: When accepting a change of a shared event (received via e-mail), Kontact crashes
Status: RESOLVED WORKSFORME
Alias: None
Product: kontact
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-15 19:25 UTC by Matija Šuklje
Modified: 2013-06-13 21:10 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The attached iCal, anonymised (1.38 KB, application/octet-stream)
2011-08-15 19:49 UTC, Matija Šuklje
Details
New crash information added by DrKonqi (12.11 KB, text/plain)
2011-11-09 23:19 UTC, Delete Account
Details
New crash information added by DrKonqi (11.82 KB, text/plain)
2011-11-09 23:21 UTC, Delete Account
Details
New crash information added by DrKonqi (11.01 KB, text/plain)
2012-02-27 14:47 UTC, oneofthegods
Details
New crash information added by DrKonqi (8.21 KB, text/plain)
2012-04-19 20:53 UTC, Delete Account
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matija Šuklje 2011-08-15 19:25:13 UTC
Application: kontact (4.7.0 )
KDE Platform Version: 4.7.00 (4.7.0)
Qt Version: 4.7.2
Operating System: Linux 2.6.39-gentoo-r3 x86_64
Distribution: "Gentoo Base System release 2.0.3"

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

In KDEPIM 4.6.0 or 4.6.1 I had accepted an invitation to a shared event — an event that was organised by someone else and I was one of the attendents. When I clicked "I accept" on the automated invitation e-mail in KMail, the event was added to KOrganiser and all was well :)

Then I upgraded to KDEPIM 4.7.0 and I received another automated e-mail with a change that the event organiser made (change the date, time and turned off the recurrence). When I clicked "I accept" or "Show in Calendar", Kontact crashed.

The crash can be reproduced every time.

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

Thread 2 (Thread 0x7f0cea694700 (LWP 1840)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f0cfd7c488d in WTF::TCMalloc_PageHeap::scavengerThread (this=<value optimized out>) at wtf/FastMalloc.cpp:2378
#2  0x00007f0cfd7c4999 in WTF::TCMalloc_PageHeap::runScavengerThread (context=0x7f0cfdf78f34) at wtf/FastMalloc.cpp:1497
#3  0x00007f0cf9173c1a in start_thread (arg=<value optimized out>) at pthread_create.c:301
#4  0x00007f0cfe2b8eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7f0d00d94760 (LWP 1839)):
[KCrash Handler]
#6  QHash (this=0x0) at /usr/include/qt4/QtCore/qhash.h:283
#7  QSet (this=0x0) at /usr/include/qt4/QtCore/qset.h:60
#8  KCalCore::IncidenceBase::dirtyFields (this=0x0) at /var/tmp/portage/kde-base/kdepimlibs-4.7.0/work/kdepimlibs-4.7.0/kcalcore/incidencebase.cpp:622
#9  0x00007f0ce8587146 in CalendarSupport::Groupware::finishHandlingInvitation (this=0x4129330) at /var/tmp/portage/kde-base/kdepim-common-libs-4.7.0/work/kdepim-common-libs-4.7.0/calendarsupport/groupware.cpp:217
#10 0x00007f0ce8588a7c in CalendarSupport::Groupware::qt_metacall (this=0x4129330, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7ffff9ae90e0) at /var/tmp/portage/kde-base/kdepim-common-libs-4.7.0/work/kdepim-common-libs-4.7.0_build/calendarsupport/groupware.moc:82
#11 0x00007f0cff69aa1f in QMetaObject::activate (sender=0x5019d90, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x5a54e90) at kernel/qobject.cpp:3278
#12 0x00007f0ce859da84 in CalendarSupport::NepomukCalendar::loadFinished (this=0x7ffff9ae8d30, _t1=true, _t2=<value optimized out>) at /var/tmp/portage/kde-base/kdepim-common-libs-4.7.0/work/kdepim-common-libs-4.7.0_build/calendarsupport/nepomukcalendar.moc:113
#13 0x00007f0ce85a001a in CalendarSupport::NepomukCalendar::searchResult (this=0x5019d90, job=0x5a4d800) at /var/tmp/portage/kde-base/kdepim-common-libs-4.7.0/work/kdepim-common-libs-4.7.0/calendarsupport/nepomukcalendar.cpp:406
#14 0x00007f0ce85a0a8c in CalendarSupport::NepomukCalendar::qt_metacall (this=0x5019d90, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7ffff9ae9330) at /var/tmp/portage/kde-base/kdepim-common-libs-4.7.0/work/kdepim-common-libs-4.7.0_build/calendarsupport/nepomukcalendar.moc:101
#15 0x00007f0cff69aa1f in QMetaObject::activate (sender=0x57a18d0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x5a54e90) at kernel/qobject.cpp:3278
#16 0x00007f0cffaf9742 in KJob::result (this=0x7ffff9ae8d30, _t1=0x57a18d0) at /var/tmp/portage/kde-base/kdelibs-4.7.0/work/kdelibs-4.7.0_build/kdecore/kjob.moc:194
#17 0x00007f0cffaf99e0 in KJob::emitResult (this=0x57a18d0) at /var/tmp/portage/kde-base/kdelibs-4.7.0/work/kdelibs-4.7.0/kdecore/jobs/kjob.cpp:312
#18 0x00007f0ce85b9e9a in CalendarSupport::IncidenceFetchJob::itemFetchResult (this=0x57a18d0, job=<value optimized out>) at /var/tmp/portage/kde-base/kdepim-common-libs-4.7.0/work/kdepim-common-libs-4.7.0/calendarsupport/next/incidencefetchjob.cpp:81
#19 0x00007f0ce85b9f69 in CalendarSupport::IncidenceFetchJob::qt_metacall (this=0x57a18d0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7ffff9ae94e0) at /var/tmp/portage/kde-base/kdepim-common-libs-4.7.0/work/kdepim-common-libs-4.7.0_build/calendarsupport/incidencefetchjob.moc:78
#20 0x00007f0cff69aa1f in QMetaObject::activate (sender=0x5701ff0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x5a54e90) at kernel/qobject.cpp:3278
#21 0x00007f0cffaf9742 in KJob::result (this=0x7ffff9ae8d30, _t1=0x5701ff0) at /var/tmp/portage/kde-base/kdelibs-4.7.0/work/kdelibs-4.7.0_build/kdecore/kjob.moc:194
#22 0x00007f0cffaf99e0 in KJob::emitResult (this=0x5701ff0) at /var/tmp/portage/kde-base/kdelibs-4.7.0/work/kdelibs-4.7.0/kdecore/jobs/kjob.cpp:312
#23 0x00007f0cfb5f0f69 in delayedEmitResult (this=0x5701ff0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x59286e0) at /var/tmp/portage/kde-base/kdepimlibs-4.7.0/work/kdepimlibs-4.7.0/akonadi/job.cpp:144
#24 Akonadi::Job::qt_metacall (this=0x5701ff0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x59286e0) at /var/tmp/portage/kde-base/kdepimlibs-4.7.0/work/kdepimlibs-4.7.0_build/akonadi/job.moc:91
#25 0x00007f0cfb5de1e5 in Akonadi::ItemFetchJob::qt_metacall (this=0x7ffff9ae8d30, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x5a54e90) at /var/tmp/portage/kde-base/kdepimlibs-4.7.0/work/kdepimlibs-4.7.0_build/akonadi/itemfetchjob.moc:73
#26 0x00007f0cff694ace in QObject::event (this=0x5701ff0, e=0x7ffff9ae8d30) at kernel/qobject.cpp:1217
#27 0x00007f0cfea278dc in QApplicationPrivate::notify_helper (this=0x91a400, receiver=0x5701ff0, e=0x5a520d0) at kernel/qapplication.cpp:4462
#28 0x00007f0cfea2cd7d in QApplication::notify (this=0x7ffff9ae9fd0, receiver=0x5701ff0, e=0x5a520d0) at kernel/qapplication.cpp:4341
#29 0x00007f0d00133826 in KApplication::notify (this=0x7ffff9ae9fd0, receiver=0x5701ff0, event=0x5a520d0) at /var/tmp/portage/kde-base/kdelibs-4.7.0/work/kdelibs-4.7.0/kdeui/kernel/kapplication.cpp:311
#30 0x00007f0cff682d3b in QCoreApplication::notifyInternal (this=0x7ffff9ae9fd0, receiver=0x5701ff0, event=0x5a520d0) at kernel/qcoreapplication.cpp:731
#31 0x00007f0cff685cc1 in sendEvent (receiver=0x0, event_type=<value optimized out>, data=0x8f3c10) at kernel/qcoreapplication.h:215
#32 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=<value optimized out>, data=0x8f3c10) at kernel/qcoreapplication.cpp:1372
#33 0x00007f0cff6af2e3 in sendPostedEvents (s=0x92dee0) at kernel/qcoreapplication.h:220
#34 postEventSourceDispatch (s=0x92dee0) at kernel/qeventdispatcher_glib.cpp:277
#35 0x00007f0cf7fbabc1 in g_main_dispatch (context=0x91c2e0) at gmain.c:2441
#36 g_main_context_dispatch (context=0x91c2e0) at gmain.c:3014
#37 0x00007f0cf7fbf258 in g_main_context_iterate (context=0x91c2e0, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:3092
#38 0x00007f0cf7fbf40c in g_main_context_iteration (context=0x91c2e0, may_block=1) at gmain.c:3155
#39 0x00007f0cff6aee23 in QEventDispatcherGlib::processEvents (this=0x8f3810, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#40 0x00007f0cfead9cbe in QGuiEventDispatcherGlib::processEvents (this=0x7ffff9ae8d30, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#41 0x00007f0cff681a92 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#42 0x00007f0cff681e74 in QEventLoop::exec (this=0x7ffff9ae9f10, flags=) at kernel/qeventloop.cpp:201
#43 0x00007f0cff685eeb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#44 0x0000000000404149 in main (argc=<value optimized out>, argv=<value optimized out>) at /var/tmp/portage/kde-base/kontact-4.7.0/work/kontact-4.7.0/kontact/src/main.cpp:218

Reported using DrKonqi
Comment 1 Matija Šuklje 2011-08-15 19:26:29 UTC
I tried to reproduce the bug 5 times so far ant it always crashed.

Also it crashes *before* changing the event, so the event changes don't even get applied.
Comment 2 Matija Šuklje 2011-08-15 19:32:26 UTC
Played around a bit and basically clicking *anything* from this list (basically everything that the system lets you do with the event) makes it crash:
 * [Record invitation in my calendar]
 * Accept
 * Accept cond.
 * Counter proposal
 *	Decline	Delegate
 *	Forward
 *	Check my calendar

If I click the attached iCal file though, I can manually import it into my calendar (but not as a change, only as a new event).
Comment 3 Sergio Martins 2011-08-15 19:37:46 UTC
Can you attach the invitation ?
Comment 4 Matija Šuklje 2011-08-15 19:49:09 UTC
Created attachment 62853 [details]
The attached iCal, anonymised

This is the iCal I got attached in the e-mail, cleaned up of identifiable information.
Comment 5 Sergio Martins 2011-08-16 21:44:38 UTC
Git commit 3a531e958c5dc585a1258f0d50964f8831625836 by Sergio Martins.
Committed on 15/08/2011 at 21:49.
Pushed by smartins into branch 'master'.

Add assert while debugging this.

CCBUG: 280144

M  +9    -0    calendarsupport/groupware.cpp

http://commits.kde.org/kdepim/3a531e958c5dc585a1258f0d50964f8831625836
Comment 6 Paul Fee 2011-08-17 09:48:59 UTC
I got the same crash today when accepting an invitation.  Good to see the fix has been made, just need to wait for it to trickled down via the distros.

By the way, having looked at the diff, if the call to calendar->incidence() returns NULL, then a message is displayed and CalendarSupport::Groupware::finishHandlingInvitation() returns.

Will the invitation still make it into the user's calendar?  An existing entry won't be updated (since the lookup failed to find it).  However a new entry should be added.

Just wanted to check if the check will have the desired effect.

Thanks.
Comment 7 Christophe Marin 2011-08-18 11:42:22 UTC
(In reply to comment #6)
> I got the same crash today when accepting an invitation.  Good to see the fix
> has been made, just need to wait for it to trickled down via the distros.
> 

The issue is not fixed yet but it's been examined
Comment 8 Christophe Marin 2011-08-28 23:24:56 UTC
*** Bug 280171 has been marked as a duplicate of this bug. ***
Comment 9 Delete Account 2011-11-09 23:19:29 UTC
Created attachment 65461 [details]
New crash information added by DrKonqi

kmail (4.7.2) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

- What I was doing when the application crashed:

Accepted an update to an event in my personal calendar. Crash!
Have not tried to reproduce. I hope that it's not reproducable! (Does the KDE PIM team need more hands to do bug squashing? I can code, and have poked around in KDE internals in the past.)

-- Backtrace (Reduced):
#6  QHash (other=) at /usr/include/qt4/QtCore/qhash.h:283
#7  QSet (other=) at /usr/include/qt4/QtCore/qset.h:60
#8  KCalCore::IncidenceBase::dirtyFields (this=0x0) at ../../kcalcore/incidencebase.cpp:622
#9  0x00007f0f7022c25c in CalendarSupport::Groupware::finishHandlingInvitation (this=0x542e4c0) at ../../calendarsupport/groupware.cpp:217
#10 0x00007f0f7022db6c in CalendarSupport::Groupware::qt_metacall (this=0x542e4c0, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff16b24700) at ./groupware.moc:82
Comment 10 Delete Account 2011-11-09 23:21:48 UTC
Created attachment 65462 [details]
New crash information added by DrKonqi

kmail (4.7.2) on KDE Platform 4.7.2 (4.7.2) using Qt 4.7.4

Yep. This is 100% reproducable. This sucks. :(

-- Backtrace (Reduced):
#6  QHash (other=) at /usr/include/qt4/QtCore/qhash.h:283
#7  QSet (other=) at /usr/include/qt4/QtCore/qset.h:60
#8  KCalCore::IncidenceBase::dirtyFields (this=0x0) at ../../kcalcore/incidencebase.cpp:622
#9  0x00007fd6117ac25c in CalendarSupport::Groupware::finishHandlingInvitation (this=0x3b50690) at ../../calendarsupport/groupware.cpp:217
#10 0x00007fd6117adb6c in CalendarSupport::Groupware::qt_metacall (this=0x3b50690, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff463c2cf0) at ./groupware.moc:82
Comment 11 Sergio Martins 2011-11-09 23:43:42 UTC
(In reply to comment #9)
> (Does the KDE
> PIM team need more hands to do bug squashing? I can code, and have poked around
> in KDE internals in the past.)
> 

Yes, your help is welcome. Do you build from source ? If yes, please update master.
Make it crash and post debug output. I'm interested in the output of this debug statement:

    kDebug() << "cloning. SchedulingId=" << incidence->uid()
             << "; SchedulingId2="       << existingIncidence->schedulingID()
             << "; new uid="             << existingIncidence->uid()
             << "; willCrash="           << willCrash
             << "; action="               << action;

which in kdepim/calendarsupport/groupware.cpp
Comment 12 Sergio Martins 2011-11-09 23:45:56 UTC
Git commit dc76c02f29c730b94ffc575d3166c03305687e8f by Sergio Martins.
Committed on 10/11/2011 at 00:41.
Pushed by smartins into branch 'KDE/4.7'.

Add debug info so reporter can give me more info.

CCBUG: 280144

M  +7    -1    calendarsupport/groupware.cpp

http://commits.kde.org/kdepim/dc76c02f29c730b94ffc575d3166c03305687e8f
Comment 13 Sergio Martins 2011-11-09 23:51:33 UTC
Git commit 97ff696e0a23deee0cf49a7fd71a9b6aae658cde by Sergio Martins.
Committed on 10/11/2011 at 00:41.
Pushed by smartins into branch 'master'.

Add debug info so reporter can give me more info.

CCBUG: 280144
(cherry picked from commit dc76c02f29c730b94ffc575d3166c03305687e8f)

Conflicts:

	calendarsupport/groupware.cpp

M  +7    -1    calendarsupport/groupware.cpp

http://commits.kde.org/kdepim/97ff696e0a23deee0cf49a7fd71a9b6aae658cde
Comment 14 Delete Account 2011-11-09 23:53:38 UTC
(In reply to comment #11)
> Yes, your help is welcome. Do you build from source ? If yes, please update
> master.

I do not build from source at work. I'll see if I can build from source at home
and reproduce the bug. I might not get around to this until this weekend. :(

Kmail2 lives in the KDEPIM module?
Comment 15 Sergio Martins 2011-11-09 23:56:51 UTC
(In reply to comment #14)
> (In reply to comment #11)
> > Yes, your help is welcome. Do you build from source ? If yes, please update
> > master.
> 
> I do not build from source at work. I'll see if I can build from source at home
> and reproduce the bug. I might not get around to this until this weekend. :(
> 
> Kmail2 lives in the KDEPIM module?

Yes, you'll need kdelibs, kdepimlibs and kdepim-runtime, kdepim
Comment 16 oneofthegods 2012-02-27 14:47:32 UTC
Created attachment 69128 [details]
New crash information added by DrKonqi

kmail (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:

Kmail immediately crashes when I accept a meeting invitation.

-- Backtrace (Reduced):
#6  QHash (other=) at /usr/include/QtCore/qhash.h:283
#7  QSet (other=) at /usr/include/QtCore/qset.h:60
#8  KCalCore::IncidenceBase::dirtyFields (this=0x0) at /usr/src/debug/kdepimlibs-4.7.2/kcalcore/incidencebase.cpp:622
#9  0x00007fcbcb25b55c in CalendarSupport::Groupware::finishHandlingInvitation (this=0x1f6ebf0) at /usr/src/debug/kdepim-4.7.2/calendarsupport/groupware.cpp:217
#10 0x00007fcbcb25ce6c in CalendarSupport::Groupware::qt_metacall (this=0x1f6ebf0, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fffba425c60) at /usr/src/debug/kdepim-4.7.2/build/calendarsupport/groupware.moc:82
Comment 17 Delete Account 2012-04-19 20:53:05 UTC
Created attachment 70513 [details]
New crash information added by DrKonqi

kmail (4.7.3) on KDE Platform 4.7.4 (4.7.4) using Qt 4.7.4

- What I was doing when the application crashed:

I clicked the "Remove this meeting from my calendar" link in the (autogenerated?) email that accompanied a meeting cancellation. BOOM! This crash happened. This meeting is a recurring meeting that is on my local calender.

-- Backtrace (Reduced):
#6  QHash (other=) at /usr/include/qt4/QtCore/qhash.h:283
#7  QSet (other=) at /usr/include/qt4/QtCore/qset.h:60
#8  KCalCore::IncidenceBase::dirtyFields (this=0x0) at ../../kcalcore/incidencebase.cpp:622
#9  0x00007fb4f78ce324 in CalendarSupport::Groupware::finishHandlingInvitation (this=0x2ec3090) at ../../calendarsupport/groupware.cpp:224
#10 0x00007fb4f78cfe9c in CalendarSupport::Groupware::qt_metacall (this=0x2ec3090, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff7a7d21b0) at ./groupware.moc:82
Comment 18 Christophe Marin 2012-04-20 16:04:50 UTC
I can't reproduce for the moment.

(In reply to comment #17)
> - What I was doing when the application crashed:
> 
> I clicked the "Remove this meeting from my calendar" link in the
> (autogenerated?) email that accompanied a meeting cancellation. BOOM! This
> crash happened. This meeting is a recurring meeting that is on my local
> calender.
> 

Tried creating an event, send an invitation to another account, accept it, return to the calendar & delete the event, send the email, hit the remove from calendar link.

No crash, just this warning:
kontact(9693)/kdepimlibs (kcalcore) KCalCore::ICalFormat::parseScheduleMessage: 
kcalcore library reported a problem while parsing: 
kontact(9693)/kdepimlibs (kcalcore) KCalCore::ICalFormat::parseScheduleMessage: "Cancel" : "Failed iTIP restrictions for SEQUENCE property. Expected 1 instances of the property and got 0
Comment 19 Matija Šuklje 2012-09-20 22:10:36 UTC
I just accepted an invitation in 4.8.5 and nothing crashed.
Comment 20 Sergio Martins 2013-06-13 21:10:00 UTC
good. anyway, stuff has changed a lot for 4.11, so we won't be seeing this again