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 684970 - Don't register printf extension for %p when glib is not using system printf
Don't register printf extension for %p when glib is not using system printf
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
Other Linux
: Normal normal
: 1.0.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2012-09-27 14:58 UTC by Olivier Blin
Modified: 2012-09-27 23:00 UTC
See Also:
GNOME target: ---
GNOME version: ---

info: do not register printf extension for %p (#684970) (2.40 KB, patch)
2012-09-27 15:01 UTC, Olivier Blin
committed Details | Review

Description Olivier Blin 2012-09-27 14:58:31 UTC
When glib is not using system printf (for example because of cross-compiling), GST_PTR_FORMAT and GST_SEGMENT_FORMAT are treated as %p, and gstreamer registers printf extension for %p.

This makes the gst_debug_print_object() and gst_debug_print_segment() functions used for non-gstreamer pointers, which adds unwanted noise and might cause crashes.

For example, one of the printed buffers was:
"(UNKNOWN FORMAT) segment start=-8986651587677525817, stop=-8554493194617018172, last_stop=-8266075641072286327, duration=-4574732532129505147, 
applied_rate=-48436681163436340997291685650079652259319042717347306007053140329870037350394997846865381518445307426814439657062771779825257203634031670770196847698236380743907090556812267407477392563779785636276928602475251940303853479777526438859375605270275832111547881103749549026229834576222699343669305377030144,000000, flags=0x89ec458b, time=0:11:31.162663141, accum=1461167:52:39.316507976"

gstreamer should not register printf extension when GLIB_USING_SYSTEM_PRINTF is not set.
Comment 1 Olivier Blin 2012-09-27 15:01:23 UTC
Created attachment 225265 [details] [review]
info: do not register printf extension for %p (#684970)
Comment 2 Olivier Blin 2012-09-27 15:01:35 UTC
This also applies to the 1.0 branch.
Comment 3 Tim-Philipp Müller 2012-09-27 22:59:31 UTC

commit 4710b36bda0d94669423ec8f0c6aecaf65a289a2
Author: Olivier Blin <>
Date:   Thu Sep 27 16:59:04 2012 +0200

    info: do not register printf extension for %p
    This happened when glib was not using system printf, and caused the
    internal gstreamer printf extensions to be used for all %p printfs,
    causing crashes.