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 683996 - [0.11] Tries to look inside a pointer that is no longer held
[0.11] Tries to look inside a pointer that is no longer held
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal blocker
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-14 00:14 UTC by Olivier Crête
Modified: 2012-09-14 00:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Olivier Crête 2012-09-14 00:14:22 UTC
This is after the send_event, so the pointer is no longer valid, so can't use GST_PTR_FORMAT as that will try to follow the pointer, can only use plain %p. 

Causes crash in some tests.

diff --git a/gst/gstpad.c b/gst/gstpad.c
index b07fc4b..86f866c 100644
--- a/gst/gstpad.c
+++ b/gst/gstpad.c
@@ -4481,7 +4481,7 @@ gst_pad_push_event_unchecked (GstPad * pad, GstEvent * event,
   /* Note: we gave away ownership of the event at this point but we can still
    * print the old pointer */
   GST_LOG_OBJECT (pad,
-      "sent event %" GST_PTR_FORMAT " to peerpad %"
+      "sent event %p to peerpad %"
       GST_PTR_FORMAT ", ret %s", event, peerpad, gst_flow_get_name (ret));
 
   gst_object_unref (peerpad);
Comment 1 Tim-Philipp Müller 2012-09-14 00:33:07 UTC
Thanks, nice catch. Just ran into that but didn't notice it :)


commit bc5cc2eb0707bbdbebb17b4220322061a4114ed3
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Fri Sep 14 01:28:46 2012 +0100

    pad: don't try to pretty-print event after we've given away ownership
    
    Might cause crashes with debug logging enabled.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683996