Description
Getting segmentation fault when trying to assign a font.
What MCU/Processor/Board and compiler are you using?
Raspberry Pi
What do you want to achieve?
Would be nice if it did not crash !
What have you tried so far?
N/A
Code to reproduce
I currently have defined three fonts which are used to render different parts of my screen.
Note that this code is C++ and the variables are private members of my screen class and the fonts are assigned in the class constructor.
The font member variables are defined as such:
const lv_font_t * _smallFont;
const lv_font_t * _normalFont;
const lv_font_t * _largeFont;
I assign them thus:
_smallFont = &lv_font_montserrat_12;
_normalFont = &lv_font_montserrat_16;
_largeFont = &lv_font_montserrat_28;
This all seems to work fine.
Then I decided I needed another font so I added:
const lv_font_t * _readoutFont;
and
_readoutFont = &lv_font_montserrat_24;
When I run this code I immediately get a Segmentation fault.
If I comment out _readoutFont = &lv_font_montserrat_24; then the code runs fine !
Screenshot and/or video
N/A
Any thoughts what I might be doing wrong ?
Andy