GNOME Bugzilla – Bug 739323
Segfault in master_clock_advance_timelines
Last modified: 2021-06-10 11:31:33 UTC
In pitivi with GLib 2.42 and Gtk3.14, we can quite easily have segfault in clutter. A way to reproduce is to add a clip in the timeline then keep pressing the right arrow key to seek 0.50ms continously. It looks like a refcount issue. The stacktrace of the segfault looks like: (gdb) bt
+ Trace 234270
Ok, so I have invetigated it a bit and this is what I found: It happens when clutter_transition_stopped unrefs the timeline that is passed in, and it happens only in one case, when it fails. The difference causing that happening is because when it fails is transition->priv->remove_on_complete that has been set to True. That field is set to true because we previously reached:
+ Trace 234288
which means that clutter_scroll_actor_scroll_to_point has been called when the transition had not been set yet. The thing is that I do not see where we suposdely take a ref on the timeline in case we set_remove_on_complete to TRUE, and currently it looks like it is not done at all, so we end up with a refcount issue, leading to unrefing the already destroyed timeline (PropertyTransition) in that case.
Created attachment 289805 [details] [review] transition: Do not unref the timeline where we own no ref So unless I am missing something, we do not own any ref to the timeline in the stop signal virtual method so we should not unref it.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of clutter, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a ticket at https://gitlab.gnome.org/GNOME/clutter/-/issues/ Thank you for your understanding and your help.