Lv_obj_clean(lv_scr_act()) causes Segmentation fault

Description

lv_obj_clean(lv_scr_act()) causes Segmentation fault

What MCU/Processor/Board and compiler are you using?

Linux FB

What do you want to achieve?

Clear screen before each tutorial

What have you tried so far?

Code to reproduce

lv_tutorial_hello_world();
lv_obj_clean(lv_scr_act());
lv_tutorial_objects();

This is inside the while loop inside block if (usCounter++ % 1000 == 0) to change tutorial every 5 seconds.

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

I’ve just fixed it in the master branch of lvgl.

However note that, lv_tutorial_objects creates and loads a new screen which won’t be deleted by lv_obj_clean. A proper close function would solve it, but tutorials and examples will be reworked in the next release. I’ll take care to do it correctly in the new version.

1 Like

Many thanks, it’s much better. It still seg faults after lv_tutorial_objects() and lv_test_stress_1() as you say.