ESP32-S3 Guru meditation error using LVGL library

Hugo_Weijers
Posts: 2
Joined: Fri Nov 24, 2023 9:44 am

ESP32-S3 Guru meditation error using LVGL library

Postby Hugo_Weijers » Fri Nov 24, 2023 9:59 am

Hi, I'm trying to use LVGL to make a GUI for a 3.5" TFT Capacitive touch display. I have tested the display with arduino, so I know it is set up correctly. I'm running the examle_get_started_1.c file from the LVGL version 8.3 branch (https://github.com/lvgl/lvgl/tree/release/v8.3) In examples/get_started. I have done all the set-up of LVGL and I can build the program, but when I flash the code, I get the following error:

Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.

Core 0 register dump:
PC : 0x4200a139 PS : 0x00060230 A0 : 0x82009935 A1 : 0x3fca4280
0x4200a139: lv_obj_mark_layout_as_dirty at C:/Users/hugo/sample_project/components/lvgl/src/core/lv_obj_pos.c:290

A2 : 0x00000000 A3 : 0x3c03678c A4 : 0x0000003a A5 : 0x3c0367b8
A6 : 0x00000000 A7 : 0x00000002 A8 : 0x3fca06c4 A9 : 0x3fca4260
A10 : 0x00000000 A11 : 0x3fc94c84 A12 : 0x00000024 A13 : 0x0000ff00
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000012 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000022 LBEG : 0x400556d5 LEND : 0x400556e5 LCOUNT : 0xfffffff5
0x400556d5: strlen in ROM

0x400556e5: strlen in ROM



Backtrace: 0x4200a136:0x3fca4280 0x42009932:0x3fca42a0 0x420145b3:0x3fca42c0 0x420126fe:0x3fca42e0 0x42008996:0x3fca4300 0x4200898b:0x3fca4320 0x4202508f:0x3fca4340 0x4037bf6d:0x3fca4370

I have followed the backtraces and found that the error leads to a pointer. I have reads that the error:
'Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.'
Has to do with pointers poining to NULL, but I do not know how to fix it. I think my issue has to do with how I configured the LVGL library and specifically with the memory, as this is where the error occurs. I am very uncertain though and I hope that someone that has a bit more knowledge about this could help me.

ESP_Sprite
Posts: 9575
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-S3 Guru meditation error using LVGL library

Postby ESP_Sprite » Sat Nov 25, 2023 3:19 am

Can you post your code and the backtrace?

Hugo_Weijers
Posts: 2
Joined: Fri Nov 24, 2023 9:44 am

Re: ESP32-S3 Guru meditation error using LVGL library

Postby Hugo_Weijers » Mon Nov 27, 2023 8:41 am

The code I'm using is unaltered from the following LVGL githuib library: https://github.com/lvgl/lvgl.git.
The backtrace is as followed:
Backtrace: 0x4200a192:0x3fca60a0 0x4200998e:0x3fca60c0 0x42013c6f:0x3fca60e0 0x4201134e:0x3fca6100 0x42008a21:0x3fca6120 0x42008a13:0x3fca6140 0x42027f57:0x3fca6160 0x4037d159:0x3fca6190
0x4200a192: lv_obj_mark_layout_as_dirty at C:/Users/hugo/sample_project/components/lvgl/src/core/lv_obj_pos.c:289

0x4200998e: lv_obj_class_init_obj at C:/Users/hugo/sample_project/components/lvgl/src/core/lv_obj_class.c:106

0x42013c6f: lv_btn_create at C:/Users/hugo/sample_project/components/lvgl/src/widgets/lv_btn.c:53

0x4201134e: lv_example_get_started_1 at C:/Users/hugo/sample_project/components/lvgl/examples/get_started/lv_example_get_started_1.c:23

0x42008a21: c_screen_example1 at C:/Users/hugo/sample_project/main/lib/c_screen/c_screen.c:14

0x42008a13: app_main at C:/Users/hugo/sample_project/main/main.c:45

0x42027f57: main_task at C:/Users/hugo/esp/esp-idf/components/freertos/app_startup.c:208 (discriminator 13)

I have ound out that the error refers to a NULL pointer. In the code there is a function that sets disp = disp_ref, and then they check if disp is 0. However my disp value is always 0. I'm not sure if this is still an ESP32 issue or that it's something that I should post on LVGL.

fishline
Posts: 1
Joined: Tue Dec 12, 2023 2:14 am

Re: ESP32-S3 Guru meditation error using LVGL library

Postby fishline » Tue Dec 12, 2023 5:37 am

I encountered the same problem,no solution for me!

moefear85
Posts: 43
Joined: Sun Sep 05, 2021 4:55 pm

Re: ESP32-S3 Guru meditation error using LVGL library

Postby moefear85 » Tue Dec 12, 2023 6:51 pm

it means your display isn't setup correctly. The object must exist and you must pass its handle to lvgl. lvgl unfortunately doesn't check & gracefully handle the case where the display is not set up hence its address is NULL. lvgl doesn't automatically setup the display.

moefear85
Posts: 43
Joined: Sun Sep 05, 2021 4:55 pm

Re: ESP32-S3 Guru meditation error using LVGL library

Postby moefear85 » Tue Dec 12, 2023 6:53 pm

Hugo_Weijers wrote:
Mon Nov 27, 2023 8:41 am
However my disp value is always 0
That means your display was never working. You should ask in the LVGL forums why this is so, and mention what controller it is and show how it is being created (in software) and how it is wired to mcu.

Who is online

Users browsing this forum: No registered users and 206 guests