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 793874 - Fixing ges_layer_get_clips_in_interval(start, end) function inside ges-layer.c
Fixing ges_layer_get_clips_in_interval(start, end) function inside ges-layer.c
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-editing-services
unspecified
Other Linux
: Normal normal
: 1.12.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-02-27 09:45 UTC by Harish Fulara
Modified: 2018-02-27 13:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixing ges_layer_get_clips_in_interval(start, end) function (1.34 KB, patch)
2018-02-27 10:01 UTC, Harish Fulara
committed Details | Review

Description Harish Fulara 2018-02-27 09:45:14 UTC
There is a bug inside **GList * ges_layer_get_clips_in_interval (GESLayer * layer, GstClockTime start, GstClockTime end)** function that makes pitivi close unexpectedly - https://gitlab.gnome.org/GNOME/pitivi/issues/2155
Comment 1 Harish Fulara 2018-02-27 09:47:15 UTC
BUG -> When we create a GList of intersecting clips, we directly insert the GESTimelineElement objects (rather than inserting their reference), but when we free up the GList we use **gst_object_unref** on every GList element's data, i.e., we decrement their reference count by 1. After 2 or 3 such calls, the reference count gets decremented to zero and the GESTimelineElment object is destroyed. Now when we try to access this object in Pitivi, we get a segfault and Pitivi crashes.
Comment 2 Harish Fulara 2018-02-27 10:01:18 UTC
Created attachment 368996 [details] [review]
Fixing ges_layer_get_clips_in_interval(start, end) function

When we create a GList of intersecting clips, we directly insert the GESTimelineElement objects (rather than inserting their reference), but when we free up the GList we use **gst_object_unref** on every GList element's data, i.e., we decrement their reference count by 1. After 2 or 3 such calls, the reference count gets decremented to zero and the GESTimelineElment object is destroyed. Now when we try to access this object, we get a segfault.
Comment 3 Thibault Saunier 2018-02-27 13:08:47 UTC
Thanks for the patch! I rewrote a bit the commit message before merging to make it clearer.