Assert stops system with "prev physical block can't be null"

Development environment
OS : Linux Mint 21
IDE : VSCode
LVGL : 8.3
uP : RP2040 on Pico board
Gui Dev : Squareline Studio 1.3.2
Display : SPI ST7789 320x240 OLED


Code sticks at line marked ***

static block_header_t * block_merge_prev(control_t * control, block_header_t * block)
if(block_is_prev_free(block)) {
block_header_t * prev = block_prev(block);
tlsf_assert(prev && “prev physical block can’t be null”);
*** tlsf_assert(block_is_free(prev) && “prev block is not free though marked as such”);
block_remove(control, prev);

call stack leads back to lv_flex_init() line marked ***

void lv_flex_init(void)
*** LV_LAYOUT_FLEX = lv_layout_register(flex_update, NULL);

LV_STYLE_FLEX_FLOW = lv_style_register_prop(LV_STYLE_PROP_FLAG_NONE);


I have not used FLEX layout in the Squareline Studio GUI design (double checked).

If I disable lv_flex by setting LV_USE_FLEX to 0 in lv_conf.h then compile and build fails.

Any help appreciated

I can’t quite tell why this is happening. Do you know which function call lv_flex_init? Or is it just on startup?

As far as I can determine its just on startup

What you might try, is just running some basic UI without SQL generated ui active.

Just for the moment, replace ui_init(), with something like this Hello World example from the examples page:

    /*Create screen obj */
    lv_obj_t* screen = lv_obj_create(NULL); //I think this is correct, from the top of my head...

    /*Change the active screen's background color*/
    lv_obj_set_style_bg_color(lv_screen_active(), lv_color_hex(0x003a57), LV_PART_MAIN);

    /*Create a white label, set its text and align it to the center*/
    lv_obj_t * label = lv_label_create(lv_screen_active());
    lv_label_set_text(label, "Hello world");
    lv_obj_set_style_text_color(lv_screen_active(), lv_color_hex(0xffffff), LV_PART_MAIN);
    lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);

I will try that in a few days as I am away … Other info … have setup Arduino dev environment and have successfully compiled and loaded and run code. The only changes I made to the code was in an Arduino library (nothing to do with LVGL) and organized the code tree to fit in with Arduino .ino sketch file dependency requirements.
Will get back to VSCode environment on my return and report any useful findings …

Thanks for your help.