OpenGLContext crashes most of the times when closing plugin editor. This happens at least on VST2, and if I recall correctly, on VST3 as well. I hit this with both latest Cubase 9, and the latest Juce Plugin Demo Host.
Closing VST UI: Juce501Plugin
***** GL_INVALID_FRAMEBUFFER_OPERATION at …/…/…/JUCE/modules/juce_opengl/opengl/juce_OpenGLContext.cpp : 1176
JUCE Assertion failure in juce_opengl.cpp:155
Running latest tip, I was able to reproduce this by creating an empty plugin project with Projucer, and adding the OpenGL context as explained here:
Plugin Editor class declaration:
OpenGLContext context;
See the fix for this in the following commit on develop:
I’ve tested this in a variety of DAWs (Cubase, WaveLab, REAPER, BitWig,…) and everything seems to be working nicely…
…then I tried Studio One and it still crashes when the editor is destroyed (arrgghhh). I’m still investigating on what exactly is invalidating the GL context. The window is still open and visible and the opengl view and all of it’s parents are still there when the context is invalidated. I just don’t understand how I can get a callback just before the gl context is invalidated. I even tried this in a plug-in that doesn’t use JUCE at all (just a NSOpenGLView) and I still get a crash in Studio One.
Thank you for the quick fix, it solved the problem for me.
I don’t have access to Studio One, so haven’t tried that, but thanks for letting us know that it might still cause trouble.