Opengl in jucedemo crashes

Hello,

I tried the current 2.0.38 juce version of the JuceDemo on linux, it compiles fine and most of it works, except when I go to the opengl demo it crashes/hangs.
JUCE Assertion failure in juce_OpenGLImage.cpp:184
which is:
OpenGLContext* currentContext = OpenGLContext::getCurrentContext();
jassert (currentContext != nullptr); // an OpenGL image can only be created when a valid context is active!

If I modify OpenGLDemo.cpp as follows:
void newOpenGLContextCreated()
{
openGLContext.makeActive ();
logoImage = createLogoImage();
dynamicTextureImage = Image (Image::ARGB, 128, 128, true, OpenGLImageType());
}
Then it works.

Seems the context isn’t set active before calling contextcreated?

Don’t know enough about linux debugging to dig deeper, I was just trying out on multi-platforms. I normally develop on win/mac.
Hope it’s enough to help?

Thanks.

Hmm… Something’s fishy there. The code that calls newOpenGLContextCreated() makes the context active immediately before calling that method. When you say 2.0.38, do you mean the latest from GIT? If not, maybe try that.

yep, latest from git, about 30min ago.
It was working fine with 2.0.32, I did the same test a while ago.

Ah, it’s just because the demo changes the active context in its initialisation routine. Thanks, will sort that out.