Fwd: Unusual behaviour of taglib using threads.

Yogesh M yogeshm02 at gmail.com
Mon Apr 30 18:10:35 CEST 2007


On 30/04/07, William Pitcock <nenolod at atheme.org> wrote:
> This is a double free. You are probably calling delete on the same
> resource in both threads.
>
> You should set the resource to NULL (if it is a pointer), and then check
> to make sure that the resource is not NULL before calling delete on it. If
> you do this, you shouldn't encounter this problem.
>
> It is possible that TagLib has a bug, but as far as I know it is
> reentrant.
>
> - William
>
> On Mon, 30 Apr 2007, Yogesh M wrote:
>
> > ---------- Forwarded message ----------
> > From: Yogesh M <yogeshm02 at gmail.com>
> > Date: 30-Apr-2007 15:32
> > Subject: Unusual behaviour of taglib using threads.
> > To: "For discussion of multimedia (sound/video) issues under KDE"
> > <kde-multimedia at kde.org>
> >
> >
> > Hi
> >
> > I'm using taglib for reading tags from media files and having problem
> > in the following context:
> > Two threads are being used; one for reading tags for the playlist
> > (using taglib) and other for building media collection which also
> > reads tags using taglib. Both of the threads are entirely separate and
> > have no dependence on each other in any way.
> >
> > The problem is that when one thread is building meta collection
> > (lengthy affair ~ 1 min.) and I load a very large playlist (containing
> > ~  90% of the total media files), the program terminates (with SIGABRT)
> > and (interestingly) this is the point where both threads were
> > reading/had read tags from the same file.
> >
> > What can be the problem?
> >
> > --
> > Yogesh M
> > Chandigarh, India
> > http://mr-yogi.blogspot.com/
> >
> >
> >
> > --
> > Yogesh M
> > Chandigarh, India
> > http://mr-yogi.blogspot.com/
> >
> >
>
If both actions (threads) are done one-by-one then everything is fine.
Also, if I disable taglib code in my app. then there is no error.

-- 
Yogesh M
Chandigarh, India
http://mr-yogi.blogspot.com/


More information about the taglib-devel mailing list