GNOME Bugzilla – Bug 784486
imagefreeze: use after free in seek handler causes criticals
Last modified: 2017-07-03 19:46:19 UTC
Created attachment 354851 [details] Code for repoducing the bug Trying to seek on the imagefreeze element directly causes the following assertion (a.out:6575): GStreamer-CRITICAL **: gst_event_get_seqnum: assertion 'GST_IS_EVENT (event)' failed To reproduce compile and run the attached file. It needs a png file called test.png in the working directory I'm running 1.10.5 on gentoo. Running with G_DEBUG=fatal-warnings and gdb I get the following stack trace
+ Trace 237611
Looking at the source it seems that the cause of this is that a few lines prior to gst_event_get_seqnum getting called, gst_event_unref is called. Presumably gst_event_get_seqnum should occur before the unref. Seeking on a bin containing imagefreeze "fixes" the issue, presumably because the bin keeps it's own reference to the event.
Thanks for the bug report, this should fix it: commit d712a2f4b7e1705ac879aff30b11a807d88bdd54 (HEAD -> master) Author: Tim-Philipp Müller <tim@centricular.com> Date: Mon Jul 3 20:27:29 2017 +0100 imagefreeze: fix use-after-free on seek event Get seqnum before unreffing the seek event. https://bugzilla.gnome.org/show_bug.cgi?id=784486