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 638599 - GST_PTR_FORMAT causes crashes if GLib-internal printf is used but system provides register_printf_specifier
GST_PTR_FORMAT causes crashes if GLib-internal printf is used but system prov...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: High critical
: 0.10.32
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-03 19:42 UTC by Jesse
Modified: 2011-01-04 17:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jesse 2011-01-03 19:42:54 UTC
The debug output for dfbvideosink causes a segmentation fault. It seems the format string is incorrect.

line 1224 ->  GST_DEBUG_OBJECT (dfbvideosink, "returning our caps %" GST_PTR_FORMAT, caps);

should probably be ->  GST_DEBUG_OBJECT (dfbvideosink, "returning our caps %s" GST_PTR_FORMAT, caps);

There also seems to be problems at lines 217, 901, 924, 1157, 1256, 1700, 1773, and 1777
Comment 1 Jesse 2011-01-03 19:44:39 UTC
the file is ext/directfb/dfbvideosink.c by the way
Comment 2 Edward Hervey 2011-01-03 19:58:34 UTC
That code is valid (GST_PTR_FORMAT will expand to the proper formatter).

Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 3 Jesse 2011-01-03 20:33:02 UTC
here is the backtrace from gdb

  • #0 strlen
    from /lib/libc.so.6
  • #1 _g_gnulib_vasnprintf
    at vasnprintf.c line 579
  • #2 _g_gnulib_vasprintf
    at printf.c line 144
  • #3 IA__g_vasprintf
    at gprintf.c line 307
  • #4 IA__g_strdup_vprintf
    at gstrfuncs.c line 218
  • #5 IA__g_printerr
    at gmessages.c line 1029
  • #6 gst_debug_log_default
    at gstinfo.c line 903
  • #7 gst_debug_log_valist
    at gstinfo.c line 492
  • #8 gst_debug_log
    at gstinfo.c line 439
  • #9 gst_dfbvideosink_getcaps
    at dfbvideosink.c line 1229
  • #10 gst_base_sink_pad_getcaps
    at gstbasesink.c line 512
  • #11 gst_pad_get_caps_unlocked
    at gstpad.c line 2122
  • #12 gst_pad_link_prepare
    at gstpad.c line 1773
  • #13 gst_pad_link
    at gstpad.c line 2009
  • #14 gst_ghost_pad_set_target
    at gstghostpad.c line 1208
  • #15 gst_ghost_pad_new
    at gstghostpad.c line 1036
  • #16 gen_video_chain
    at gstplaysink.c line 1060
  • #17 gst_play_sink_reconfigure
    at gstplaysink.c line 1935
  • #18 no_more_pads_cb
    at gstplaybin2.c line 2285
  • #19 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 79
  • #20 IA__g_closure_invoke
    at gclosure.c line 767
  • #21 signal_emit_unlocked_R
    at gsignal.c line 3244
  • #22 IA__g_signal_emit_valist
    at gsignal.c line 2977
  • #23 IA__g_signal_emit
    at gsignal.c line 3034
  • #24 IA__g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 79
  • #25 IA__g_closure_invoke
    at gclosure.c line 767
  • #26 signal_emit_unlocked_R
    at gsignal.c line 3244
  • #27 IA__g_signal_emit_valist
    at gsignal.c line 2977
  • #28 IA__g_signal_emit
    at gsignal.c line 3034
  • #29 gst_decode_group_expose
    at gstdecodebin2.c line 2246
  • #30 source_pad_blocked_cb
    at gstdecodebin2.c line 2509
  • #31 handle_pad_block
    at gstpad.c line 3852
  • #32 gst_pad_push_event
    at gstpad.c line 4795
  • #33 gst_pad_send_event
    at gstpad.c line 4962
  • #34 gst_pad_push_event
    at gstpad.c line 4818
  • #35 mfw_gst_vpudec_sink_event
    at mfw_gst_vpu_decoder.c line 3473
  • #36 gst_pad_send_event
    at gstpad.c line 4962
  • #37 gst_pad_push_event
    at gstpad.c line 4818
  • #38 gst_multi_queue_loop
    at gstmultiqueue.c line 829
  • #39 gst_task_func
    at gsttask.c line 234
  • #40 default_func
    at gsttaskpool.c line 70
  • #41 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #42 g_thread_create_proxy
    at gthread.c line 635
  • #43 start_thread
    from /lib/libpthread.so.0
  • #44 clone
    from /lib/libc.so.6

Comment 4 Tim-Philipp Müller 2011-01-04 00:58:26 UTC
That looks like GStreamer core was built against a libc that supports printf format extensions (e.g. *glibc) (hence GST_PTR_FORMAT is defined to "P" not "p"), but then for some reason GLib's internal printf is used instead of the system one with the extension.

This should fix it:

 commit 98900a43c1964f5fd37e80e5f45518bbe875413b
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Tue Jan 4 00:48:15 2011 +0000

    gstinfo: don't use printf extensions if GLib isn't using the system printf
    
    Might help with https://bugzilla.gnome.org/show_bug.cgi?id=638599

Please re-open if it's still a problem with that patch (after recompiling the directfb plugin as well).
Comment 5 Jesse 2011-01-04 17:02:48 UTC
That seems to fix the problem. Thanks!
Comment 6 Tim-Philipp Müller 2011-01-04 17:07:20 UTC
Thanks for confirming.