Hi,
I hit an assert trying to load a drawable in a thread
In the code, it does
auto dp = new DrawablePath();
setCommonAttributes (*dp, xml);
dp->setFill (Colours::transparentBlack);
Where
void DrawableShape::setFill (const FillType& newFill)
{
if (mainFill != newFill)
{
mainFill = newFill;
repaint();
}
}
Where repaint does JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED
This isn’t possible ?
Thanks !
1 Like
You can use JUCE: juce::MessageManagerLock Class Reference to lock the message thread. Create one just before you call setFill().
The thing is I don’t do it myself, it’s in juce_SVGParser.cpp
So I’m just loading a drawable/SVG in a thread, not modifying it afterwards
I suppose you guys are only going to focus on the new SVG stuff in Juce 9 or something like that ?
t0m
May 7, 2026, 8:11am
5
Yes. We’re reasonably close to having a JUCE 9 preview branch ready, where we have already disentangled SVGs from Components, which in turn removes the message thread dependency.
6 Likes