SVN commit 795563 by mkretz: backport 795562: fix race condition: ~/KDE/src/playground-multimedia/phonon/phonon-pcmio/platform_kde - if a FileJob reached the end - then the backend requests a seek - then the result signal is delivered - the job was cleaned up, but the seek would never finish M +9 -2 kiomediastream.cpp --- trunk/KDE/kdelibs/phonon/platform_kde/kiomediastream.cpp #795562:795563 @@ -134,11 +134,10 @@ Q_ASSERT(d->kiojob); kDebug(600) << position << " = " << qulonglong(position); d->seeking = true; + d->seekPosition = position; if (d->open) { KIO::FileJob *filejob = qobject_cast(d->kiojob); filejob->seek(position); - } else { - d->seekPosition = position; } } @@ -194,7 +193,15 @@ } // go to ErrorState - NormalError q->error(NormalError, kioErrorString); + } else if (seeking) { + open = false; + kiojob = 0; + endOfDataSent = false; + reading = false; + q->reset(); + return; } + open = false; kiojob = 0; kDebug(600) << "KIO Job is done (will delete itself) and d->kiojob reset to 0"; endOfDataSent = true;