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 747124 - glbasefilter: avoid segfault when gl platform is not available
glbasefilter: avoid segfault when gl platform is not available
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-31 16:12 UTC by Anton Obzhirov
Modified: 2015-04-10 16:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix the seg fault. (1.22 KB, patch)
2015-03-31 16:12 UTC, Anton Obzhirov
committed Details | Review

Description Anton Obzhirov 2015-03-31 16:12:53 UTC
Created attachment 300682 [details] [review]
Patch to fix the seg fault.

If you run ./configure --disable-glx --enable-egl --disable-opengl --enable-gles2 for master

and then run 

GST_DEBUG=*:2 GST_GL_WINDOW=x11 GST_GL_API=opengl GST_GL_PLATFORM=glx gst-launch-1.0 videotestsrc ! glupload ! gleffects effect=glow ! glimagesink

It will seg fault. 

gstglimagesink.c(781): _ensure_gl_setup (): /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLImageSink:sink
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...

** (gst-launch-1.0:9360): CRITICAL **: gst_gl_context_create: assertion 'GST_GL_IS_CONTEXT (context)' failed

Program received signal SIGSEGV, Segmentation fault.

Thread 140737253140224 (LWP 9364)

  • #0 gst_gl_base_filter_decide_allocation
    at gstglbasefilter.c line 361
  • #1 gst_gl_filter_decide_allocation
    at gstglfilter.c line 810
  • #2 gst_base_transform_do_bufferpool
    at gstbasetransform.c line 999
  • #3 gst_base_transform_setcaps
    at gstbasetransform.c line 1396
  • #4 gst_base_transform_sink_eventfunc
    at gstbasetransform.c line 1904
  • #5 gst_pad_send_event_unchecked
    at gstpad.c line 5296
  • #6 gst_pad_push_event_unchecked
    at gstpad.c line 4983
  • #7 push_sticky
    at gstpad.c line 3590
  • #8 events_foreach
    at gstpad.c line 583
  • #9 check_sticky
    at gstpad.c line 3646
  • #10 gst_pad_push_event
    at gstpad.c line 5108
  • #11 gst_pad_set_caps
    at ../../../gst/gstcompat.h line 55
  • #12 gst_base_transform_setcaps
    at gstbasetransform.c line 1391
  • #13 gst_base_transform_sink_eventfunc
    at gstbasetransform.c line 1904
  • #14 gst_pad_send_event_unchecked
    at gstpad.c line 5296
  • #15 gst_pad_push_event_unchecked
    at gstpad.c line 4983
  • #16 push_sticky
    at gstpad.c line 3590
  • #17 events_foreach
    at gstpad.c line 583
  • #18 check_sticky
    at gstpad.c line 3646
  • #19 gst_pad_push_event
    at gstpad.c line 5108
  • #20 gst_base_src_set_caps
    at gstbasesrc.c line 925
  • #21 gst_base_src_default_negotiate
    at gstbasesrc.c line 3232
  • #22 gst_base_src_negotiate
    at gstbasesrc.c line 3272
  • #23 gst_base_src_loop
    at gstbasesrc.c line 2699
  • #24 gst_task_func
    at gsttask.c line 331
  • #25 g_thread_pool_thread_proxy
    at /build/buildd/glib2.0-2.40.2/./glib/gthreadpool.c line 307
  • #26 g_thread_proxy
    at /build/buildd/glib2.0-2.40.2/./glib/gthread.c line 764
  • #27 start_thread
    at pthread_create.c line 312
  • #28 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

I've added patch fixing it, please have look.
Comment 1 Julien Isorce 2015-04-01 11:01:42 UTC
Review of attachment 300682 [details] [review]:

Looks good, I'll just rename commit message to "glbasefilter: avoid seg fault when trying to use unavailable gl platform" and add the bug link.
Comment 2 Reynaldo H. Verdejo Pinochet 2015-04-10 15:38:41 UTC
Review of attachment 300682 [details] [review]:

commit 6a2e986f070ac1f47971a09d42663519b57d6644
Author: Anton Obzhirov <obzhirov@yahoo.co.uk>
Date:   Tue Mar 31 17:10:45 2015 +0100

    glbasefilter: avoid segfault when gl platform is not available
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747124