Segmentation Fault

Krzysztof Konopko krzysztof.konopko at youview.com
Sat Jan 5 03:53:07 PST 2013


Hi Ian,

To me the caps value passed as a constant (a literal) looks suspicious.
Try something like this:

gchar caps_value[] = "your value goes here";

and then

g_object_set (G_OBJECT (vcapsfilter), "caps", caps_value, NULL);

That's just my guess as OTH passing a literal value should result in a
pointer pointing to some location in the DATA section which should be
fine. Hm...

To find out what actually happened use:

gdb --core=<core file> <your app>

and then in GDB:
bt

If you don't actually get a core file, use (before you run your crashing
app):
ulimit -c unlimited

HTH,
Kris

On 05/01/13 09:12, Ian Davidson wrote:
> I am trying to write a GStreamer app where I  use a caps filter.  I have
> 
>   vcapsfilter  = gst_element_factory_make ("capsfilter", "vid-caps");
> 
> which appears to have been successful.
> 
> Then I tried
> 
>   g_object_set (G_OBJECT (vcapsfilter), "caps",
> "video/x-raw,format=(string)I420,width=320,height=240,framerate=(fraction)25/1",
> NULL);
> 
> When my program comes to execute that line I get a "Segmentation fault
> (core dumped)" message.  I suspect that I must be doing something wrong
> <grin>, but I don't know what I should be doing.  I have tried to wind
> up the debug level to 9 but absolutely nothing gets logged.
> 
> Ian



More information about the gstreamer-devel mailing list