Description
lv_label_set_text_fmt crash
What MCU/Processor/Board and compiler are you using?
ESP32
What do you experience?
Guru Meditation Error: Core 0 panic’ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x40113e9e PS : 0x00060f30 A0 : 0x8010a9e7 A1 : 0x3ffaf720
0x40113e9e: lv_draw_label at /home/fzb/esp/esp-idf/project/ESP32/components/lvgl/lvgl/src/lv_draw/lv_draw_label.c:65
A2 : 0x3ffaf828 A3 : 0x00000000 A4 : 0x3ffc2504 A5 : 0x000000ff
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x00000000
A10 : 0x00000001 A11 : 0x00000001 A12 : 0x00000008 A13 : 0x3ffaf830
A14 : 0x000100fb A15 : 0x0013011a SAR : 0x0000001e EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0xffffffff
ELF file SHA256: 5c3c892ac1ff91aa5ab405873591c633ac23876aadee32abba96055fde89b5fd
Backtrace: 0x40113e9b:0x3ffaf720 0x4010a9e4:0x3ffaf810 0x4010059d:0x3ffaf870 0x40100617:0x3ffaf8c0 0x40100640:0x3ffaf910 0x401006cb:0x3ffaf930 0x40100a6d:0x3ffaf960 0x401054cf:0x3ffaf9b0 0x401055d0:0x3ffaf9d0 0x400d6ea7:0x3ffaf9f0 0x400d4a7c:0x3ffafa10
0x40113e9b: lv_draw_label at /home/fzb/esp/esp-idf/project/ESP32/components/lvgl/lvgl/src/lv_draw/lv_draw_label.c:60
0x4010a9e4: lv_label_design at /home/fzb/esp/esp-idf/project/ESP32/components/lvgl/lvgl/src/lv_objx/lv_label.c:1068
0x4010059d: lv_refr_obj at /home/fzb/esp/esp-idf/project/ESP32/components/lvgl/lvgl/src/lv_core/lv_refr.c:517
0x40100617: lv_refr_obj at /home/fzb/esp/esp-idf/project/ESP32/components/lvgl/lvgl/src/lv_core/lv_refr.c:547
0x40100640: lv_refr_obj_and_children at /home/fzb/esp/esp-idf/project/ESP32/components/lvgl/lvgl/src/lv_core/lv_refr.c:459
0x401006cb: lv_refr_area_part at /home/fzb/esp/esp-idf/project/ESP32/components/lvgl/lvgl/src/lv_core/lv_refr.c:397
0x40100a6d: lv_refr_area at /home/fzb/esp/esp-idf/project/ESP32/components/lvgl/lvgl/src/lv_core/lv_refr.c:353
(inlined by) lv_refr_areas at /home/fzb/esp/esp-idf/project/ESP32/components/lvgl/lvgl/src/lv_core/lv_refr.c:278
(inlined by) lv_disp_refr_task at /home/fzb/esp/esp-idf/project/ESP32/components/lvgl/lvgl/src/lv_core/lv_refr.c:171
0x401054cf: lv_task_exec at /home/fzb/esp/esp-idf/project/ESP32/components/lvgl/lvgl/src/lv_misc/lv_task.c:370 (discriminator 1)
0x401055d0: lv_task_handler at /home/fzb/esp/esp-idf/project/ESP32/components/lvgl/lvgl/src/lv_misc/lv_task.c:135
What do you expect?
Code to reproduce
The crash always appears in the second of these two functions. The second is called immediately after the first function.
The crash does not occur every time, but after a while, these two functions work normally for a while, and suddenly appear.
They won’t be called at the same time because I used a mutex.
void desktop_set_temp(int temp)
{
lv_label_set_text_fmt(topcont_temp_label, "%d℃", temp);
}
void desktop_set_humi(int humi)
{
lv_label_set_text_fmt(topcont_humi_label, "%d%%", humi);
}