GNOME Bugzilla – Bug 749284
glimagesink crash on windows
Last modified: 2015-05-22 07:17:55 UTC
gst-launch-1.0 videotestsrc ! glimagesink crash on windows, tested with both 1.4 and git master daily build downloaded from here: http://gstreamer.zeranoe.com/builds/win32/2015.05.12/
Thanks for taking the time to report this. This bug report isn't very useful because it doesn't describe the bug well. If you have time and can still reproduce the bug, please read https://bugzilla.gnome.org/page.cgi?id=bug-writing.html and add a description of how to reproduce this bug. You'll also need to add a stack trace; please see https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces for more information about how to do so. When providing a better description and pasting a stack trace, please reset the status of this bug report from NEEDINFO to its previous status. Thanks in advance!
Created attachment 303290 [details] trace Sorry for not posting the trace, however is simple to reproduce as launch the test pipeline on windows, tested in a virtualbox vm and on a real hardware (intel graphics). The attached trace is from virtualbox and gstreamer daily build
Right, so gstglmemory.c:401 is a gl->GenTextures call which presumably is set to NULL which means that the GL function table was not set up correctly on context creation. Could you please attach the output of: GST_DEBUG=gl*:7,default:7,3 gst-launch-1.0 videotestsrc ! glimagesink (You can also pipe the output to a file with GST_DEBUG_FILE)
Created attachment 303299 [details] debug logs the last log is Generating texture format:6408 type:5121 dimensions:320x240
0:00:00.616892386 2792 07D29298 INFO glcontext gstglcontext.c:1111:_create_context_info:<glcontextwgl0> GL_VERSION: 1.1.0 0:00:00.617546806 2792 07D29298 INFO glcontext gstglcontext.c:1114:_create_context_info:<glcontextwgl0> GL_SHADING_LANGUAGE_VERSION: (NULL) 0:00:00.617917956 2792 07D29298 INFO glcontext gstglcontext.c:1116:_create_context_info:<glcontextwgl0> GL_VENDOR: Microsoft Corporation 0:00:00.618225969 2792 07D29298 INFO glcontext gstglcontext.c:1118:_create_context_info:<glcontextwgl0> GL_RENDERER: GDI Generic You're going to need a proper GL implementation rather than the default Microsoft's software GL implementation. Although the GL version check (>= 1.4) should have caused a failure :/
I confirm VirtualBox GL stack is not supported, we should fix our version check though. It extremely slow, but SW Mesa can let you run it at least (and is very easy to build). Would it be possible to provides logs from the native installation ?
native installation has a different issue D:\gstreamer\1.0\x86_64\bin>f:/gdb_64.exe --args gst-launch-1.0.exe videotestsrc ! glimagesink GNU gdb (GDB) 7.9 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-w64-mingw32". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word". This binary was built by Equation Solution <http://www.Equation.com>... Reading symbols from gst-launch-1.0.exe...done. (gdb) run Starting program: D:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe videotestsrc "!" glimagesink [New Thread 2892.0xdcc] [New Thread 2892.0x1168] [New Thread 2892.0xbc4] [New Thread 2892.0xc64] Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Got context from element 'glimagesink0': gst.gl.GLDisplay=con[New Thread 2892.0xb94] text, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplay\)\ gldisplay0"; [New Thread 2892.0x12c4] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 2892.0xb94] 0x0000000062091ef1 in gst_gl_upload_perform_with_buffer (upload=0x2e113f0, buffer=0x2e29070, tex_id=0x2d60638) at gstglupload.c:275 275 gstglupload.c: No such file or directory. (gdb) bt
+ Trace 235061
however it does not crash if I enable debug logs, it fail this way D:\gstreamer\1.0\x86_64\bin>gst-launch-1.0.exe videotestsrc ! glimagesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Got context from element 'glimagesink0': gst.gl.GLDisplay=context, gst.gl.GLDisp ERROR: from element /GstPipeline:pipeline0/GstGLImageSink:glimagesink0: glGetStr Additional debug info: gstglimagesink.c(458): _ensure_gl_setup (): /GstPipeline:pipeline0/GstGLImageSin ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... Freeing pipeline ... with log disabled it crash
Could you try again with the latest code. The first crash should fail properly now. Maybe the others as well. commit 07dffe9e5b08e97fb4f2421f14cf05eab383c116 Author: Matthew Waters <matthew@centricular.com> Date: Wed May 13 23:55:28 2015 +1000 glcontext: propagate the version/extension failure upwards Otherwise the calling code has no idea that the context failed to be created fully. https://bugzilla.gnome.org/show_bug.cgi?id=749284 commit 1853e455accb4fac1c5a2d5c8d9315615fcb5804 Author: Matthew Waters <matthew@centricular.com> Date: Wed May 13 23:54:52 2015 +1000 gl: don't deadlock on context creation failure https://bugzilla.gnome.org/show_bug.cgi?id=749284
thanks, in virtualbox I found the right settings and now it works (even the old version), on real hardware some progress but still crash, now popup a window before segfault, here is the trace D:\gstreamer\1.0\x86_64\bin>F:\gdb_64.exe --args gst-launch-1.0.exe videotestsrc ! glimagesink GNU gdb (GDB) 7.9 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-w64-mingw32". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word". This binary was built by Equation Solution <http://www.Equation.com>... Reading symbols from gst-launch-1.0.exe...done. (gdb) run Starting program: D:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe videotestsrc "!" glimagesink [New Thread 2540.0x13d4] [New Thread 2540.0xea8] [New Thread 2540.0x1320] Setting pipeline to PAUSED ... [New Thread 2540.0x980] [New Thread 2540.0x1360] [New Thread 2540.0xfb4] Pipeline is PREROLLING ... Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplay\)\ gldisplay0"; ** (gst-launch-1.0:2540): CRITICAL **: gst_gl_shader_get_attribute_location: assertion 'priv->program_handle != 0' failed ** (gst-launch-1.0:2540): CRITICAL **: gst_gl_shader_get_attribute_location: assertion 'priv->program_handle != 0' failed Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock ** (gst-launch-1.0:2540): CRITICAL **: gst_gl_shader_use: assertion 'priv->program_handle' failed Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 2540.0x1360] 0x0000000000000000 in ?? () (gdb) bt
+ Trace 235063
if I enable debug log it not crash but the pipeline fails D:\gstreamer\1.0\x86_64\bin>gst-launch-1.0.exe videotestsrc ! glimagesink Setting pipeline to PAUSED ... ERROR: Pipeline doesn't want to pause. Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplay\)\ gldisplay0"; ERROR: from element /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLImageSink:sink: glGetString error: 0x500 Additional debug info: gstglimagesink.c(770): _ensure_gl_setup (): /GstPipeline:pipeline0/GstGLImageSinkBin:glimagesinkbin0/GstGLImageSink:sink Setting pipeline to NULL ... Freeing pipeline ...
Created attachment 303355 [details] debug logs on real hardware so on this hardware glimagesink will not work?
Ah, no. We require at least shaders which your hardware/driver does not seem to have (GL_SHADING_LANGUAGE_VERSION). The current minimum target is GLES2 hardware with which shaders are available.
ok, the hardware has opengl 1.4, however if you want to fix the crash I can test
It's hard to tell from that backtrace but that crash might be fixed by http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c6abd1632f430d0c3873be0ef5a82e4739d1e003
a bit better, now give the assertion ** (gst-launch-1.0:2540): CRITICAL **: gst_gl_shader_get_attribute_location: assertion 'priv->program_handle != 0' failed open a window with nothing inside and crash when I try to close it, maybe it should exit earlier with a message such as "no compatible opengl version found" or something similar
Maybe this will fail properly for you :) commit e9f0d0fb51e8d92b566868f8fa5db10c2eccc22f Author: Matthew Waters <matthew@centricular.com> Date: Thu May 21 15:05:33 2015 +1000 glcontext: require a shader version to initialize. It's very near pointless to try our GL implementation without shaders. https://bugzilla.gnome.org/show_bug.cgi?id=749284
This is the same crash I get if I run GstGL stuff in an RDP session, btw.
fixed on my hw, now fails with no crash, thanks