[Bug]: DrawableText default ctor triggers assertion in juce::FontOptions::withHeight
Detailed steps on how to reproduce the bug
Instantiate a juce::DrawableText through its default constructor. The ctor calls DrawableText::setBoundingBox which ultimately ends up calling DrawableText::refreshBounds using the uninitialised member fontHeight which is NaN at that point.
What is the expected behaviour?
No assertion on default construction
Operating systems
macOS
What versions of the operating systems?
26.1
Architectures
x86_64
Stacktrace
#0 0x000000010037d4d4 in juce::FontOptions::withHeight at JUCE/modules/juce_graphics/fonts/juce_FontOptions.h:145
#1 0x00000001002d9418 in juce::Font::SharedFontInternal::setHeight at JUCE/modules/juce_graphics/fonts/juce_Font.cpp:321
#2 0x00000001002d9041 in juce::Font::setHeight at JUCE/modules/juce_graphics/fonts/juce_Font.cpp:599
#3 0x00000001006131a8 in juce::DrawableText::refreshBounds at JUCE/JUCE/modules/juce_gui_basics/drawables/juce_DrawableText.cpp:151
#4 0x0000000100612dbb in juce::DrawableText::setBoundingBox at JUCE/JUCE/modules/juce_gui_basics/drawables/juce_DrawableText.cpp:120
#5 0x0000000100612b3a in juce::DrawableText::DrawableText at JUCE/JUCE/modules/juce_gui_basics/drawables/juce_DrawableText.cpp:42
#6 0x0000000100612ea5 in juce::DrawableText::DrawableText at JUCE/JUCE/modules/juce_gui_basics/drawables/juce_DrawableText.cpp:41
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the develop branch
I have not tested against the develop branch
Code of Conduct
- [x] I agree to follow the Code of Conduct
Have you tested the develop branch? We merged a change that sounds like it'll address this issue yesterday: https://github.com/juce-framework/JUCE/commit/195795047eb9a1e0189e0c3b5f10569c20235d55
Did have time to test yet. But looking at the commit I'd be 99% sure it's fixed :)