Skip to content

Initialize debug categories before usage

See e.g.

(gst-play-1.0:22373): GStreamer-CRITICAL **: 17:53:35.417: gst_debug_log_valist: assertion 'category != NULL' failed

Thread 1 "gst-play-1.0" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff7bc8885 in _g_log_abort (breakpoint=1) at ../../../glib/gmessages.c:554
554	../../../glib/gmessages.c: No such file or directory.
(gdb) bt
#0  0x00007ffff7bc8885 in _g_log_abort (breakpoint=1) at ../../../glib/gmessages.c:554
#1  0x00007ffff7bc9b8d in g_logv
    (log_domain=0x7ffff7e6f710 <g_log_domain_gstreamer> "GStreamer", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=args@entry=0x7ffffffef880) at ../../../glib/gmessages.c:1371
#2  0x00007ffff7bc9d5f in g_log
    (log_domain=<optimized out>, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7ffff7c1957c "%s: assertion '%s' failed") at ../../../glib/gmessages.c:1413
#3  0x00007ffff7bca559 in g_return_if_fail_warning
    (log_domain=<optimized out>, pretty_function=pretty_function@entry=0x7ffff7e7e0f0 <__func__.24731> "gst_debug_log_valist", expression=expression@entry=0x7ffff7e7d52e "category != NULL") at ../../../glib/gmessages.c:2767
#4  0x00007ffff7e01012 in gst_debug_log_valist
    (category=<optimized out>, level=<optimized out>, file=<optimized out>, function=<optimized out>, line=269, object=<optimized out>, format=0x7fffd70bea78 "Extractable type for id %s and wanted type %s is: %s", args=0x7ffffffef9f8)
    at ../subprojects/gstreamer/gst/gstinfo.c:563
#5  0x00007ffff7e0113b in gst_debug_log
    (category=<optimized out>, level=level@entry=GST_LEVEL_DEBUG, file=file@entry=0x7fffd70be9e0 "../subprojects/gst-editing-services/ges/ges-extractable.c", function=function@entry=0x7fffd70beae0 <__func__.38662> "ges_extractable_get_real_extractable_type_for_id", line=line@entry=269, object=object@entry=0x0, format=0x7fffd70bea78 "Extractable type for id %s and wanted type %s is: %s")
    at ../subprojects/gstreamer/gst/gstinfo.c:512
#6  0x00007fffd70825a8 in ges_extractable_get_real_extractable_type_for_id
    (type=type@entry=0x555556311900 [GESPitiviFormatter/GESFormatter/GInitiallyUnowned], id=id@entry=0x0)
    at ../subprojects/gst-editing-services/ges/ges-extractable.c:269
#7  0x00007fffd707ce1e in _check_and_update_parameters
    (extractable_type=extractable_type@entry=0x7ffffffefb58, id=id@entry=0x0, error=error@entry=0x7ffffffefb68)
    at ../subprojects/gst-editing-services/ges/ges-asset.c:182
#8  0x00007fffd707e493 in ges_asset_request (extractable_type=<optimized out>, 
    extractable_type@entry=0x555556311900 [GESPitiviFormatter/GESFormatter/GInitiallyUnowned], id=id@entry=0x0, error=error@entry=0x0)
    at ../subprojects/gst-editing-services/ges/ges-asset.c:1033
#9  0x00007fffd707b804 in _list_formatters (formatters=formatters@entry=0x55555576bb10, n_formatters=<optimized out>)
    at ../subprojects/gst-editing-services/ges/ges-formatter.c:539
#10 0x00007fffd707c570 in _init_formatter_assets () at ../subprojects/gst-editing-services/ges/ges-formatter.c:657
#11 0x00007fffd707cfa1 in ges_asset_cache_init_unlocked () at ../subprojects/gst-editing-services/ges/ges-asset.c:480
#12 0x00007fffd707fa6e in ges_asset_cache_init_unlocked () at ../subprojects/gst-editing-services/ges/ges-asset.c:492
#13 0x00007fffd707fa6e in _get_type_entries () at ../subprojects/gst-editing-services/ges/ges-asset.c:492
#14 0x00007fffd707fa6e in ges_list_assets (filter=0x555556311800 [GESFormatter/GInitiallyUnowned])
    at ../subprojects/gst-editing-services/ges/ges-asset.c:1403
#15 0x00007fffd70ed27c in ges_demux_get_sinkpad_caps () at ../subprojects/gst-editing-services/plugins/ges/gesdemux.c:83
#16 0x00007fffd70ed27c in ges_demux_class_init (self_class=<optimized out>)
    at ../subprojects/gst-editing-services/plugins/ges/gesdemux.c:194
#17 0x00007fffd70ed27c in ges_demux_class_intern_init (klass=<optimized out>)
    at ../subprojects/gst-editing-services/plugins/ges/gesdemux.c:65
