gtkglsink: spurious X11 error
I have a Flatpak app which displays a video in a GtkGlSink
: https://flathub.org/apps/details/org.gnome.gitlab.YaLTeR.VideoTrimmer
When running under a Ubuntu 18.04 VM under X11, it frequently, but not always, crashes with an X11 error upon opening the screen with the GtkGlSink
:
(video-trimmer:2): Gdk-ERROR **: 14:57:15.591: The program 'video-trimmer' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 398 error_code 8 request_code 150 (GLX) minor_code 34)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
Sometimes this message is also printed:
Xlib: sequence lost (0x1027c > 0x27f) in reply type 0x0!
Doing as the error message suggests, I get this backtrace:
#0 0x00007ffff7625c80 in gdk_x_error (xdisplay=0x5555558e7440, error=0x7fff93ffe850) at gdkmain-x11.c:271
#1 0x00007ffff7ebb30b in _XError (dpy=0x5555558e7440, rep=0x7fff93ffe950) at ../../src/XlibInt.c:1489
#2 0x00007fffedd2f10f in () at /usr/lib/x86_64-linux-gnu/GL/default/lib/libGLX_mesa.so.0
#3 0x00007fffedd29030 in () at /usr/lib/x86_64-linux-gnu/GL/default/lib/libGLX_mesa.so.0
#4 0x00007fffeed1d44c in glXCreateContextAttribsARB (dpy=0x5555558e7440, config=0x555555d3c030, share_list=0x555555dcf7f0, direct=1, attrib_list=0x7fff93ffeaa0) at ../../../src/GLX/libglx.c:305
#5 0x00007fffeeea5b4d in _create_context_with_flags (contextFlags=1, profileMask=1, minor=<optimized out>, major=<optimized out>, share_context=0x555555dcf7f0, fbconfig=0x555555d3c030, dpy=0x5555558e7440, context_glx=0x555555b787b0 [GstGLContextGLX]) at ../gst-libs/gst/gl/x11/gstglcontext_glx.c:182
#6 0x00007fffeeea5b4d in gst_gl_context_glx_create_context (context=0x555555b787b0 [GstGLContextGLX], gl_api=65539, other_context=<optimized out>, error=0x7ffff4841290) at ../gst-libs/gst/gl/x11/gstglcontext_glx.c:263
#7 0x00007fffeee7e5de in gst_gl_context_create_thread (context=0x555555b787b0 [GstGLContextGLX]) at ../gst-libs/gst/gl/gstglcontext.c:1238
#8 0x00007ffff7111731 in g_thread_proxy (data=0x7fffe4003520) at ../glib/gthread.c:807
#9 0x00007ffff6f255e2 in start_thread (arg=<optimized out>) at pthread_create.c:479
#10 0x00007ffff6e38413 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Full backtrace:
#0 0x00007ffff7625c80 in gdk_x_error (xdisplay=0x5555558e7440, error=0x7fff93ffe850) at gdkmain-x11.c:271
#1 0x00007ffff7ebb30b in _XError (dpy=0x5555558e7440, rep=0x7fff93ffe950) at ../../src/XlibInt.c:1489
rtn_val = <optimized out>
event = {type = 0, xany = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416}, xkey = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, root = 140735676410080, subwindow = 140735676410048, time = 93824995990688, x = -1811945288, y = 32767, x_root = -155382679, y_root = 32767, state = 636, keycode = 0, same_screen = -155382363}, xbutton = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, root = 140735676410080, subwindow = 140735676410048, time = 93824995990688, x = -1811945288, y = 32767, x_root = -155382679, y_root = 32767, state = 636, button = 0, same_screen = -155382363}, xmotion = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, root = 140735676410080, subwindow = 140735676410048, time = 93824995990688, x = -1811945288, y = 32767, x_root = -155382679, y_root = 32767, state = 636, is_hint = 0 '\000', same_screen = -155382363}, xcrossing = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, root = 140735676410080, subwindow = 140735676410048, time = 93824995990688, x = -1811945288, y = 32767, x_root = -155382679, y_root = 32767, mode = 636, detail = 0, same_screen = -155382363, focus = 32767, state = 4}, xfocus = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, mode = -1811945248, detail = 32767}, xexpose = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, x = -1811945248, y = 32767, width = -1811945280, height = 32767, count = 1435409568}, xgraphicsexpose = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, drawable = 140735661905416, x = -1811945248, y = 32767, width = -1811945280, height = 32767, count = 1435409568, major_code = 21845, minor_code = -1811945288}, xnoexpose = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, drawable = 140735661905416, major_code = -1811945248, minor_code = 32767}, xvisibility = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, state = -1811945248}, xcreatewindow = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, parent = 140735661905416, window = 140735676410080, x = -1811945280, y = 32767, width = 1435409568, height = 21845, border_width = -1811945288, override_redirect = 32767}, xdestroywindow = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, event = 140735661905416, window = 140735676410080}, xunmap = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, event = 140735661905416, window = 140735676410080, from_configure = -1811945280}, xmap = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, event = 140735661905416, window = 140735676410080, override_redirect = -1811945280}, xmaprequest = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, parent = 140735661905416, window = 140735676410080}, xreparent = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, event = 140735661905416, window = 140735676410080, parent = 140735676410048, x = 1435409568, y = 21845, override_redirect = -1811945288}, xconfigure = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, event = 140735661905416, window = 140735676410080, x = -1811945280, y = 32767, width = 1435409568, height = 21845, border_width = -1811945288, above = 140737332972649, override_redirect = 636}, xgravity = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, event = 140735661905416, window = 140735676410080, x = -1811945280, y = 32767}, xresizerequest = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, width = -1811945248, height = 32767}, xconfigurerequest = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, parent = 140735661905416, window = 140735676410080, x = -1811945280, y = 32767, width = 1435409568, height = 21845, border_width = -1811945288, above = 140737332972649, detail = 636, value_mask = 140737332972965}, xcirculate = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, event = 140735661905416, window = 140735676410080, place = -1811945280}, xcirculaterequest = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, parent = 140735661905416, window = 140735676410080, place = -1811945280}, xproperty = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, atom = 140735676410080, time = 140735676410048, state = 1435409568}, xselectionclear = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, selection = 140735676410080, time = 140735676410048}, xselectionrequest = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, owner = 140735661905416, requestor = 140735676410080, selection = 140735676410048, target = 93824995990688, property = 140735676410040, time = 140737332972649}, xselection = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, requestor = 140735661905416, selection = 140735676410080, target = 140735676410048, property = 93824995990688, time = 140735676410040}, xcolormap = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, colormap = 140735676410080, new = -1811945280, state = 32767}, xclient = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, message_type = 140735676410080, format = -1811945280, data = {b = "\240\234\216UUU\000\000\270\350\377\223\377\177\000\000i\f\275", <incomplete sequence \366>, s = {-25440, 21902, 21845, 0, -5960, -27649, 32767, 0, 3177, -2371}, l = {93824995990688, 140735676410040, 140737332972649, 636, 140737332972965}}}, xmapping = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, request = -1811945248, first_keycode = 32767, count = -1811945280}, xerror = {type = 0, display = 0x5555558e7440, resourceid = 33554483, serial = 636, error_code = 8 '\b', request_code = 150 '\226', minor_code = 34 '"'}, xkeymap = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, window = 140735661905416, key_vector = "\340\350\377\223\377\177\000\000\300\350\377\223\377\177\000\000\240\234\216UUU\000\000\270\350\377\223\377\177\000"}, xgeneric = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, extension = -1826449912, evtype = 32767}, xcookie = {type = 0, serial = 93824995980352, send_event = 33554483, display = 0x27c, extension = -1826449912, evtype = 32767, cookie = 2483022048, data = 0x7fff93ffe8c0}, pad = {140733193388032, 93824995980352, 33554483, 636, 140735661905416, 140735676410080, 140735676410048, 93824995990688, 140735676410040, 140737332972649, 636, 140737332972965, 4, 0, 636, 140735676410080, 0, 0, 0, 0, 0, 0, 17179869184, 0}}
async = <optimized out>
next = <optimized out>
#2 0x00007fffedd2f10f in () at /usr/lib/x86_64-linux-gnu/GL/default/lib/libGLX_mesa.so.0
#3 0x00007fffedd29030 in () at /usr/lib/x86_64-linux-gnu/GL/default/lib/libGLX_mesa.so.0
#4 0x00007fffeed1d44c in glXCreateContextAttribsARB (dpy=0x5555558e7440, config=0x555555d3c030, share_list=0x555555dcf7f0, direct=1, attrib_list=0x7fff93ffeaa0) at ../../../src/GLX/libglx.c:305
context = 0x0
vendor = 0x555555c28c00
#5 0x00007fffeeea5b4d in _create_context_with_flags (contextFlags=1, profileMask=1, minor=<optimized out>, major=<optimized out>, share_context=0x555555dcf7f0, fbconfig=0x555555d3c030, dpy=0x5555558e7440, context_glx=0x555555b787b0 [GstGLContextGLX]) at ../gst-libs/gst/gl/x11/gstglcontext_glx.c:182
ret = <optimized out>
attribs = {8337, 4, 8338, 5, 8340, 1, 37158, 1, 0, 1, 8, 1, 9, 1, 10, 1, 12, 16, 5, 1}
x_error = 0
n = <optimized out>
profileMask = 1
contextFlags = 1
context_glx = 0x555555b787b0 [GstGLContextGLX]
window = 0x555555bbc8b0 [GstGLWindowX11]
window_x11 = 0x555555bbc8b0 [GstGLWindowX11]
display = 0x55555592a5f0 [GstGLDisplayX11]
create_context = <optimized out>
glx_exts = <optimized out>
device = 0x5555558e7440
external_gl_context = 93825001125872
__func__ = "gst_gl_context_glx_create_context"
#6 0x00007fffeeea5b4d in gst_gl_context_glx_create_context (context=0x555555b787b0 [GstGLContextGLX], gl_api=65539, other_context=<optimized out>, error=0x7ffff4841290) at ../gst-libs/gst/gl/x11/gstglcontext_glx.c:263
profileMask = 1
contextFlags = 1
context_glx = 0x555555b787b0 [GstGLContextGLX]
window = 0x555555bbc8b0 [GstGLWindowX11]
window_x11 = 0x555555bbc8b0 [GstGLWindowX11]
display = 0x55555592a5f0 [GstGLDisplayX11]
create_context = <optimized out>
glx_exts = <optimized out>
device = 0x5555558e7440
external_gl_context = 93825001125872
__func__ = "gst_gl_context_glx_create_context"
#7 0x00007fffeee7e5de in gst_gl_context_create_thread (context=0x555555b787b0 [GstGLContextGLX]) at ../gst-libs/gst/gl/gstglcontext.c:1238
context_class = 0x7fffe4008380
window_class = 0x7fffe4009540
compiled_api = 65539
user_api = GST_GL_API_ANY
gl_api = <optimized out>
display_api = GST_GL_API_ANY
api_string = <optimized out>
compiled_api_s = 0x7fffe40021a0 "opengl opengl3 gles2"
user_api_s = 0x7fffe4009900 "any"
display_api_s = 0x7fff88001360 "any"
user_choice = <optimized out>
error = 0x7ffff4841290
other_context = 0x555555b5c190 [GstGLWrappedContext]
__func__ = "gst_gl_context_create_thread"
#8 0x00007ffff7111731 in g_thread_proxy (data=0x7fffe4003520) at ../glib/gthread.c:807
thread = 0x7fffe4003520
__func__ = "g_thread_proxy"
#9 0x00007ffff6f255e2 in start_thread (arg=<optimized out>) at pthread_create.c:479
ret = <optimized out>
pd = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140735676413696, -8133131588441933399, 140737295683806, 140737295683807, 140735676411008, 140735676413696, 8133052422939015593, 8133116158072781225}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 0
#10 0x00007ffff6e38413 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Runtimes I'm using:
Application ID Version Branch
org.freedesktop.Platform.GL.default 19.08
org.freedesktop.Platform.ffmpeg-full 19.08
org.freedesktop.Platform.openh264 2.1.0 2.0
org.gnome.Platform 3.36
org.gnome.Sdk 3.36
org.gnome.gitlab.YaLTeR.VideoTrimmer 0.2.0 stable
org.gnome.gitlab.YaLTeR.VideoTrimmerDevel 0.2.0 master
org.gtk.Gtk3theme.Ambiance 3.22
I couldn't figure out what .Debug
to install to get libGLX debug info.