Setting up slots on signals

Sebastian Dröge sebastian at centricular.com
Sun Mar 27 10:39:11 UTC 2016


On So, 2016-03-27 at 10:39 +0100, Russel Winder wrote:
> I am trying to set up callbacks for the tuning signals of a DVB
> pipeline in a playbin.
> [...]
> g_signal_connect(dvb_base_bin, "tuning-start",
> G_CALLBACK(start_callback), nullptr);
> [...]
> 	dvb_base_bin = source;
> 	g_assert(dvb_base_bin != nullptr);
> 
> 
> (me-tv:20984): GLib-GObject-WARNING **: instance with invalid (NULL)
> class pointer
> 
> (me-tv:20984): GLib-GObject-CRITICAL **: g_signal_connect_data:
> assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

This suggests that dvb_base_bin is not NULL (you check for that) but an
invalid pointer. Maybe you connect to the signals before source-setup
is called? Or you connect to the signals of the old dvbbasebin after
restarting playbin? It creates a new instance on every run, and you
don't take a strong reference there but just remember the reference
that is owned by playbin, so once playbin destroys it you'll have a
pointer pointing to some random memory.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160327/691ec554/attachment.sig>


More information about the gstreamer-devel mailing list