[Kde-pim] [PATCH] fix crash in akonaid ical resource

Kevin Krammer kevin.krammer at gmx.at
Thu Dec 25 11:48:01 GMT 2008


HI Aaron,

On Thursday 25 December 2008, Aaron J. Seigo wrote:
> hi...
>
> i discovered *cough* it's possible to end up with a calendar resource with
> no file associated with it. the ical resource doesn't like this and crashes
> when akonadi loads its resoures, particularly on line 114 of
> icalresource.cpp.

Known issue, though we don't know yet why it happens, i.e. why Akonadi server 
thinks that it deals with a fully operational resource while the resource 
itself is not properly "connected" to its storage yet.

> the attached patch fixes the crash, though i don't know if it's the
> preferred fix. seems sane to my eyes, however, as mCalendar can indeed be 0
> as that's its value in the ctor.

As a silent catch it hides the real problem.

Maybe as a Q_ASSERT followed by error logging and return?
Or just error logging and return?

> let me know if i should commit or not =)

I'd say out a kError() into the if's body and commit. Volker usually 
post-commit-reviews Akonadi changes anyway :)

> btw, the multi-process nature of akonadi is rather nice and robust in such
> situations. i've been wanting to do the same with dataengines in plasma,
> and i think i might take a crack at it in 4.3. this crash with akonadi
> really underlined the practical usefulness of the approach.

SOA for the win? ;)

> merry xmas to all ..

Have fun as well!

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20081225/89ee9cff/attachment.sig>
-------------- next part --------------
_______________________________________________
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