qdsang / lv_gui_builder

Drag end drop GUI designer for LVGL Creator
https://qdsang.github.io/lv_gui_builder/
Other
64 stars 12 forks source link

Generated C Code references freed memory #2

Open Isarhamster opened 4 months ago

Isarhamster commented 4 months ago

Wherever lv_style_tvariables are used, you need to use static lv_style_t. Reason is, that calling lv_style_init passes a pointer to memory that is expected to persist infinitely. After leaving the lvgl_lv_-function, the style memory is freed but lvgl accesses the freed memory for painting.

qdsang commented 4 months ago

get, I'll go fix it