GLImageSink crashes randomly on OSX
Describe your issue:
Trying to use GstGLImageSink in a product on OSX, it will cause both memory corruption and other NULL-pointer crashes.
Expected Behavior:
Being able to use it without it crashing the system
Observed Behavior:
Crashes almost all the time if you go start, stop and start again.
Setup
- Operating System: macOS Ventura 13.4
- Device: MacBook Pro - 2,4 GHz 8-Core Intel Core i9
- GStreamer Version: latest main
Steps to reproduce the bug:
I have a PR here with an example that reproduces the bug almost 100% on my machine:
Solutions you have tried:
Supplying a custom GstGLContext seems to help the frequency of the memory corruption, but this could just be coincidence.
The PR includes commented out code for doing this.
Additional Information:
I have not tried this on other platforms than OSX, so don't know if the problem is present there as well.
Using OpenGL with GStreamer on OSX is basically unusable until this issue is fixed.