Description
Hello i’m new to lvgl and i’m now studying it.
I have a button that when clicked create/delete a list in the main window.
It works the first time creating the list, it works deleting it, but it crashes the ESP32 and reboot it if i try again to create it
What i’m doing wrong? what is the best way to do this?
What MCU/Processor/Board and compiler are you using?
ESP32 with ILI9341 on platformio.
What LVGL version are you using?
7.11.0
What do you want to achieve?
Create and remove objects based on events.
What have you tried so far?
lv_obj_del_async(lista);
with the same result
Code to reproduce
static void setting_event_cb(lv_obj_t *obj, lv_event_t event) {
// Serial.println("CLICK!!!!");
if (event == LV_EVENT_CLICKED) {
if (!lista) {
lista = lv_list_create(main_window, NULL);
lv_obj_set_width(lista, 160);
lv_obj_align(lista, NULL, LV_ALIGN_CENTER, 0, 0);
pulsanti = lv_list_add_btn(lista, LV_SYMBOL_SETTINGS, "Settings");
lv_obj_set_event_cb(pulsanti, event_handler);
pulsanti = lv_list_add_btn(lista, LV_SYMBOL_WIFI, "Wifi");
lv_obj_set_event_cb(pulsanti, event_handler);
}
else{
lv_obj_del(lista);
}
}
}
ERROR REPORTED IN CONSOLE:
Guru Meditation Error: Core 0 panic’ed (IllegalInstruction). Exception was unhandled.
Core 0 register dump:
PC : 0x5500ff77 PS : 0x00060a30 A0 : 0x800d4326 A1 : 0x3ffb3d70
A2 : 0x5500ff77 A3 : 0x00000000 A4 : 0x00000015 A5 : 0x3ffb3d84
A6 : 0x3ffc3c7c A7 : 0x3ffc51b8 A8 : 0x800d42c9 A9 : 0x00000000
A10 : 0x3ffc51b8 A11 : 0x00000015 A12 : 0x00000000 A13 : 0x3ffc3ebc
A14 : 0x00000001 A15 : 0x00000002 SAR : 0x0000000b EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x401070e4 LEND : 0x401070ee LCOUNT : 0x00000000
ELF file SHA256: 0000000000000000
Backtrace: 0x5500ff77:0x3ffb3d70 0x400d4323:0x3ffb3db0 0x400d629b:0x3ffb3dd0 0x400d63a7:0x3ffb3df0 0x400d1666:0x3ffb3e10 0x400d42c6:0x3ffb3e30 0x400d4323:0x3ffb3e70 0x400e88f3:0x3ffb3e90 0x400e9228:0x3ffb3eb0 0x400e0457:0x3ffb3f00 0x400e0535:0x3ffb3f20 0x400d1803:0x3ffb3f50 0x40086366:0x3ffb3fe0
Rebooting…
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8