I occasionally found a very simple way to reproduce this issue.
There were 8 caps provided to nvvidconv.
Please try this pipeline:
GST_DEBUG=5 gst-launch-1.0 videotestsrc ! nvvidconv ! nv3dsink
And you will see following trace:
0:00:00.648920749 12694 0x558df460f0 DEBUG basetransform gstbasetransform.c:1165:gst_base_transform_find_transform: calling fixate_caps for video/x-raw, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)[ 1/2147483647, 2147483647/1 ], interlace-mode=(string)progressive, format=(string)RGBA; video/x-raw, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)[ 1/2147483647, 2147483647/1 ], interlace-mode=(string)progressive, format=(string)BGRx; video/x-raw, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)[ 1/2147483647, 2147483647/1 ], interlace-mode=(string)progressive, format=(string)I420; video/x-raw, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)[ 1/2147483647, 2147483647/1 ], interlace-mode=(string)progressive, format=(string)NV12; video/x-raw, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)[ 1/2147483647, 2147483647/1 ], interlace-mode=(string)progressive, format=(string)Y42B; video/x-raw(memory:NVMM), width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)[ 1/2147483647, 2147483647/1 ], interlace-mode=(string)progressive, format=(string)NV12; video/x-raw(memory:NVMM), width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)[ 1/2147483647, 2147483647/1 ], interlace-mode=(string)progressive, format=(string)I420; video/x-raw(memory:NVMM), width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)30/1, multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)[ 1/2147483647, 2147483647/1 ], interlace-mode=(string)progressive, format=(string)RGBA using caps video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)30/1, multiview-mode=(string)mono, format=(string)RGBA, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive on pad nvvconv0:src
(gst-launch-1.0:12694): GLib-CRITICAL **: 18:33:42.415: g_array_remove_index: assertion ‘index_ < array->len’ failed
(gst-launch-1.0:12694): GStreamer-CRITICAL **: 18:33:42.415: gst_caps_remove_structure: assertion ‘idx <= gst_caps_get_size (caps)’ failed
(gst-launch-1.0:12694): GStreamer-CRITICAL **: 18:33:42.415: gst_caps_remove_structure: assertion ‘idx <= gst_caps_get_size (caps)’ failed
(gst-launch-1.0:12694): GStreamer-CRITICAL **: 18:33:42.415: gst_structure_set_parent_refcount: assertion ‘refcount != NULL’ failed
(gst-launch-1.0:12694): GStreamer-CRITICAL **: 18:33:42.415: gst_caps_features_set_parent_refcount: assertion ‘refcount != NULL’ failed
free(): invalid pointer
And I also tried my fix.
No such issue met.