Lv_btn's signals recursive produces segmentation fault


I create a lv_cont on screen. The container’s size is 1920 * 1080.
And I create 5 pages in this container.
I switch page when I want to show this page. For example

static lv_obj_t* pages[5];
some init
//show first page

Now, I create some obj in these pages.
When I switch page, it happens segmentation fault.



It goes through an infinite recursive loop here, finally eventually results in a segmentation fault.
I don’t know what happens, can’t you help me?

What layout are you using? There is a known issue with layouts here.

The button uses LV_LAYOUT_CENTER and LV_FIT_TIGHT.
And It is created on a container, the container uses LV_LAYOUT_ROW_MID and LV_FIT_TIGHT.

Perhaps you could try LV_LAYOUT_PRETTY_MID instead; the bug report mentions that LV_LAYOUT_ROW_MID has issues.

I try to use LV_LAYOUT_PRETTY_MID just now, same problem.

Please a simple code snippet to reproduce.

I may not be able to do it, because It occurred only rarely, and the scene is complicated.
But I am sure that’s some layout caused it.
It hasn’t happened since I used LV_LAYOUT_OFF .