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 677436 - Crash in simple GstRtpSession clean up.
Crash in simple GstRtpSession clean up.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.11.x
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-05 06:48 UTC by Pascal Buhler
Modified: 2012-06-06 13:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pascal Buhler 2012-06-05 06:48:53 UTC
The following code crashes, it did not in 0.10:
===================================================  
GstElement * element;
GstPad * pad;
element = gst_element_factory_make ("rtpsession", NULL);
pad = gst_element_get_request_pad (element, "recv_rtcp_sink");
gst_object_unref (pad);
gst_object_unref (element);
====================================================

It seams that the automatic removal of pads in the gst_element_dispose functions is removing the sometimes pad "recv_rtp_src" before the requested pad is released, this leaves a dangling reference to recv_rtp_src inside of GstRtpSession. If the request pad is explicitly released in the the test then it does not crash. Not total sure on the expected behavior here.
Comment 1 Wim Taymans 2012-06-06 13:34:23 UTC
commit 6758e5f00d2c4aba67d517cfa0dba17e5029fc3b
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Wed Jun 6 15:29:49 2012 +0200

    element: fix pad cleanup in dispose
    
    In the dispose handler we first need to release all the request pads and then
    remove the remaining pads. This is because it is possible that releasing the
    request pad might also cleanly remove some of the other dynamic pads, like
    what rtpsession does.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=677436