Skip to content

tracers: leaks: never handle null object type

When my CPU is heavily loaded, I sometimes got false positive leaks reports like this:

0:00:01.258992015 35628 0x563bb2226900 TRACE             GST_TRACER :0:: object-alive, type-name=(string)(null), address=(gpointer)0x563bb22db820, description=(string)<sink>, ref-count=(uint)1, trace=(string);
0:00:01.259030064 35628 0x563bb2226900 TRACE             GST_TRACER :0:: object-refings, ts=(guint64)11948270, type-name=(string)(null), address=(gpointer)0x563bb22db820, description=(string)reffed, ref-count=(uint)4, trace=(string);
0:00:01.259038416 35628 0x563bb2226900 TRACE             GST_TRACER :0:: object-refings, ts=(guint64)1257284688, type-name=(string)(null), address=(gpointer)0x563bb22db820, description=(string)unreffed, ref-count=(uint)1, trace=(string);

(gst-launch-1.0:35628): GStreamer-WARNING **: 02:17:36.985: gst_mini_object_weak_unref: couldn't find weak ref 0x7f7f5a7d1450 (object:0x563bb22db820 data:0x563bb223ca00)

As you can see, type-name=(string)(null), meaning that g_type_name returned NULL (i.e. the object type was not loaded). This merge request propose to switch the lines if (object_type == 0) and if (!self->filter) in should_handle_object_type so that a null object type will never be reported by this tracer

Edited by Corentin Damman

Merge request reports