After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 797355 - overlaycomposition: Example crashes
overlaycomposition: Example crashes
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-10-30 09:59 UTC by Philippe Normand
Modified: 2018-11-01 10:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philippe Normand 2018-10-30 09:59:44 UTC
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
    at ../subprojects/gst-plugins-base/gst-libs/gst/gl/gstgloverlaycompositor.c line 265
  • #0 gst_gl_composition_overlay_add_transformation
    at ../subprojects/gst-plugins-base/gst-libs/gst/gl/gstgloverlaycompositor.c line 265
  • #1 gst_gl_composition_overlay_upload
    at ../subprojects/gst-plugins-base/gst-libs/gst/gl/gstgloverlaycompositor.c line 388
  • #2 gst_gl_overlay_compositor_upload_overlays
    at ../subprojects/gst-plugins-base/gst-libs/gst/gl/gstgloverlaycompositor.c line 680
  • #3 prepare_next_buffer
    at ../subprojects/gst-plugins-base/ext/gl/gstglimagesink.c line 1630
  • #4 gst_glimage_sink_prepare
    at ../subprojects/gst-plugins-base/ext/gl/gstglimagesink.c line 1731
  • #5 gst_base_sink_do_preroll
    at ../subprojects/gstreamer/libs/gst/base/gstbasesink.c line 2446
  • #6 gst_base_sink_chain_unlocked
    at ../subprojects/gstreamer/libs/gst/base/gstbasesink.c line 3589
  • #7 gst_base_sink_chain_main
    at ../subprojects/gstreamer/libs/gst/base/gstbasesink.c line 3778
  • #8 gst_pad_chain_data_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 4318
  • #9 gst_pad_push_data
    at ../subprojects/gstreamer/gst/gstpad.c line 4574
  • #10 gst_pad_push
    at ../subprojects/gstreamer/gst/gstpad.c line 4693
  • #11 gst_base_transform_chain
    at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c line 2330
  • #12 gst_pad_chain_data_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 4318
  • #13 gst_pad_push_data
    at ../subprojects/gstreamer/gst/gstpad.c line 4574
  • #14 gst_pad_push
    at ../subprojects/gstreamer/gst/gstpad.c line 4693
  • #15 gst_base_transform_chain
    at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c line 2330
  • #16 gst_pad_chain_data_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 4318
  • #17 gst_pad_push_data
    at ../subprojects/gstreamer/gst/gstpad.c line 4574
  • #18 gst_pad_push
    at ../subprojects/gstreamer/gst/gstpad.c line 4693
  • #19 gst_base_transform_chain
    at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c line 2330
  • #20 gst_pad_chain_data_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 4318
  • #21 gst_pad_push_data
    at ../subprojects/gstreamer/gst/gstpad.c line 4574
  • #22 gst_pad_push
    at ../subprojects/gstreamer/gst/gstpad.c line 4693
  • #23 gst_proxy_pad_chain_default
    at ../subprojects/gstreamer/gst/gstghostpad.c line 127
  • #24 gst_pad_chain_data_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 4318
  • #25 gst_pad_push_data
    at ../subprojects/gstreamer/gst/gstpad.c line 4574
  • #26 gst_pad_push
    at ../subprojects/gstreamer/gst/gstpad.c line 4693
  • #27 gst_proxy_pad_chain_default
    at ../subprojects/gstreamer/gst/gstghostpad.c line 127
  • #28 gst_pad_chain_data_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 4318
  • #29 gst_pad_push_data
    at ../subprojects/gstreamer/gst/gstpad.c line 4574
  • #30 gst_pad_push
    at ../subprojects/gstreamer/gst/gstpad.c line 4693
  • #31 gst_base_transform_chain
    at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c line 2330
  • #32 gst_pad_chain_data_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 4318
  • #33 gst_pad_push_data
    at ../subprojects/gstreamer/gst/gstpad.c line 4574
  • #34 gst_pad_push
    at ../subprojects/gstreamer/gst/gstpad.c line 4693
  • #35 gst_overlay_composition_sink_chain
    at ../subprojects/gst-plugins-base/gst/overlaycomposition/gstoverlaycomposition.c line 858
  • #36 gst_pad_chain_data_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 4318
  • #37 gst_pad_push_data
    at ../subprojects/gstreamer/gst/gstpad.c line 4574
  • #38 gst_pad_push
    at ../subprojects/gstreamer/gst/gstpad.c line 4693
  • #39 gst_base_transform_chain
    at ../subprojects/gstreamer/libs/gst/base/gstbasetransform.c line 2330
  • #40 gst_pad_chain_data_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 4318
  • #41 gst_pad_push_data
    at ../subprojects/gstreamer/gst/gstpad.c line 4574
  • #42 gst_pad_push
    at ../subprojects/gstreamer/gst/gstpad.c line 4693
  • #43 gst_base_src_loop
    at ../subprojects/gstreamer/libs/gst/base/gstbasesrc.c line 2966
  • #44 gst_task_func
    at ../subprojects/gstreamer/gst/gsttask.c line 328
  • #45 g_thread_pool_thread_proxy
    at ../../../../glib/gthreadpool.c line 307
  • #46 g_thread_proxy
    at ../../../../glib/gthread.c line 784
  • #47 start_thread
    at pthread_create.c line 463
  • #48 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 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.
Comment 1 Sebastian Dröge (slomo) 2018-10-31 13:37:33 UTC
> Which means a second glbufferpool is created, without the video meta option. 

Why does this bufferpool not have the video meta option? That seems wrong :)

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

It's necessary unfortunately for correct negotiation in all cases. This is basically the same code as in textoverlay. Can you reproduce the same crash with textoverlay in the same pipeline?

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

What do you mean?
Comment 2 Philippe Normand 2018-11-01 10:15:43 UTC
(In reply to Sebastian Dröge (slomo) from comment #1)
> > Which means a second glbufferpool is created, without the video meta option. 
> 
> Why does this bufferpool not have the video meta option? That seems wrong :)
> 

Now I can't reproduce the bug anymore... Yay for heisenbugs :/

> > Is it really necessary to make a new allocation query there? I commented it out and the example started to work :)
> 
> It's necessary unfortunately for correct negotiation in all cases. This is
> basically the same code as in textoverlay. Can you reproduce the same crash
> with textoverlay in the same pipeline?
> 
> > I think the video meta pointer should also be checked before being used.
> 
> What do you mean?

I mean the GstMeta* returned by gst_video_buffer_get_meta() in gst_gl_composition_overlay_add_transformation() can potentially be NULL, in theory :)

Anyway I'll just close this, since the crash no longer happens here. Sorry for the noise.