Guru Meditation Error: after using lv_obj_add_event_cb on an ESP32-8048S070

I am getting started with an ESP32-8048S070 board that consists of a ESP32-WROOM-1 and a 7" TFT display with capacitive touch screen. I have selected the board as esp32-s3-devkitc-1-n16r8v and have been able to get the demos up and running using PlatformIO.

Now I am writing some test code and have been able to create a simple display using squareline studio and so far I can toggle outputs on and off. Now I am trying to create some callback functions using examples I found here. I am able to build and download to the device. Everything seems fine until I add the callback and now when I look at the output I see this scrolling by non stop.

ELF file SHA256: 39116256b5fdf676

Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x2a (SPI_FAST_FLASH_BOOT)
Saved PC:0x4038140f
mode:DIO, clock div:1
entry 0x403c98d4
Guru Meditation Error: Core 1 panic’ed (LoadProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x42007157 PS : 0x00060030 A0 : 0x82004a90 A1 : 0x3fcebd50
A2 : 0x00000000 A3 : 0x3fce9f40 A4 : 0x00000020 A5 : 0x80000000
A6 : 0x00060123 A7 : 0x00000000 A8 : 0x80000020 A9 : 0x00000007
A10 : 0x00000005 A11 : 0x00000001 A12 : 0x00000000 A13 : 0x00000020
A14 : 0x600c0030 A15 : 0x00000001 SAR : 0x00000000 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000008 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000

Backtrace: 0x42007154:0x3fcebd50 0x42004a8d:0x3fcebd80 0x42002683:0x3fcebdb0 0x4202b01a:0x3fcebdd0

I don’t know if I found a bug or failed to do something prior to using the lv_obj_add_event_cb function.

Any assistance would be greatly appreciated

Hi @GregM ,

Welcome to the LVGL community.

I am not familiar with your Hardware or PlaformIO but here is some generic advice for this type of issue, I have no idea of your level of expertise so if I am telling you what you already know please feel free to ignore this. :slight_smile:

Firstly I would take a look at the backtrace (sometimes called the call stack)

Look at the addresses listed and find which functions they are the addresses of, then you can see where in the code the problem is happening. Normally the first one in the list is the last function called at the time of the crash. Then working back with the next address being the function which called the previous addresses function and so on if that makes sense.

This type of problem is normally caused by attempting to access inaccessible memory, which can happen when a variable goes out of scope or the stack overflows or variables are incorrectly initialised. So I would check your variables are declared correctly, ie global, static and local as appropriate. If you allocate memory anywhere make sure the allocations succeed, make sure you are not freeing something which is still in use. Check you have a reasonable stack size.

Hopefully that will give you something to look at.

Feel free to post your code if you want us to take a look…

Please use the code block markers above and below your code if you do post any code, to help readability as follows

some code

I hope that helps.

Kind Regards,


monitor_filters = esp32_exception_decoder, default

add into platformio ini

Turns out, all I needed to do was move the lv_obj_add_event_cb function from the beginning of setup() to the end after all the TFT and Touchcrenn setup is done.

Thank you for your help.

1 Like

bonjour je debute avec ce meme ecran esp32-8048s070 et j’ai besoin de votre aide pour le faire marcher avec square line studio et lvgl