GNOME Bugzilla – Bug 766703
glvideomixer: Using an invalid, already destroyed context
Last modified: 2016-05-25 08:31:22 UTC
GST_VALIDATE_SCENARIOS_PATH=/home/slomo/Projects/gstreamer/head/gst-devtools/validate/data/scenarios: GST_GL_XINITTHREADS=1 DISPLAY=:0 GST_VALIDATE_SCENARIO=play_15s /home/slomo/Projects/gstreamer/head/gst-devtools/validate/tools/gst-validate-1.0-debug glvideomixer sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50 name=_mixer ! deinterlace ! videoconvert ! 'fakesink' videotestsrc pattern=snow timestamp-offset=3000000000 ! 'video/x-raw,format=AYUV,width=640,height=480,framerate=(fraction)30/1' ! timeoverlay ! _mixer. videotestsrc pattern=smpte ! 'video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)10/1' ! timeoverlay ! _mixer. This fails with assertions every now and then: 0:00:00.405870420 22018 0x7fffdc004000 ERROR validate gst-validate-reporter.c:176:gst_validate_report_valist: <pipeline0> 2272 (critical) : g-log: We got a g_log critical issue : g_object_ref: assertion 'object->ref_count > 0' failed
+ Trace 236267
The only GL element here is glvideomixer, and nowhere in it I see any suspicious unreffing of the context. It might be inside libgstgl somewhere.
commit 061a157ef57df81dd1e87ae7a78cdcf94fd42be0 Author: Matthew Waters <matthew@centricular.com> Date: Tue May 24 23:39:27 2016 +1000 glvideomixer: fix race retrieving the GL context from the display _get_gl_context() can be called concurrently from either propose_allocation() or decide_allocation(). If it so happens that this happens at the same time, the check for whether we already had a GL context was outside the lock. Inside the lock and loop, the first thing that happens is that we unref the current GL context (if valid) as if there was a conflict adding it to the display. If the timing was unlucky, subsequent use of the GL context would be referencing an already unreffed GL context object resulting in a critical: g_object_ref: assertion 'object->ref_count > 0' failed https://bugzilla.gnome.org/show_bug.cgi?id=766703