[Bug 797355] New: overlaycomposition: Example crashes

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Oct 30 09:59:44 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=797355

            Bug ID: 797355
           Summary: overlaycomposition: Example crashes
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: philn at igalia.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

I can reproduce this only on my laptop it seems. This code patch is executed:

https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst/overlaycomposition/gstoverlaycomposition.c#n376

Which means a second glbufferpool is created, without the video meta option. So
buffers created have no video meta attached and this crash happens:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  gst_gl_composition_overlay_add_transformation (video_buffer=0x7f412d5a06ae,
overlay=0x559a435852b0) at
../subprojects/gst-plugins-base/gst-libs/gst/gl/gstgloverlaycompositor.c:265
265      rel_x = (float) comp_x / (float) width;
[Current thread is 1 (Thread 0x7f411bfff700 (LWP 5994))]
(gdb) bt
#0  0x00007f412c468aa8 in gst_gl_composition_overlay_add_transformation
(video_buffer=0x7f412d5a06ae, overlay=0x559a435852b0 [GstGLCompositionOverlay])
    at
../subprojects/gst-plugins-base/gst-libs/gst/gl/gstgloverlaycompositor.c:265
#1  0x00007f412c468aa8 in gst_gl_composition_overlay_upload
(overlay=overlay at entry=0x559a435852b0 [GstGLCompositionOverlay],
buf=buf at entry=0x559a43573790)
    at
../subprojects/gst-plugins-base/gst-libs/gst/gl/gstgloverlaycompositor.c:388
#2  0x00007f412c469385 in gst_gl_overlay_compositor_upload_overlays
(compositor=0x7f411002e040 [GstGLOverlayCompositor], buf=0x559a43573790)
    at
../subprojects/gst-plugins-base/gst-libs/gst/gl/gstgloverlaycompositor.c:680
#3  0x00007f412c4bfa95 in prepare_next_buffer
(glimage_sink=glimage_sink at entry=0x559a43587200 [GstGLImageSink]) at
../subprojects/gst-plugins-base/ext/gl/gstglimagesink.c:1630
#4  0x00007f412c4c1291 in gst_glimage_sink_prepare (bsink=<optimized out>,
buf=0x559a43573790) at
../subprojects/gst-plugins-base/ext/gl/gstglimagesink.c:1731
#5  0x00007f412cde0065 in gst_base_sink_do_preroll
(sink=sink at entry=0x559a43587200 [GstGLImageSink], obj=obj at entry=0x559a43573790)
at ../subprojects/gstreamer/libs/gst/base/gstbasesink.c:2446
#6  0x00007f412cde1fee in gst_base_sink_chain_unlocked
(basesink=basesink at entry=0x559a43587200 [GstGLImageSink],
obj=obj at entry=0x559a43573790, is_list=is_list at entry=0, pad=<optimized out>)
    at ../subprojects/gstreamer/libs/gst/base/gstbasesink.c:3589
#7  0x00007f412cde3380 in gst_base_sink_chain_main (basesink=0x559a43587200
[GstGLImageSink], pad=<optimized out>, obj=0x559a43573790, is_list=0) at
../subprojects/gstreamer/libs/gst/base/gstbasesink.c:3778
#8  0x00007f412d541a92 in gst_pad_chain_data_unchecked (data=0x559a43573790,
type=4112, pad=0x559a43582290 [GstPad]) at
../subprojects/gstreamer/gst/gstpad.c:4318
#9  0x00007f412d541a92 in gst_pad_push_data (pad=pad at entry=0x559a43582040
[GstPad], type=type at entry=4112, data=data at entry=0x559a43573790) at
../subprojects/gstreamer/gst/gstpad.c:4574
#10 0x00007f412d548292 in gst_pad_push (pad=0x559a43582040 [GstPad],
buffer=0x559a43573790) at ../subprojects/gstreamer/gst/gstpad.c:4693
#11 0x00007f412cded880 in gst_base_transform_chain (pad=<optimized out>,
parent=0x559a4336a8e0 [GstGLColorBalance], buffer=<optimized out>) at
../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:2330
#12 0x00007f412d541a92 in gst_pad_chain_data_unchecked (data=0x559a43573790,
type=4112, pad=0x559a43543cb0 [GstPad]) at
../subprojects/gstreamer/gst/gstpad.c:4318
#13 0x00007f412d541a92 in gst_pad_push_data (pad=pad at entry=0x559a43543370
[GstPad], type=type at entry=4112, data=data at entry=0x559a43573790) at
../subprojects/gstreamer/gst/gstpad.c:4574
#14 0x00007f412d548292 in gst_pad_push (pad=0x559a43543370 [GstPad],
buffer=0x559a43573790) at ../subprojects/gstreamer/gst/gstpad.c:4693
#15 0x00007f412cded880 in gst_base_transform_chain (pad=<optimized out>,
parent=0x559a433684d0 [GstGLColorConvertElement], buffer=<optimized out>)
    at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:2330
