extragear/multimedia/amarok/src/collection/sqlcollection

Mark Kretschmann kretschmann at kde.org
Tue Jun 9 10:24:57 CEST 2009


On Mon, Jun 8, 2009 at 2:28 PM, Mark Kretschmann <kretschmann at kde.org> wrote:
> On Mon, Jun 8, 2009 at 1:10 PM, Jeff Mitchell <mitchell at kde.org> wrote:
>> Mark Kretschmann wrote:
>>> SVN commit 978819 by markey:
>>>
>>> Don't crash when starting a collection scan after a previous scan had
>>> been aborted.
>>>
>>> We destroyed the ScanManager instance when aborting the scan,
>>> and then never instantiated it again, ending up with a 0-pointer dereference.
>>> Now we reinstantiate the ScanManager automatically.
>>>
>>> This seems the safest way to fix this issue for now. I pondered
>>> refactoring the code to keep the ScanManager always alive, but this
>>> would require major changes and seemed too risky at this point.
>>
>> This seems like a drastic fix.
>>
>> Why not just call ScanManager::slotError if the scan is aborted?  This
>> is probably what aborting the scan should have done anyways, and as far
>> as I can tell it will properly reset the scan manager for next time
>> (since that's the point of the function).
>
> I tried several other approaches, but in the end they all had side
> effects and didn't work out. The solution I ended up with was the
> least drastic after all, with no side effects.
>
> If you can get your proposal to work, all the better. I'll be happy
> with whatever works :)

Ok, now that Jeff's new code is checked in, we're having side effects:
Amarok is crashing on exit after aborting a scan.

So that's possibly fixable with an additional check. And then maybe
another one. Which solution appears more drastic now? ;)

-- 
Mark Kretschmann
Amarok Developer
www.kde.org - amarok.kde.org


More information about the Amarok-devel mailing list