Strange crash with KSharedPtr
Alex Merry
kde at randomguy3.me.uk
Wed Oct 15 00:16:36 CEST 2008
On Tuesday 14 October 2008 09:49:15 Mark Kretschmann wrote:
> Thread 1 (Thread 0x7fa0b8a3e7c0 (LWP 12280)):
> [KCrash Handler]
> #5 0x00007fa0c6a32e14 in QBasicAtomicInt::ref (this=0x200000001d) at
> /usr/include/qt4/QtCore/qatomic_x86_64.h:123
> #6 0x00007fa0c6a332a2 in KSharedPtr (this=0x7fffcfe8db10,
> o=@0xae70c0) at /home/mark/kde/include/ksharedptr.h:74
> Can't really make head nor tails of it. Ideas?
As I said on IRC, the only thing I can think of is that someone is converting
the ksharedptr to a bare pointer and deleting it.
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().
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/7cad1347/attachment.sig
More information about the Amarok-devel
mailing list