GNOME Bugzilla – Bug 753003
glimagesink: GstVideoOverlay crashes on widget resize (NSView / OS X)
Last modified: 2016-11-15 13:02:33 UTC
Created attachment 308361 [details] crash call stack I'm using a playbin element from a wxWidgets application and setting the NSView where to draw via the GstVideoOverlay interface. Everything works perfectly fine, resizing the NSView, toggling fullscreen. No issues. Then I stop and start over (that means: setting the state of the pipeline to NULL and releasing it - then building a completely new pipeline, giving in the same NSView as before). The pipeline starts and runs just fine as before. *But* then as soon as I resize the NSView I get a crash drawing to the OpenGL canvas. See attachment, I don't have debug symbols in place here unfortunately. But maybe someone has an idea what may go wring here from the call stack (attached). Running the code on Windows where it uses the d3d video sink it works as expected (Which does not necessarily imply that there couldn't be an oversight in wxWidgets or in my code). Any ideas or hints are appreciated.
Right, so there's probably some lifetime issues in the OS X GL window system implementation that will explain this issue.
Created attachment 337341 [details] cocoa sample app Inspired by today's GStreamer Conference talk - this is a small Cocoa example that shows the issue. There is a loop that runs the same pipeline twice. On the first run resizing works perfectly fine. When the second run starts any resize attempts will crash. Maybe this helps to comprehend the bug - or if it is a general application error this may help to close this report anyway. For a move of GL into base/good.. :-) Tested with GStreamer 1.8.1 only at this time. I will trying to rerun on dates RC for 1.10 if that helps.
Thanks for the test case! commit 23ec5aeb839a039f96e686a9083b793cc635a15c Author: Matthew Waters <matthew@centricular.com> Date: Tue Nov 15 22:56:25 2016 +1100 glwindow/cocoa: remove our view from the parent when closing Otherwise, when the application reuses the same UIView, we were getting draw notifications on the previous view/layer's which weren't valid anymore and were referencing pointers that had been freed. https://bugzilla.gnome.org/show_bug.cgi?id=753003