[Kde-pim] KCal::Calendar crash+fix
Allen Winter
winter at kde.org
Mon May 12 14:29:49 BST 2008
On Tuesday 06 May 2008 17:00:44 Sebastian Sauer wrote:
> Hi *
>
> While using the akonadi-dbus interface I did run into;
>
Patch is ok.
But I'm wondering why the ctor doesn't require a CalendarLocal argument?
Else almost all the methods in this class need to check for mCalendar
in this same way, because you can't assume the loadFile() method
has been called prior.
> [KCrash handler]
> #5 0x00002b9c9d92454c in KCal::Calendar::incidence (this=0x0,
> uid=@0x7fff11c15050)
> at /home/kde4/svn/_src/KDE/kdepimlibs/kcal/calendar.cpp:509
> #6 0x0000000000405eb9 in ICalResource::retrieveItem (this=0x759d00,
> item=@0x7913b8, parts=@0x7913c0)
> at
> /home/kde4/svn/_src/KDE/kdepim/akonadi/resources/ical/icalresource.cpp:60
> #7 0x00002b9c99346091 in Akonadi::ResourceBase::qt_metacall
> (this=0x759d00, _c=QMetaObject::InvokeMetaMethod, _id=3,
_a=0x7fff11c15290)
> at /home/kde4/svn/_build/kdepimlibs/akonadi/resourcebase.moc:91
> #8 0x0000000000404e2d in ICalResource::qt_metacall (this=0x759d00,
> _c=QMetaObject::InvokeMetaMethod, _id=17, _a=0x7fff11c15290)
> at
> /home/kde4/svn/_build/kdepim/akonadi/resources/ical/icalresource.moc:71 #9
> 0x00002b9c99bdb4a7 in QMetaObject::activate (sender=0x791390,
> from_signal_index=7, to_signal_index=7, argv=0x7fff11c15290)
> at kernel/qobject.cpp:2998
> #10 0x00002b9c99bdb90b in QMetaObject::activate (sender=0x791390,
> m=0x2b9c99590100, local_signal_index=3, argv=0x7fff11c15290)
> at kernel/qobject.cpp:3071
> #11 0x00002b9c99347579 in Akonadi::ResourceScheduler::executeItemFetch (
> this=0x791390, _t1=@0x7913b8, _t2=@0x7913c0)
> at /home/kde4/svn/_build/kdepimlibs/akonadi/resourcescheduler.moc:117
> #12 0x00002b9c9934773e in Akonadi::ResourceScheduler::executeNext (
> this=0x791390)
> at /home/kde4/svn/_src/KDE/kdepimlibs/akonadi/resourcescheduler.cpp:112
> #13 0x00002b9c993479e4 in Akonadi::ResourceScheduler::qt_metacall (
> this=0x791390, _c=QMetaObject::InvokeMetaMethod, _id=7,
> _a=0x7fff11c153f0) at
> /home/kde4/svn/_build/kdepimlibs/akonadi/resourcescheduler.moc:87 #14
> 0x00002b9c99bdb4a7 in QMetaObject::activate (sender=0x6d87e0,
> from_signal_index=4, to_signal_index=4, argv=0x0)
> at kernel/qobject.cpp:2998
>
> fix;
>
> Index: kdepim/akonadi/resources/ical/icalresource.cpp
>
===================================================================
> --- kdepim/akonadi/resources/ical/icalresource.cpp (revision 804477)
> +++ kdepim/akonadi/resources/ical/icalresource.cpp (working copy)
> @@ -56,6 +56,12 @@
> {
> Q_UNUSED( parts );
> kDebug( 5251 ) << "Item:" << item.url();
> +
> + if ( !mCalendar ) {
> + emit error( i18n("Calendar not loaded!") );
> + return false;
> + }
> +
> const QString rid = item.remoteId();
> IncidencePtr incidence( mCalendar->incidence( rid )->clone() );
> if ( !incidence ) {
>
> ok to commit?
> _______________________________________________
> KDE PIM mailing list kde-pim at kde.org
> https://mail.kde.org/mailman/listinfo/kde-pim
> KDE PIM home page at http://pim.kde.org/
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list