GNOME Bugzilla – Bug 779701
Failure to build Basic tutorial example 5 code as-is
Last modified: 2017-03-09 08:41:19 UTC
There is probably an error in the basic tutorial 5 source code on this page: https://gstreamer.freedesktop.org/documentation/tutorials/basic/toolkit-integration.html There are three lines that have double commas: controls = gtk_box_new (GTK_ORIENTATION_HORIZONTAL,, 0); main_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL,, 0); main_box = gtk_box_new (GTK_ORIENTATION_VERTICAL,, 0); From the GTK+ 3 documentation it is apparent that gtk_box_new only takes two arguments: https://developer.gnome.org/gtk3/stable/GtkBox.html#gtk-box-new When the lines are edited only to have one comma each, I can get the example to build on Ubuntu 14.04, but get a runtime error: State set to READY (main:13018): Gtk-WARNING **: drawing failure for widget `GtkDrawingArea': NULL pointer *** Error in `./main': double free or corruption (fasttop): 0x00000000012cdd00 *** Aborted (core dumped) On Antergos (Arch Linux) running in a VirtualBox VM I also get a runtime error after building the code with the commas corrected: State set to READY (main:1137): Gtk-WARNING **: drawing failure for widget 'GtkDrawingArea': NULL pointer (main:1137): Gtk-WARNING **: drawing failure for widget 'GtkBox': NULL pointer (main:1137): Gtk-WARNING **: drawing failure for widget 'GtkBox': NULL pointer (main:1137): Gtk-WARNING **: drawing failure for widget 'GtkWindow': NULL pointer main: cairo.c:305: cairo_destroy: Assertion `CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&cr->ref_count)' failed. Aborted (core dumped)
Thanks for reporting! You probably want to use gtkglsink instead though, should update the code to use that at some point. commit 4752e9b45adeff2be3a465ba4a69385dc5877669 Author: Sebastian Dröge <sebastian@centricular.com> Date: Thu Mar 9 10:40:14 2017 +0200 basic/toolkit-integration: Bring in sync with the actual source code again Fixes syntax errors, a double free and others. https://bugzilla.gnome.org/show_bug.cgi?id=779701