Strange crash with KSharedPtr

Alex Merry kde at randomguy3.me.uk
Wed Oct 15 00:23:55 CEST 2008


On Tuesday 14 October 2008 23:16:36 Alex Merry wrote:
> Or it's being shared across threads.  The referencing and dereferencing
> should be thread-safe, but I don't think KSharedPtr as a whole is - it's
> possible for thread 1 to call track(), creating a new Meta::TrackPtr, but
> thread 2 to cause the last remaining Meta::TrackPtr for this track to be
> dereferenced (hence deleting the Meta::Track) before thread 1 gets around
> to calling
> Meta::Track::ref().

I should say that I doubt it is a threading issue, because it's quite a tight 
race condition, so I wouldn't expect it to happen so regularly.

Alex


-- 
Proud KDE hacker: http://www.kde.org
Get KDE 4.1 - out now!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20081014/5f683a2f/attachment.sig 


More information about the Amarok-devel mailing list