[gst-devel] plugin loader segfault handler

Thomas Vander Stichele thomas at apestaart.org
Mon Dec 15 08:43:15 CET 2003


El lun, 15-12-2003 a las 17:11, Benjamin Otte escribió:
> Is it possible to put the segfault handler into gst-register.c somehow or
> is that not possible because gst-register doesn't know which plugin is
> currently loaded?

Not without adding hooks everywhere for passing them, no.

> I'd prefer not to have signal handlers in a lib, so if there's a way
> around that...

I felt the same, but the it is activated and deactivated right before
and after the actual loader call, so it can't get in the way of anything
else.  If it ever does, you can use the commandline option, and in those
cases, we can work out how to do it.  I didn't feel it was worth it to
start breaking API's just for getting this feature in.

Thomas

> Benjamin
> 
> 
> On Mon, 15 Dec 2003, Thomas Vander Stichele wrote:
> 
> > Hey,
> >
> > lately xvid is throwing segfaults at me while loading plugins.  Ronald
> > said he saw the same.
> >
> > Anyway, I got fed up with the fact that gst-register segfaults.  This is
> > the one thing that isn't supposed to segfault :)
> >
> > So, I implemented a trapper in gstplugin.c, which gets turned on and off
> > for each plugin around loading.  It's probably not reentrant and
> > whatever but I don't think that matters much in this case, or is at all
> > possible.
> >
> > You can run any app with --gst-enable-segfault to disable this trapper
> > so you can still debug segfaults on loading when they happen.
> >
> > But in the general case, it will print out a nice message on what to do
> > if this happens, and that's the important thing.
> >
> > If this breaks anything, let me know.  I'm specifically interested in
> > cases where the filename it prints out for the offending plugin is
> > garbled.
> >
> > Thanks
> > Thomas
> >
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: SF.net Giveback Program.
> > Does SourceForge.net help you be more productive?  Does it
> > help you create better code?  SHARE THE LOVE, and help us help
> > YOU!  Click Here: http://sourceforge.net/donate/
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >





More information about the gstreamer-devel mailing list