Crashes (possibly OpenGL related) with JUCE 5.4.4

We’ve got a bunch of Mac users who are getting cashes since we updated JUCE to 5.4.4 (from v4.something). It looks like a memory corruption issue as the stack traces are different in each crash. We only offer OpenGL on the Mac, and one user reports the crashes stopped when he disabled OpenGL. We are following up with the other users at the moment.

Unfortunately I’ve not got a lot more to go on at the moment. Anyone aware of anything similar…

Well, we’ve had a second customer confirm that disabling OpenGL stops it crashing. We aren’t donig anything fancy other than using an OpenGLContext attached to a top level component.

Opengl context attached to editor on Mac (and iOS) has been troublesome for me too lately. the versions Match - experienced it starting from 5.4.4.
Did not have crashes but extremely sluggish behaviour on repaints (button clicks, scene changes… on iOS had to touch button twice before it actually went pressed)

No idea if this is Juce or maybe Apple having a nice witch hunt on apps using OpenGL.
My solution was to #ifdef to windows only since I currently don’t have any life or death situation like huge paths, heavy repainting or 3D stuff.

Did you try upgrading to JUCE 5.4.6? Since that version JUCE uses CVDisplayLink which might change OpenGL on Mac related issues for the better (we’ve been using CVDisplayLink for a while now and it helped with the various Mac OpenGL issues).


Not yet, but upgrading to latest JUCE is on my list of things to try today. It’s quite hard to test as we don’t have a replicable test case (though it crashed just once for me last night a few customers seem to be stuck with a crash every minute!)

Are you using multiple contexts in different components?

I think we just have the one!

I ask because I’m getting a hang crash using any version since November, but only with non-Catalina OSs. Did you ask your customers what version of OSX they’re using?

We’ve got a mix, definitely one 10.15 user tho!

The Juce demos now have this added to the render function

    if (openGLContext.extensions.glCheckFramebufferStatus (GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE)

I don’t know if it helps, but it stopped a hang in a texture update for me.