[Kde-pim] Review Request: Avoid unreported server startup in Akonadi KResource plugins
Volker Krause
vkrause at kde.org
Thu Feb 26 10:03:54 GMT 2009
> On 2009-02-25 06:25:22, Volker Krause wrote:
> > The extra ServerMananger::isRunning() check around Control::start() is not needed, Control::start() does the same internally already. Looks ok to me otherwise.
>
> Kevin Krammer wrote:
> The idea behind this check was to do this inside the calling thread and have QtConcurrency run the Akonadi::start() stuff.
> But of course the ServerManager::isRunning() is also using nested Eventloop as part of its blocking D-Bus calls.
>
> I started to experiement with that but first wanted some feedback on the general idea.
>
> Just calling Akonadi::start() from a worker thread lead to Qt warnings when both plugins (KABC and KCal) are used, e.g. in Kontact
>
Ah, I didn't realize this code was run in the worker thread. I don't think either ServerManager or Control are thread-safe. They use an internal singleton each, among other things for D-Bus operations.
- Volker
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/179/#review270
-----------------------------------------------------------
On 2009-02-25 05:38:03, Kevin Krammer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/179/
> -----------------------------------------------------------
>
> (Updated 2009-02-25 05:38:03)
>
>
> Review request for KDE PIM.
>
>
> Summary
> -------
>
> As reported here http://lists.kde.org/?t=123551507200002&r=1&w=2 the failure to start Akonadi server leaves applications using the compatibility kresource plugins in a broken state.
>
> This is an attempt to fix this, by trying the Akonadi start in the context of the plugin's "open" and reporting failure.
> The additional state tracking seems to be necessary as well, at least StdAddressBook or its subclass call load methods even on resource which failed at open.
>
>
> Diffs
> -----
>
> /trunk/KDE/kdepim/kresources/akonadi/kabc/resourceakonadi.cpp 931546
> /trunk/KDE/kdepim/kresources/akonadi/kcal/resourceakonadi.cpp 931546
>
> Diff: http://reviewboard.kde.org/r/179/diff
>
>
> Testing
> -------
>
> Tested with the usual KDEPIM apps, both with Akonadi server capable of starting and failing to start.
>
> When the server cannot start I get a crash in KMail when I close (and discard) the composer I used to check address completion with.
> The completion itself "works" (without addressbook entries it doesn't do anything, but it does not result in any error).
>
>
> Thanks,
>
> Kevin
>
>
_______________________________________________
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