GstGL: Occasional assertion failures on GST_IS_GL_DISPLAY and GST_IS_GL_CONTEXT
Submitted by Petros
Link to original bug (#776540)
Description
Created attachment 342522
GST_DEBUG=*gl:6
I am experiencing some weird behavior related to the GstGL elements when trying to load videos in async mode ( i.e not blocking the pipeline until its pre-rolled ).
More specifically I occasionally get :
** (<unknown>
:65255): CRITICAL **: gst_gl_context_get_display: assertion 'GST_IS_GL_CONTEXT (context)' failed
** (<unknown>
:65255): CRITICAL **: gst_gl_display_get_handle_type: assertion 'GST_IS_GL_DISPLAY (display)' failed
(<unknown>
:65255): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed
(<unknown>
:65255): GStreamer-CRITICAL **: gst_object_unref: assertion 'object != NULL' failed
and / or
(<unknown>
:65255): GStreamer-CRITICAL **: invalid unclassed object pointer for value type 'GstGLDisplay'
These assertion failures show up in a non-consistent way and although the application most of the times will still continue properly there are other times where it will just fail an abort. What is interesting is that if I export GST_DEBUG=*gl:6 to try and observe what is happening the application will fail after some reloads with:
** (<unknown>
:64943): CRITICAL **: gst_gl_context_fill_info: assertion 'context->priv->active_thread == g_thread_self ()' failed
**
ERROR:gstglcontext.c:1252:gst_gl_context_create_thread: assertion failed: (error == NULL || *error != NULL)
Attached you can find the log output of such a failure configured with GST_DEBUG=*gl:6.
Again, this does not manifest if I block the pipeline until its pre-rolled .
I ve been seeing this behavior on both OS X and Linux but I m currently testing on OS X.
The player is playbin based and is located here :
https://github.com/PetrosKataras/Cinder/blob/master/src/cinder/linux/GstPlayer.cpp
with the relevant parts of initializing and setting the GL components :
https://github.com/PetrosKataras/Cinder/blob/master/src/cinder/linux/GstPlayer.cpp#L168-L193
https://github.com/PetrosKataras/Cinder/blob/master/src/cinder/linux/GstPlayer.cpp#L465-L503
https://github.com/PetrosKataras/Cinder/blob/master/src/cinder/linux/GstPlayer.cpp#L561-L585
I would really appreciate any clues on this..
Attachment 342522, "GST_DEBUG=*gl:6":
log.txt
Version: 1.10.2