Re: [PATCH] [media-source] Add test to prevent segfault on browse_result_relay_cb



El vie, 14-05-2010 a las 11:19 +0200, Joaquim Rocha escribió:
> Hi,
> 
> On Fri, 2010-05-14 at 10:57 +0200, Iago Toral Quiroga wrote:
> > Hi Joaquim,
> > 
> > thanks for the bug report. 
> > 
> > Checking out your patch I am a bit surprised, because that patch should
> > not be needed: browse_result_relay_cb should never be invoked with a
> > NULL source object. The source object is referenced (g_object_ref) when
> > a browse/search operation is started and unreferenced (g_object_unref)
> > when the operation is done (remaining==0 has been emitted by the
> > plugin). A plugin must not emit a new result after remaining=0 has been
> > sent, for that signals the end of the operation.
> > 
> > I can only think of these reasons for this to happen:
> > 
> > 1) A plugin is emitting results after sending remaining == 0.
> > 2) Someone is unreffing the source object somewhere twice.
> > 3) There is some other kind of memory management problem somewhere
> > 
> > The g_return_if_fail in your patch might prevent the segfault, but it is
> > masquerading the real problem.
> > 
> > I would appreciate if you can provide backtrace information extracted
> > from gdb and any info you can get on the "remaining" parameter being
> > passed on to the browse_result_cb when this problem happens. Probably it
> > is better if you attach this information and your patch to bugzilla.
> 
> Well, I installed the upstream version again and tested it and it no
> longer fails... o_0

upstream version of grilo, rygel-grilo or both?

> Could it be that some part of the Jamendo service was failing then and
> it ended up with some NULL source to be passed?

Maybe, can't say for sure since i don't know what version of the plugin
you were using.

> > 
> > Also, since this is only happening when using rygel-grilo I wonder if
> > the source of the problem might live there. Another issue might be
> > related to you using Python, since AFAIK, the introspection support for
> > Grilo is not stable yet.
> 
> I'm using Python but not the bindings, I'm using Rygel-Grilo.
> 

Mmm... then I guess you are using the D-Bus interface directly? you
should know that rygel-grilo includes a library to support the
implementation of clients without dealing with D-Bus directly, the idea
should be to use that.

> 
> So, now that I cannot test it anymore, what should we do?

If you cannot reproduce the bug with the upstream version I guess we can
assume it was fixed. If you see that popping up again then you can file
the bug in bugzilla.

Iago



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]