GNOME Bugzilla – Bug 793874
Fixing ges_layer_get_clips_in_interval(start, end) function inside ges-layer.c
Last modified: 2018-02-27 13:39:03 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
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.
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.
Thanks for the patch! I rewrote a bit the commit message before merging to make it clearer.