#16 0x00007f412d541a92 in gst_pad_chain_data_unchecked (data=0x559a43573790,
type=4112, pad=0x559a43543a60 [GstPad]) at
../subprojects/gstreamer/gst/gstpad.c:4318
#17 0x00007f412d541a92 in gst_pad_push_data (pad=pad at entry=0x559a43543810
[GstPad], type=type at entry=4112, data=data at entry=0x559a43573790) at
../subprojects/gstreamer/gst/gstpad.c:4574
#18 0x00007f412d548292 in gst_pad_push (pad=0x559a43543810 [GstPad],
buffer=0x559a43573790) at ../subprojects/gstreamer/gst/gstpad.c:4693
#19 0x00007f412cded880 in gst_base_transform_chain (pad=<optimized out>,
parent=0x559a43368160 [GstGLUploadElement], buffer=<optimized out>) at
../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:2330
#20 0x00007f412d541a92 in gst_pad_chain_data_unchecked (data=0x559a43573680,
type=4112, pad=0x559a435435c0 [GstPad]) at
../subprojects/gstreamer/gst/gstpad.c:4318
#21 0x00007f412d541a92 in gst_pad_push_data (pad=pad at entry=0x559a4354e2f0
[GstProxyPad], type=type at entry=4112, data=data at entry=0x559a43573680) at
../subprojects/gstreamer/gst/gstpad.c:4574
#22 0x00007f412d548292 in gst_pad_push (pad=pad at entry=0x559a4354e2f0
[GstProxyPad], buffer=buffer at entry=0x559a43573680) at
../subprojects/gstreamer/gst/gstpad.c:4693
#23 0x00007f412d52d18b in gst_proxy_pad_chain_default (pad=<optimized out>,
parent=<optimized out>, buffer=0x559a43573680) at
../subprojects/gstreamer/gst/gstghostpad.c:127
#24 0x00007f412d541a92 in gst_pad_chain_data_unchecked (data=0x559a43573680,
type=4112, pad=0x559a4354c390 [GstGhostPad]) at
../subprojects/gstreamer/gst/gstpad.c:4318
#25 0x00007f412d541a92 in gst_pad_push_data (pad=pad at entry=0x559a4354e090
[GstProxyPad], type=type at entry=4112, data=data at entry=0x559a43573680) at
../subprojects/gstreamer/gst/gstpad.c:4574
#26 0x00007f412d548292 in gst_pad_push (pad=pad at entry=0x559a4354e090
[GstProxyPad], buffer=buffer at entry=0x559a43573680) at
../subprojects/gstreamer/gst/gstpad.c:4693
#27 0x00007f412d52d18b in gst_proxy_pad_chain_default (pad=<optimized out>,
parent=<optimized out>, buffer=0x559a43573680) at
../subprojects/gstreamer/gst/gstghostpad.c:127
#28 0x00007f412d541a92 in gst_pad_chain_data_unchecked (data=0x559a43573680,
type=4112, pad=0x559a4354c110 [GstGhostPad]) at
../subprojects/gstreamer/gst/gstpad.c:4318
#29 0x00007f412d541a92 in gst_pad_push_data (pad=pad at entry=0x559a43543120
[GstPad], type=type at entry=4112, data=data at entry=0x559a43573680) at
../subprojects/gstreamer/gst/gstpad.c:4574
#30 0x00007f412d548292 in gst_pad_push (pad=0x559a43543120 [GstPad],
buffer=0x559a43573680) at ../subprojects/gstreamer/gst/gstpad.c:4693
#31 0x00007f412cded880 in gst_base_transform_chain (pad=<optimized out>,
parent=0x559a434c0ed0 [GstVideoConvert], buffer=<optimized out>) at
../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:2330
#32 0x00007f412d541a92 in gst_pad_chain_data_unchecked (data=0x559a43573680,
type=4112, pad=0x559a43542ed0 [GstPad]) at
../subprojects/gstreamer/gst/gstpad.c:4318
#33 0x00007f412d541a92 in gst_pad_push_data (pad=pad at entry=0x559a43542c80
[GstPad], type=type at entry=4112, data=data at entry=0x559a43573680) at
../subprojects/gstreamer/gst/gstpad.c:4574
#34 0x00007f412d548292 in gst_pad_push (pad=0x559a43542c80 [GstPad],
buffer=buffer at entry=0x559a43573680) at
../subprojects/gstreamer/gst/gstpad.c:4693
#35 0x00007f412d4a4a55 in gst_overlay_composition_sink_chain (pad=<optimized
out>, parent=<optimized out>, buffer=0x559a43573680)
    at
