OpenGL: Invalid framebuffer operation on MacOSX
It is triggered randomly in the sub_renderer_Draw function, but actually comes from the vt->Clear in the renderer code, which is the first drawing function using the framebuffer:
[00007fe4860d4cc0] macosx generic: FRAMEBUFFER VALUE: 0
[00007fe489af8380] macosx generic: FB STATUS: GL_FRAMEBUFFER_UNDEFINED
Assertion failed: (fb_status == GL_FRAMEBUFFER_COMPLETE), function Draw, file ../../modules/video_output/opengl/renderer.c, line 767.
[2] 2232 abort ./bin/vlc-osx-static -vv
According to Khronos wiki:
If the target of glCheckFramebufferStatus references the Default Framebuffer (ie: FBO object number 0 is bound), and the default framebuffer does not exist, then you will get GL_FRAMEBUFFER_UNDEFINED. If the default framebuffer exists, then you always get GL_FRAMEBUFFER_COMPLETE. The rest of the rules apply when an FBO is bound.
So it seems that the default framebuffer for the CGL context is not created yet in that case.