After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 779701 - Failure to build Basic tutorial example 5 code as-is
Failure to build Basic tutorial example 5 code as-is
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: documentation
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-03-07 12:33 UTC by Eduardas Meile
Modified: 2017-03-09 08:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Eduardas Meile 2017-03-07 12:33:52 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)
Comment 1 Sebastian Dröge (slomo) 2017-03-09 08:41:19 UTC
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