GNOME Bugzilla – Bug 118085
gst_init_check doesn't fully initialise GStreamer when it finds an option it doesn't recognise
Last modified: 2004-12-22 21:47:04 UTC
When using gst_init_check and passing an option that GStreamer doesn't know about, many weird and wonderful errors are presented, and then the application crashes. It looks like they are deep GStreamer problems (like the registery hasn't been loaded or something) [iain@discomachinegun marlin]$ src/marlin --sync Error on option --sync: unknown option. Run 'lt-marlin --help' to see a full list of available command line options. Opening /tmp/untitled.3ObAFC Opening /tmp/untitled.DlMYzo (lt-marlin:5644): GLib-GObject-WARNING **: invalid (NULL) pointer instance (lt-marlin:5644): GLib-GObject-CRITICAL **: file gsignal.c: line 1604 (g_signal_connect_data): assertion `G_TYPE_CHECK_INSTANCE (instance)' failed ** (lt-marlin:5644): WARNING **: Specified empty bin "bin", not allowed ** (lt-marlin:5644): WARNING **: Unrecoverable syntax error while parsing pipeline DEBUG: gstgconf: error parsing pipeline osssink No element "osssink" ** (lt-marlin:5644): WARNING **: No GConf default audio sink key and osssink doesn't work (lt-marlin:5644): GLib-GObject-WARNING **: invalid (NULL) pointer instance (lt-marlin:5644): GLib-GObject-CRITICAL **: file gsignal.c: line 1604 (g_signal_connect_data): assertion `G_TYPE_CHECK_INSTANCE (instance)' failed (lt-marlin:5644): GLib-GObject-CRITICAL **: file gtype.c: line 1901 (g_type_register_static): assertion `parent_type > 0' failed (lt-marlin:5644): GLib-GObject-CRITICAL **: file gobject.c: line 751 (g_object_new): assertion `G_TYPE_IS_OBJECT (object_type)' failed (lt-marlin:5644): GStreamer-CRITICAL **: file gstobject.c: line 464 (gst_object_set_name): assertion `object != NULL' failed (lt-marlin:5644): GStreamer-CRITICAL **: file gstobject.c: line 464 (gst_object_set_name): assertion `object != NULL' failed (lt-marlin:5644): GLib-GObject-WARNING **: invalid (NULL) pointer instance (lt-marlin:5644): GLib-GObject-CRITICAL **: file gsignal.c: line 1604 (g_signal_connect_data): assertion `G_TYPE_CHECK_INSTANCE (instance)' failed (lt-marlin:5644): GStreamer-CRITICAL **: file gstbin.c: line 458 (gst_bin_add): assertion `GST_IS_BIN (bin)' failed (lt-marlin:5644): GStreamer-CRITICAL **: file gstbin.c: line 458 (gst_bin_add): assertion `GST_IS_BIN (bin)' failed (lt-marlin:5644): GStreamer-CRITICAL **: file gstbin.c: line 458 (gst_bin_add): assertion `GST_IS_BIN (bin)' failed (lt-marlin:5644): GStreamer-CRITICAL **: file gstelement.c: line 1434 (gst_element_link_pads_filtered): assertion `GST_IS_ELEMENT (src)' failed (lt-marlin:5644): GLib-GObject-CRITICAL **: file gobject.c: line 1220 (g_object_set): assertion `G_IS_OBJECT (object)' failed (lt-marlin:5644): GStreamer-CRITICAL **: file gstelement.c: line 1020 (gst_element_get_pad): assertion `element != NULL' failed libmarlin-ERROR **: file marlin-play-pipeline.c: line 116 (connect_pipeline): assertion failed: (srcpad != NULL) aborting...
As ^iain^ and I talked about on IRC, gst_init() should behave as similar to gtk_init() as possible, unless there is a compelling reason to be different. In particular, gtk_init() survives options that it doesn't recognize.
Apart from that (which probably is to continue init parsing when an unknown argument is encountered), you are supposed to check the return value from gst_init_check, which probably was a big fat FALSE which means GStreamer wasn't initialized correctly.
iain, shall we close this bug then ?
sure, if you want...