Web lists-archives.org

Re: kded4 crash: favicons




On Tuesday 06 May 2008 09:13:09 Sergey Saukh wrote:
> Hello,
>
> While using konqueror, I've faced a annoynig problem - random kded4 crash.
> While investigating further I've found that it crashes because of
> kded_favicons module.
>
> In function "slotKill" QList<KIO::Job *> is cleared using qDeleteAll. While
> it's said to be a 99% safe, I think that it is that 1% when this algorithm
> leads to random crashes, because using "while.. delete" construction
> eliminates this problem.

I don't see how. You're replacing six for half a dozen.

Unless, of course, the KIO::Job destructor somehow recurses back into 
accessing d->killJobs's already deleted jobs.

For that, the following is also a solution:

   QList<KIO::Job *> copy = d->killJobs;
   d->killJobs.clear();
   qDeleteAll(copy);

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

Attachment: signature.asc
Description: This is a digitally signed message part.

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<