[Nepomuk] Bug 317168 - soprano 2.9.1 incompatible with nepomuk 4.10.2

Simeon Bird bladud at gmail.com
Fri May 10 16:26:12 UTC 2013


You're brilliant! Fix confirmed.

Simeon

On 10 May 2013 11:15, Vishesh Handa <me at vhanda.in> wrote:
> Hey Simeon
>
> I debugged the issue and figured it out. It was bug in Soprano. Could you
> possibly test it?
>
> commit cb1ba2cb833940e00de29790284bf017938a7a09
> Author: Vishesh Handa <me at vhanda.in>
> Date:   Fri May 10 20:34:38 2013 +0530
>
>     ServerCore: Avoid using qDeleteAll for the connections
>
>     Each delete operation modifies the d->connections list. Therefore we
>     cannot use qDeleteAll as qDeleteAll internally uses iterators.
>
>     This was never a problem before because the connections were never
>     actually deleted because of a bug fixed by 5acc205e25e
>
> diff --git a/server/servercore.cpp b/server/servercore.cpp
> index fc4d462..1ef09f9 100644
> --- a/server/servercore.cpp
> +++ b/server/servercore.cpp
> @@ -73,7 +73,10 @@ Soprano::Server::ServerCore::~ServerCore()
>  #ifdef BUILD_DBUS_SUPPORT
>      delete d->dbusController;
>  #endif
> -    qDeleteAll( d->connections );
> +    // We avoid using qDeleteAll because d->connections is modified by each
> delete operation
> +    foreach(const Soprano::Server::ServerConnection* con, d->connections) {
> +        delete con;
> +    }
>      qDeleteAll( d->models );
>      delete d->modelPool;
>      delete d;
> @@ -181,7 +184,11 @@ bool Soprano::Server::ServerCore::listen( quint16 port
> )
>
>  void Soprano::Server::ServerCore::stop()
>  {
> -    qDeleteAll( d->connections );
> +    qDebug() << "Stopping and deleting";
> +    // We avoid using qDeleteAll because d->connections is modified by each
> delete operation
> +    foreach(const Soprano::Server::ServerConnection* con, d->connections) {
> +        delete con;
> +    }
>      qDeleteAll( d->models );
>
>      delete d->tcpServer;
>
>
> I still haven't pushed it. It fixes the crash for me. Once you confirm, I'll
> release Soprano 2.9.2 with this patch.
>
>
>
> On Thu, May 9, 2013 at 9:28 AM, Simeon Bird <bladud at gmail.com> wrote:
>>
>> >> We could just revert that commit (which is only needed for master) and
>> >> re-release soprano 2.9.2, I suppose. And then re-release another
>> >> soprano version with the commit when 4.11 is released.
>> >
>> >
>> > My bad. I shouldn't have put that patch in Soprano 2.9.1. I was hoping
>> > to
>> > only have to do the release once for the next six months since I do not
>> > see
>> > any other changes that will be required in Soprano for 4.11
>> >
>> > I think the only possible solution is to release a new Soprano version
>> > (2.9.2?) with the reverted patch. Though maybe KDE/4.10 would be the
>> > correct
>> > place to fix this .. hmm.
>>
>> Yeah, 2.9.2 with the revert sounds good. Thinking about it, any
>> KDE/4.10 fix would be a hack - plus it would have to wait a full month
>> and would only be in use for one minor version, so it doesn't seem
>> worth the effort
>>
>> Simeon
>
>
>
>
> --
> Vishesh Handa


More information about the Nepomuk mailing list