Set the widget arc value at runtime

Hello,

I’m using LVGL 8.3.8

How can I set the widget arc value at runtime / in a loop (not at initialization)?
If I do following the program freezes. I think it is the wrong function.

lv_arc_set_value(ui.screen_arc_1, arcValue);

Thank you

EDIT:
with debug I can see that the void MemManage_Handler(void) is called… so some assertion problems?
(HAL Library, STM32)