Crash on GStreamer < 1.16.1 when adding a non-GstAggregatorPad pad to GstAggregator subclasses
I'm writing a plugin that inherits from
Aggregator and it segfaults when running on the Jetson Nano (Jetpack, based on Ubuntu 18.04 - ARM arch) but not on my laptop (Ubuntu 20.04 - x86 arch).
When I run a simple pipeline with
gdb, the backtrace is not very explicit:
#0 0x0000007fb7d657a8 in g_slice_alloc () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0 #1 0x0000007fb7d65d44 in g_slice_alloc0 () at /usr/lib/aarch64-linux-gnu/libglib-2.0.so.0 #2 0x0000007fb7e3fbe0 in g_type_create_instance () at /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0 #3 0x0000007fb7e1f764 in () at /usr/lib/aarch64-linux-gnu/libgobject-2.0.so.0 #4 0x0000007fffffc538 in ()
I've been able to reproduce it with a minimal implementation of the aggregator and I put it here.
The funny thing is that it works when I run it with
valgrind, so it seems like it may be a race condition.
Am I missing something in my Aggregator implementation? If not, do you have an idea about how I can debug this?