Tutorial 5 throws: GLib-GObject-CRITICAL **: 10:21:41.921: g_object_get: assertion 'G_IS_OBJECT (object)'

I am receiving a critical runtime error when running basic-tutorial5 (renamed tut5) using the documented compile options. Note: I pulled the most recent version of basic-tutorial5.c from the gitlab source tree.

Gstreamer version = 1.24.3
GTK+3 version = 3.24.1

gcc tut5.c -o tut5 `pkg-config --cflags --libs gstreamer-video-1.0 gtk+-3.0 gstreamer-1.0`


Could not create gtkglsink, falling back to gtksink.

(tut5:97859): GLib-GObject-CRITICAL **: 10:21:41.921: g_object_get: assertion 'G_IS_OBJECT (object)' failed

Not all elements could be created.

Can anyone assist?

Can you get a backtrace? G_DEBUG=fatal_criticals gdb -args ./path/to/the/basic-tutorial-5 then when it crashed, bt and share the output.

It comes from here

    g_printerr ("Could not create gtkglsink, falling back to gtksink.\n");

    videosink = gst_element_factory_make ("gtksink", "gtksink");
    g_object_get (videosink, "widget", &data.sink_widget, NULL);  <---- videosink is NULL

You apparently don’t have the GTK3 sink installed.