Replace Text using lv_label_set_text() in LVGL v9 does not clear previous text rendering

In LVGL v9, calling lv_label_set_text() on an existing label does not clear the previously drawn text the way it did for v8. Is this intentional?

I am seeing the old text persisting in the background of the new content — even when lv_obj_invalidate() is called immediately before or after updating the text.

This behavior worked as expected in LVGL v8, where changing the label text would automatically invalidate and refresh the label’s area properly.

Steps to recreate

lv_obj_t *value_label = lv_label_create(lv_scr_act());
lv_label_set_text(value_label, "----------");

// Sometime later
lv_label_set_text(value_label, "0");

Expected behavior:

The old text (“------”) should be fully cleared before rendering “0”.

Actual behavior:

The new text is drawn, but remnants of the old text (“-------”) remain visible underneath.

Environment

LVGL version: 9.3.0
OS: Zephyr (via Nordic nRF Connect SDK)

This turned out to be caused by the issue documented here:

https://github.com/lvgl/lvgl/issues/8582

The resolution documented there also resolved this.