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 739688 - Crash when using glimagesink
Crash when using glimagesink
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.4.3
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 762551 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-11-05 21:01 UTC by Chris Tapp
Modified: 2016-02-24 10:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdb backtrace for all threads (6.61 KB, application/x-gzip)
2014-11-05 21:01 UTC, Chris Tapp
Details
GST_DEBUG=gl*:8,default:7 log file related to the crash (68.80 KB, application/x-gzip)
2014-11-05 21:03 UTC, Chris Tapp
Details
GST_DEBUG=gl*:7,default:7 log file related to the crash (68.80 KB, application/x-gzip)
2014-11-05 21:04 UTC, Chris Tapp
Details
gdb backtrace on Raspberry Pi 2 Model B (3.68 KB, text/plain)
2016-02-23 16:23 UTC, dambedei3612
Details
gdb info sharedlibrary command (9.04 KB, text/plain)
2016-02-24 07:19 UTC, dambedei3612
Details

Description Chris Tapp 2014-11-05 21:01:42 UTC
Created attachment 290053 [details]
gdb backtrace for all threads

I get a crash under 1.4.3 when I run:

gst-launch-1.0 playbin uri=http://dvb:4242/bysid/4352 video-sink="glimagesink"

This only happens when I use glimagesink.

A gdb backtrace for all threads is attached.

Issue created in response to a request from Matthew Waters on the GStreamer development mailing list.
Comment 1 Chris Tapp 2014-11-05 21:03:09 UTC
Created attachment 290054 [details]
GST_DEBUG=gl*:8,default:7 log file related to the crash
Comment 2 Chris Tapp 2014-11-05 21:04:29 UTC
Created attachment 290055 [details]
GST_DEBUG=gl*:7,default:7 log file related to the crash
Comment 3 Matthew Waters (ystreet00) 2014-11-05 22:51:21 UTC
gstglcontext.c:612:_create_context_info: GL_VERSION: (NULL)
gstglcontext.c:614:_create_context_info: GL_SHADING_LANGUAGE_VERSION: (NULL)
gstglcontext.c:616:_create_context_info: GL_VENDOR: (NULL)
gstglcontext.c:618:_create_context_info: GL_RENDERER: (NULL)

You don't seem to have GL available or gstgl doesn't know your platform.

What's the platform you're developing on?
Comment 4 Chris Tapp 2014-11-06 08:56:19 UTC
It's a platform built using Yocto Project and has GLES2 support provided by the Intel PVR driver for Cedartrail. Everything is built from source.

I have a GLES application (with GStreamer) working using EGL under X on this platform and it is here that I hope to be able to use the gl plugins.

Could this just be down to me needing to provide some "magic" at build time?
Comment 5 Matthew Waters (ystreet00) 2014-11-10 11:36:12 UTC
It seems from closer inspection of the log that the GL function retrieval seems to be failing.  This would require further debugging to figure out why it's failing with your setup.

You'd need to step through the gst_gl_context_get_proc_address() or gst_gl_context_default_get_proc_address() function in order to figure out what is failing where.
Comment 6 Luke Granger-Brown 2015-02-07 03:24:02 UTC
I recently hit this issue (or so I thought) on a Raspberry Pi. It's probably worth checking to ensure that you're not actually loading two different GL libraries - I was /opt/vc/lib/libGLESv2.so (Broadcom VideoCore) and then GStreamer was later pulling in /usr/lib/libGLESv2.so (Mesa).

Just a thought.
Comment 7 Matthew Waters (ystreet00) 2015-07-09 02:16:39 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!
Comment 8 dambedei3612 2016-02-23 16:16:32 UTC
As Luke-Granger-Brown says, the glimagesink also crashes on my Raspberry Pi 2 Model B. How to resolve two different GL libraries?
Comment 9 dambedei3612 2016-02-23 16:23:58 UTC
Created attachment 322002 [details]
gdb backtrace on Raspberry Pi 2 Model B

System:
Raspberry Pi 2 Model B
RASPBIAN JESSIE
Linux 4.1.17-v7+
Comment 10 Thiago Sousa Santos 2016-02-23 18:11:08 UTC
Reopening for further investigation
Comment 11 Thiago Sousa Santos 2016-02-23 18:12:18 UTC
*** Bug 762551 has been marked as a duplicate of this bug. ***
Comment 12 Tim-Philipp Müller 2016-02-23 18:24:50 UTC
It would be good if someone retried this with either git master (1.7.x) or 1.6.x. A lot of changes have happened since 1.4, I don't think anyone is going to debug 1.4 code any more :)
Comment 13 Matthew Waters (ystreet00) 2016-02-23 21:33:49 UTC
The rpi's problem is that there can be multiple GL libraries.  The /opt/vc/lib ones and the mesa ones.  The /opt/vc/libs ones aren't quite setup correctly.

To check if you're loading both GL implementations, perform an info sharedlibrary command in gdb when it crashes.  There should only be one entry for libEGL.so and libGLESv2.so.

You have two options to fix.

1. configure gst-plugins-bad with --with-gles2-module-name and --with-egl-module-name pointing to the /opt/vc/lib libraries.
2. create symlinks in a directory from libGLESv2.so.2 to /opt/vc/lib/libGLESv2.so and from libEGL.so.1 to /opt/vc/lib/libEGL.so and point LD_LIBRARY_PATH to your symlink directory.
Comment 14 dambedei3612 2016-02-24 07:18:32 UTC
I performed the info sharedlibrary command in gdb and added the output to the attachments.

I think the problem is because there are 

/opt/vc/lib/libEGL.so
/opt/vc/lib/libGLESv2.so

and 

/usr/lib/arm-linux-gnueabihf/libEGL.so.1
/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2

right?

@Matthew Waters:
Why creating symlinks to the /opt/vc/lib ones when you said that "The /opt/vc/libs ones aren't quite setup correctly."?
Comment 15 dambedei3612 2016-02-24 07:19:19 UTC
Created attachment 322207 [details]
gdb info sharedlibrary command
Comment 16 Matthew Waters (ystreet00) 2016-02-24 07:26:09 UTC
Because we look for libEGL.so.1 and libGLESv2.so.2 (as is the de facto standard when looking up versioned libraries because the .so files are in the -dev{el} packages) which don't exist in /opt/vc/lib
Comment 17 dambedei3612 2016-02-24 07:52:42 UTC
Thank you very much. I created symlinks to the /opt/vc/lib ones and the glimagesink does not crash anymore.

For the ones who find this while googling this fixed the problem for me:

$ sudo ln -s -f /opt/vc/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2
$ sudo ln -s -f /opt/vc/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/libEGL.so.1
Comment 18 dambedei3612 2016-02-24 10:27:16 UTC
And do not forget to remove the old links of course ...
Comment 19 Matthew Waters (ystreet00) 2016-02-24 10:33:02 UTC
The original issue on the Intel PVR system is still missing details.