Potential Exception Due to Task Priority in esp_lvgl_port
with LVGL9 (BSP-596)
#455
Open
1 task done
Labels
Board
ESP32S3
Hardware Description
ESP32S3+ST7789
IDE Name
ESP-IDF5.3 + esp_lvgl_port 2.4.3 + lvgl 9.2.2
Operating System
UBUNTU24.10
Description
During code debugging, the following exception occurred:
The assembly code corresponding to the exception:
The cause of the exception is that the
control
parameter was not properly initialized and was actually a null pointer.The root cause was traced back to the initialization process:
lvgl_port_init()
and thenlvgl_port_add_disp()
.lv_init()
function is directly called withinlvgl_port_init()
, and the program runs normally.lv_init()
function is scheduled to run within thelvgl_port_task()
, a task created bylvgl_port_init()
. If the priority oflvgl_port_task()
is lower than the current task, thelv_init()
function may not have been executed by the timelvgl_port_add_disp()
calls the LVGL9 API, which can lead to the exception.Sketch
Other Steps to Reproduce
Suggested Solution:
lvgl_port_add_disp()
only runs afterlv_init()
has been completed.I have checked existing issues, README.md and ESP32 Forum
The text was updated successfully, but these errors were encountered: