Last app I created was a simple GUI with one screen, one panel and one label which text I pretend modify.
I have try to modify it from a FreeRTOS task <failed>, then I try to modify it using events <failed>.
The error I get is below. Here is the relevant part of the log:
I (851) MAIN: Event Posted
I (851) MAIN: Event Received
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x42045ab3 PS : 0x00060e30 A0 : 0x8200d86c A1 : 0x3fcb1a00
0x42045ab3: _lv_obj_get_ext_draw_size at E:/WorkSpace/REBIT/SquareLine_Project/components/lvgl/src/core/lv_obj_draw.c:393
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00060e20 A5 : 0x00060e23
A6 : 0xb33fffff A7 : 0xb33fffff A8 : 0x00000001 A9 : 0x00000000
A10 : 0x00060e23 A11 : 0x00000000 A12 : 0x00000000 A13 : 0x00000010
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000004 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000008 LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xfffffffe
0x400556d5: strlen in ROM
0x400556e5: strlen in ROM
Backtrace: 0x42045ab0:0x3fcb1a00 0x4200d869:0x3fcb1a20 0x4202534d:0x3fcb1a50 0x42008d3b:0x3fcb1a70 0x42047a89:0x3fcb1a90 0x42047b94:0x3fcb1af0
0x42045ab0: _lv_obj_get_ext_draw_size at E:/WorkSpace/REBIT/SquareLine_Project/components/lvgl/src/core/lv_obj_draw.c:392
0x4200d869: lv_obj_invalidate at E:/WorkSpace/REBIT/SquareLine_Project/components/lvgl/src/core/lv_obj_pos.c:857
0x4202534d: lv_label_set_text at E:/WorkSpace/REBIT/SquareLine_Project/components/lvgl/src/widgets/lv_label.c:90
0x42008d3b: i2cEventHandler at E:/WorkSpace/REBIT/SquareLine_Project/main/main.c:126
(inlined by) i2cEventHandler at E:/WorkSpace/REBIT/SquareLine_Project/main/main.c:121
0x42047a89: handler_execute at E:/Users/User/esp/components/esp_event/esp_event.c:137
(inlined by) esp_event_loop_run at E:/Users/User/esp/components/esp_event/esp_event.c:593
0x42047b94: esp_event_loop_run_task at E:/Users/User/esp/components/esp_event/esp_event.c:107 (discriminator 15)
ELF file SHA256: 5c2e407581eb43cb
Rebooting...
Here is the handler causing the error:
- static void i2cEventHandler(void* event_handler_arg, esp_event_base_t event_base, int32_t event_id, void* event_data) {
- switch (event_id) {
- case DATA_READY:
- ESP_LOGI(T2G, "Event Received");
- if (xSemaphoreTake(labelMutex, portMAX_DELAY) == pdTRUE) {
- lv_label_set_text(ui_mainLabel, output);
- // Release the mutex
- xSemaphoreGive(labelMutex);
- }
- break;
- default:
- ESP_LOGI(T2G, "Default Event Received");
- break;
- }
- }
The error does not happen and the application runs fine
I can share the whole code if needed
Please, can anybody help me to do it the right way?
Regards