GstBase.BaseParse.do_handle_frame() results in a 'mini_object != NULL' assertion
While experimenting with writing a parser in python (dummyparse.py) I get the following message when GstBase.BaseParse.do_handle_frame()
is called:
(gst-launch-1.0:28584): GStreamer-CRITICAL **: 12:58:24.009: gst_mini_object_ref: assertion 'mini_object != NULL' failed
I noticed (in another experiment) that the message does not show up if do_handle_frame()
returns Gst.FlowReturn.OK
without pushing any buffers.
The command line I am using is:
GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD \
gst-launch-1.0 fakesrc sizetype=fixed num-buffers=10 ! dummyparse ! fakesink
I tried looking where the issue comes from with:
G_DEBUG=fatal-criticals \
GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD \
gdb -ex run --args gst-launch-1.0 fakesrc sizetype=fixed num-buffers=10 ! dummyparse ! fakesink
And I get this trace:
#0 0x00007ffff7d87be5 in _g_log_abort (breakpoint=1) at ../../../glib/gmessages.c:554
#1 0x00007ffff7d88efd in g_logv
(log_domain=0x7ffff7f6d650 <g_log_domain_gstreamer> "GStreamer", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffff52876c0)
at ../../../glib/gmessages.c:1371
#2 0x00007ffff7d890cf in g_log
(log_domain=<optimized out>, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff7dd76bc "%s: assertion '%s' failed")
at ../../../glib/gmessages.c:1413
#3 0x00007ffff7d898f9 in g_return_if_fail_warning
(log_domain=<optimized out>, pretty_function=pretty_function@entry=0x7ffff7f7e170 <__func__.20440> "gst_mini_object_ref", expression=expression@entry=0x7ffff7f7deea "mini_object != NULL") at ../../../glib/gmessages.c:2762
#4 0x00007ffff7f08b72 in gst_mini_object_ref (mini_object=0x0) at ../subprojects/gstreamer/gst/gstminiobject.c:455
#5 0x00007ffff75012c2 in gst_buffer_ref (buf=<optimized out>) at ../subprojects/gstreamer/gst/gstbuffer.h:431
#6 0x00007ffff75012c2 in gst_base_parse_frame_copy (frame=0x555555986400) at ../subprojects/gstreamer/libs/gst/base/gstbaseparse.c:694
#7 0x00007ffff7cecb73 in g_boxed_copy (boxed_type=0x5555559ab270 [GstBaseParseFrame], src_boxed=0x555555986400) at ../../../gobject/gboxed.c:343
#8 0x00007ffff6a2b2ed in pygi_boxed_copy_in_place (self=0x7ffff544e108) at ../subprojects/pygobject/gi/pygi-boxed.c:219
#9 0x00007ffff6a30016 in pygi_marshal_cleanup_args_to_py_marshal_success (state=state@entry=0x7ffff5287900, cache=<optimized out>)
at ../subprojects/pygobject/gi/pygi-marshal-cleanup.c:156
#10 0x00007ffff6a2bb74 in _pygi_closure_handle (cif=<optimized out>, result=<optimized out>, args=<optimized out>, data=<optimized out>)
at ../subprojects/pygobject/gi/pygi-closure.c:589
#11 0x00007ffff78f26db in ffi_closure_unix64_inner () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#12 0x00007ffff78f2a56 in ffi_closure_unix64 () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#13 0x00007ffff75033b2 in gst_base_parse_handle_buffer
(parse=parse@entry=0x5555559a0e60 [dummyparse+DummyParse], buffer=<optimized out>, skip=skip@entry=0x7ffff5287c0c, flushed=flushed@entry=0x7ffff5287c10)
at ../subprojects/gstreamer/libs/gst/base/gstbaseparse.c:2202
#14 0x00007ffff75093ec in gst_base_parse_chain (pad=<optimized out>, parent=<optimized out>, buffer=<optimized out>)
at ../subprojects/gstreamer/libs/gst/base/gstbaseparse.c:3287
#15 0x00007ffff7f0efa2 in gst_pad_chain_data_unchecked (data=0x7ffff002b260, type=4112, pad=0x555555798310 [GstPad])
at ../subprojects/gstreamer/gst/gstpad.c:4326
#16 0x00007ffff7f0efa2 in gst_pad_push_data (pad=pad@entry=0x5555557980c0 [GstPad], type=type@entry=4112, data=data@entry=0x7ffff002b260)
at ../subprojects/gstreamer/gst/gstpad.c:4582
#17 0x00007ffff7f157a2 in gst_pad_push (pad=pad@entry=0x5555557980c0 [GstPad], buffer=0x7ffff002b260) at ../subprojects/gstreamer/gst/gstpad.c:4701
#18 0x00007ffff751fd25 in gst_base_src_loop (pad=0x5555557980c0 [GstPad]) at ../subprojects/gstreamer/libs/gst/base/gstbasesrc.c:2966
#19 0x00007ffff7f42981 in gst_task_func (task=0x5555559bd170 [GstTask]) at ../subprojects/gstreamer/gst/gsttask.c:328
#20 0x00007ffff7daacc3 in g_thread_pool_thread_proxy (data=<optimized out>) at ../../../glib/gthreadpool.c:307
#21 0x00007ffff7daa325 in g_thread_proxy (data=0x555555985140) at ../../../glib/gthread.c:784
#22 0x00007ffff7cc2fa3 in start_thread (arg=<optimized out>) at pthread_create.c:486
#23 0x00007ffff7bf389f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
I don't know enough to actually understand where the problem might be (if there is a problem).
The parser seems to work fine, the message is just distracting but I thought I'd report it anyway.
Thank you, Antonio