OpenGlContext::CachedImage::invalidate via repaint on background thread crashes


#1

I’m getting random crashes around the CachedImage’s visibleArea RectangleList. I think it’s because I’m calling repaint from a background thread without a message lock.

Is it supposed to be safe to call repaint from a background thread? If not, can we get an assert to check for the lock?

(internalRepaintUnchecked asserts for the lock when the heavyweight peer flag is set, but none otherwise)


#2

Yeah, repaint’s not safe to call without the MM lock - good point, I’ll add an assertion!


#3

Just updated to the tip of develop: now Component::internalRepaintUnchecked asserts all the frikking time!

Just tried resaving my app with a new build of the Projucer, which apparently some pool is used to draw components - and this pool isn’t locking the MM.