../subprojects/gst-plugins-base/gst/overlaycomposition/gstoverlaycomposition.c:858
#36 0x00007f412d541a92 in gst_pad_chain_data_unchecked (data=0x559a43573680,
type=4112, pad=0x559a43542a30 [GstPad]) at
../subprojects/gstreamer/gst/gstpad.c:4318
#37 0x00007f412d541a92 in gst_pad_push_data (pad=pad at entry=0x559a43542590
[GstPad], type=type at entry=4112, data=data at entry=0x559a43573680) at
../subprojects/gstreamer/gst/gstpad.c:4574
#38 0x00007f412d548292 in gst_pad_push (pad=0x559a43542590 [GstPad],
buffer=0x559a43573680) at ../subprojects/gstreamer/gst/gstpad.c:4693
#39 0x00007f412cded880 in gst_base_transform_chain (pad=<optimized out>,
parent=0x559a43544150 [GstCapsFilter], buffer=<optimized out>) at
../subprojects/gstreamer/libs/gst/base/gstbasetransform.c:2330
#40 0x00007f412d541a92 in gst_pad_chain_data_unchecked (data=0x559a43573680,
type=4112, pad=0x559a43542340 [GstPad]) at
../subprojects/gstreamer/gst/gstpad.c:4318
#41 0x00007f412d541a92 in gst_pad_push_data (pad=pad at entry=0x559a435420f0
[GstPad], type=type at entry=4112, data=data at entry=0x559a43573680) at
../subprojects/gstreamer/gst/gstpad.c:4574
#42 0x00007f412d548292 in gst_pad_push (pad=pad at entry=0x559a435420f0 [GstPad],
buffer=0x559a43573680) at ../subprojects/gstreamer/gst/gstpad.c:4693
#43 0x00007f412cde8db5 in gst_base_src_loop (pad=0x559a435420f0 [GstPad]) at
../subprojects/gstreamer/libs/gst/base/gstbasesrc.c:2966
#44 0x00007f412d575341 in gst_task_func (task=0x559a43593050 [GstTask]) at
../subprojects/gstreamer/gst/gsttask.c:328
---Type <return> to continue, or q <return> to quit---
#45 0x00007f412d3e6ad3 in g_thread_pool_thread_proxy (data=<optimized out>) at
../../../../glib/gthreadpool.c:307
#46 0x00007f412d3e6135 in g_thread_proxy (data=0x559a43367230) at
../../../../glib/gthread.c:784
#47 0x00007f412cd00f2a in start_thread (arg=0x7f411bfff700) at
pthread_create.c:463
#48 0x00007f412cf1cedf in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Is it really necessary to make a new allocation query there? I commented it out
and the example started to work :)

I think the video meta pointer should also be checked before being used.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list