#18 0x00007ffff7b4d3cb in type_class_init_Wm
    (pclass=0x5555562fd890 [g_type: GESBaseBin/GstBin/GstElement/GstObject/GInitiallyUnowned], node=0x555556310a60)
--Type <RET> for more, q to quit, c to continue without paging--
    at ../../../gobject/gtype.c:2232
#19 0x00007ffff7b4d3cb in g_type_class_ref
    (type=type@entry=0x555556310a60 [GESDemux/GESBaseBin/GstBin/GstElement/GstObject/GInitiallyUnowned]) at ../../../gobject/gtype.c:2947
#20 0x00007ffff7df69f4 in gst_element_register
    (plugin=plugin@entry=0x55555626ae70 [GstPlugin], name=name@entry=0x7fffd70ef007 "gesdemux", rank=rank@entry=256, type=0x555556310a60 [GESDemux/GESBaseBin/GstBin/GstElement/GstObject/GInitiallyUnowned]) at ../subprojects/gstreamer/gst/gstelementfactory.c:240
#21 0x00007fffd70ebae4 in plugin_init (plugin=0x55555626ae70 [GstPlugin]) at ../subprojects/gst-editing-services/plugins/ges/gesplugin.c:42
#22 0x00007ffff7e1daa5 in gst_plugin_register_func
    (user_data=0x0, desc=0x7fffd70f1d20 <gst_plugin_desc>, plugin=0x55555626ae70 [GstPlugin])
    at ../subprojects/gstreamer/gst/gstplugin.c:532
#23 0x00007ffff7e1daa5 in gst_plugin_register_func
    (plugin=0x55555626ae70 [GstPlugin], desc=0x7fffd70f1d20 <gst_plugin_desc>, user_data=0x0)
    at ../subprojects/gstreamer/gst/gstplugin.c:486
#24 0x00007ffff7e1fa0d in _priv_gst_plugin_load_file_for_registry
    (filename=filename@entry=0x555556301370 "/home/slomo/Projects/gstreamer/gst-build/build/subprojects/gst-editing-services/plugins/ges/libgstges.so", registry=0x555555579950 [GstRegistry], error=error@entry=0x0) at ../subprojects/gstreamer/gst/gstplugin.c:899
#25 0x00007ffff7e2c7d7 in gst_registry_scan_plugin_file
    (context=context@entry=0x7fffffff01b0, filename=filename@entry=0x555556301370 "/home/slomo/Projects/gstreamer/gst-build/build/subprojects/gst-editing-services/plugins/ges/libgstges.so", file_size=188768, file_mtime=1569934930)
    at ../subprojects/gstreamer/gst/gstregistry.c:1178
#26 0x00007ffff7e2dbf2 in gst_registry_scan_path_level
    (context=context@entry=0x7fffffff01b0, path=path@entry=0x55555559ef30 "/home/slomo/Projects/gstreamer/gst-build/build/subprojects/gst-editing-services/plugins/ges", level=level@entry=10) at ../subprojects/gstreamer/gst/gstregistry.c:1349
#27 0x00007ffff7e2dd76 in gst_registry_scan_path_internal
    (context=context@entry=0x7fffffff01b0, path=0x55555559ef30 "/home/slomo/Projects/gstreamer/gst-build/build/subprojects/gst-editing-services/plugins/ges") at ../subprojects/gstreamer/gst/gstregistry.c:1368
#28 0x00007ffff7e2f284 in scan_and_update_registry
    (write_changes=1, error=0x7fffffff01a8, registry_file=0x5555555980c0 "/home/slomo/Projects/gstreamer/gst-build/build/registry.dat", default_registry=0x555555579950 [GstRegistry]) at ../subprojects/gstreamer/gst/gstregistry.c:1612
#29 0x00007ffff7e2f284 in ensure_current_registry (error=0x7fffffff01a8) at ../subprojects/gstreamer/gst/gstregistry.c:1753
#30 0x00007ffff7e2f284 in gst_update_registry () at ../subprojects/gstreamer/gst/gstregistry.c:1830
#31 0x00007ffff7dc6048 in init_post (context=<optimized out>, group=<optimized out>, data=<optimized out>, error=<optimized out>)
    at ../subprojects/gstreamer/gst/gst.c:803
#32 0x00007ffff7dc6048 in init_post (context=<optimized out>, group=<optimized out>, data=<optimized out>, error=<optimized out>)
    at ../subprojects/gstreamer/gst/gst.c:646
#33 0x00007ffff7bcf348 in g_option_context_parse
    (context=<optimized out>, argc=<optimized out>, argv=<optimized out>, error=<optimized out>) at ../../../glib/goption.c:2165
#34 0x0000555555558d2a in main (argc=<optimized out>, argv=<optimized out>) at ../subprojects/gst-plugins-base/tools/gst-play.c:1493

CC @thiblahute

Merge request reports