8.2.0 - invalid rendering of roller with 60 options and mode LV_ROLLER_MODE_INFINITE

This is from my code and worked as expected under 8.0.2 (and 8.1.0):

    lv_obj_t * stormlapse_rollTimeMins = lv_roller_create(lv_scr_act());
    lv_roller_set_options(stormlapse_rollTimeMins, "00\n" "01\n" "02\n" "03\n" "04\n" "05\n" "06\n" "07\n" "08\n" "09\n" "10\n"
                                                     "11\n" "12\n" "13\n" "14\n" "15\n" "16\n" "17\n" "18\n" "19\n" "20\n"
                                                     "21\n" "22\n" "23\n" "24\n" "25\n" "26\n" "27\n" "28\n" "29\n" "30\n"
                                                     "31\n" "32\n" "33\n" "34\n" "35\n" "36\n" "37\n" "38\n" "39\n" "40\n"
                                                     "41\n" "42\n" "43\n" "44\n" "45\n" "46\n" "47\n" "48\n" "49\n" "50\n"
                                                     "51\n" "52\n" "53\n" "54\n" "55\n" "56\n" "57\n" "58\n" "59", LV_ROLLER_MODE_INFINITE);

Under 8.2.0, in my app and under CodeBlocks simulator with 8.2.0, the roller does not render as expected, but does responds to user input to change the selected value. Either a blank or overlapping label values from different parts of the options list are seen as the roller is rolled.

If I change the mode to LV_ROLLER_MODE_NORMAL it renders fine
If I reduce the number of options to around 30, it renders fine

Probably you should enable LV_USE_LARGE_COORD in lv_conf.h.

That did resolve it, but it wasn’t necessary for the working implementation in the previous minor release. Won’t this setting increase the memory utilization of the entire application for items using lv_coord_t, for the sake on this one mode of one roller?

Changing this also “broke” my implementation of overriding the drawing on a scatter chart, so need to investigate that now.

Yes, it increases the size of lv_coord_t so the RAA usage is is also slight increased. Instead of it you can also set LV_ROLLER_INF_PAGES 5.

Hmm, that’s quite unexpected. Let me know if you find an LVGL related issue.

Finally I see what LV_ROLLER_INF_PAGES does, lol. Setting to 3 worked without needing to use large coords, and that will work for me. At 5, it still manifested the same issue.

The chart issue was unexpected. I have tried to recreate using as much of the same code and configuration in CodeBlocks simulator, but it works fine there with LV_USE_LARGE_COORD set to 0 and 1 - in my code base, it only works with 0. So I’ll take that as being on me, although I can’t immediately see why.

Thanks for the help!

1 Like