[Bug 725048] The display handle isn't freed correctly

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Mar 3 06:00:35 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=725048
  GStreamer | gst-plugins-gl | git

--- Comment #9 from Matthew Waters <ystreet00 at gmail.com> 2014-03-03 14:22:47 UTC ---
So it looks like we free the gl context before gstreamer-vaapi is finished with
it...and so mesa tries to create another one which involves
__glXInitialize...which fails with the spectacular backtrace you have there.  

Essentially the problem is that we destroy too early and gstreamer-vaapi does
not know the context has disappeared.  One workaround is to delay context
destruction inside the element which is what I think cluttersink/webkit has
(probably indirectly).  Ideally gstreamer-vaapi would hold a reference to the
GL context that it's using however it does not know which context before
GstVideoGLTextureUploadMeta::upload is called.

(gdb) bt
#0  gst_gl_context_finalize (object=0x7fffe00700c0) at gstglcontext.c:272
#1  0x00007ffff6f8d4ba in g_object_unref (_object=0x7fffe00700c0) at
gobject.c:3197
#2  0x00007ffff6fad3c3 in g_value_unset (value=value at entry=0x7fffe00113c8) at
gvalue.c:274
#3  0x00007ffff724a284 in gst_structure_free (structure=0x7fffe0006600) at
gststructure.c:379
#4  0x00007ffff6c6d582 in array_free (array=0x7fffe0003090, flags=FREE_SEGMENT)
at garray.c:367
#5  0x00007ffff6fad3c3 in g_value_unset (value=value at entry=0x7fffe0011288) at
gvalue.c:274
#6  0x00007ffff724a284 in gst_structure_free (structure=0x7fffe0006360) at
gststructure.c:379
#7  0x00007ffff723f279 in _gst_query_free (query=0x7fffe0011de0) at
gstquery.c:202
#8  0x00007ffff74f9bb9 in gst_query_unref (q=0x7fffe0011de0) at
../../../gst/gstquery.h:235
#9  gst_base_transform_set_allocation (trans=trans at entry=0x7fffe0036250,
pool=pool at entry=0x0, 
    allocator=allocator at entry=0x0, params=params at entry=0x0,
query=query at entry=0x0) at gstbasetransform.c:816
#10 0x00007ffff74fc298 in gst_base_transform_activate (trans=0x7fffe0036250,
active=<optimized out>)
    at gstbasetransform.c:2349
#11 0x00007ffff74fc395 in gst_base_transform_sink_activate_mode
(pad=0x7fffe00700c0, parent=0x7fffe0036250, 
    mode=(unknown: 8), active=0) at gstbasetransform.c:2367
#12 0x00007ffff722da8d in gst_pad_activate_mode (pad=pad at entry=0x7fffe800f3e0,
mode=mode at entry=GST_PAD_MODE_PUSH, 
    active=active at entry=0) at gstpad.c:1083
#13 0x00007ffff722e1d0 in gst_pad_set_active (pad=0x7fffe800f3e0, active=0) at
gstpad.c:969
#14 0x00007ffff72123ab in activate_pads (vpad=<optimized out>,
ret=0x7ffff01e77a0, active=0x7ffff01e77fc)
    at gstelement.c:2687
(gdb) c
Continuing.
[Thread 0x7fffe7fff700 (LWP 1236) exited]

Program received signal SIGSEGV, Segmentation fault.
xcb_writev (c=c at entry=0x0, vector=vector at entry=0x7ffff01e7770,
count=count at entry=3, requests=requests at entry=1)
    at xcb_out.c:311
311    xcb_out.c: No such file or directory.
(gdb) bt
#0  xcb_writev (c=c at entry=0x0, vector=vector at entry=0x7ffff01e7770,
count=count at entry=3, requests=requests at entry=1)
    at xcb_out.c:311
#1  0x00007ffff653ab36 in _XSend (dpy=dpy at entry=0x7fffdc0008c0, 
    data=data at entry=0x7ffff58d5ae8 <__glXExtensionName> "GLX", size=<optimized
out>) at xcb_io.c:495
#2  0x00007ffff6531542 in XQueryExtension (dpy=dpy at entry=0x7fffdc0008c0, 
    name=name at entry=0x7ffff58d5ae8 <__glXExtensionName> "GLX",
major_opcode=major_opcode at entry=0x7ffff01e7844, 
    first_event=first_event at entry=0x7ffff01e7848,
first_error=first_error at entry=0x7ffff01e784c) at QuExt.c:47
#3  0x00007ffff6525812 in XInitExtension (dpy=dpy at entry=0x7fffdc0008c0, 
    name=name at entry=0x7ffff58d5ae8 <__glXExtensionName> "GLX") at InitExt.c:47
#4  0x00007ffff58a4c0d in __glXInitialize (dpy=0x7fffdc0008c0) at glxext.c:826
#5  0x00007ffff58c4d3d in driFetchDrawable (gc=gc at entry=0x7fffdc97dc30,
glxDrawable=glxDrawable at entry=31457282)
    at dri_common.c:389
#6  0x00007ffff58c9253 in dri2_bind_context (context=0x7fffdc97dc30,
old=<optimized out>, draw=31457282, read=31457282)
    at dri2_glx.c:147
#7  0x00007ffff58a39ec in MakeContextCurrent (dpy=0x7fffdc0008c0,
draw=31457282, read=31457282, gc_user=0x7fffdc97dc30)
    at glxcurrent.c:259
#8  0x00007ffff6a4d875 in ?? () from /usr/lib/libva-glx.so.1
#9  0x00007ffff7994ebf in _gst_vaapi_texture_destroy_objects
(texture=<optimized out>) at gstvaapitexture.c:80
#10 gst_vaapi_texture_destroy (texture=0x7fffd40039e0) at gstvaapitexture.c:118
#11 0x00007ffff77434d2 in gst_vaapi_object_finalize (object=0x7fffd40039e0) at
gstvaapiobject.c:51
#12 0x00007ffff774340f in gst_vaapi_mini_object_free (object=0x7fffd40039e0) at
gstvaapiminiobject.c:34
#13 gst_vaapi_mini_object_unref (object=0x7fffd40039e0) at
gstvaapiminiobject.c:137
#14 0x00007ffff7743482 in gst_vaapi_mini_object_replace
(old_object_ptr=<optimized out>, new_object=<optimized out>)
    at gstvaapiminiobject.c:170
#15 0x00007ffff7743595 in gst_vaapi_object_replace_internal
(new_object=<optimized out>, 
    old_object_ptr=<optimized out>) at gstvaapiobject_priv.h:238
Quit
(gdb)

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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