(CLOSED) OpenGL reproducible CRASH in Juce Demo


#1

Steps:

  • Run JUCE Demo, latest tip (Debug or Release)
  • Choose Test type “Glyphs”
  • Check Animate position, size, and rotation
  • Choose Use OpenGL Renderer from the Look-and-feel menu (FYI this is misspelled, “Use Use”)
  • Optionally attempt to pull down a menu from the menu bar

Eventually it will crash. Trying to open a menu sometimes makes it crash sooner.

The crash appears to be a concurrency issue, two Graphics contexts in separate threads are accessing the Typeface / glyph cache at the same time, to disasterous effect. This screenshot shows the two threads and the associate call stacks:

[attachment=0]JuceDemoCrash.png[/attachment]


#2

Can anyone else reproduce this?


#3

Yep. (Windows 8 x64)


#4

I couldn’t reproduce this myself, but I did spot a bit of dodgy concurrency code that might have allowed it to run those two threads at the same time (which wasn’t ever supposed to happen). I’ve fixed the threading now, so try again…


#5

Did you try this under Windows?

Anyway, it seems that I can no longer get it to crash with your latest changes.


#6

Yes, under Windows. The fix I made did seem like a likely candidate for your problem.