Unusual error with adding background color to chart - how to add bg to chart?

I’m using esp32 with LVGL 8.3.8

The error I’m getting is

Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core  0 register dump:
PC      : 0x4201b401  PS      : 0x00060f30  A0      : 0x8201b499  A1      : 0x3fcac8b0  
0x4201b401: get_prop_core at /path/managed_components/lvgl__lvgl/src/core/lv_obj_style.c:602
A2      : 0x3fcaa1b8  A3      : 0x00000000  A4      : 0x3fcaa3fc  A5      : 0x00270024  
A6      : 0x00000002  A7      : 0x01000000  A8      : 0x8201b37d  A9      : 0x3fcac890  
A10     : 0x00000001  A11     : 0x00000016  A12     : 0x3fcac8b0  A13     : 0x3fc9b7bc  
A14     : 0x3fc98c18  A15     : 0x00060420  SAR     : 0x0000001f  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x0027002a  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xfffffffb  
0x400556d5: strlen in ROM
0x400556e5: strlen in ROM
Backtrace: 0x4201b3fe:0x3fcac8b0 0x4201b496:0x3fcac900 0x42019b95:0x3fcac930 0x42021384:0x3fcac960 0x42022dfd:0x3fcac990 0x42009eb4:0x3fcac9c0 0x420099fd:0x3fcac9e0 0x4037f711:0x3fcaca00
0x4201b3fe: get_prop_core at /path/managed_components/lvgl__lvgl/src/core/lv_obj_style.c:602
0x4201b496: lv_obj_get_style_prop at /path/managed_components/lvgl__lvgl/src/core/lv_obj_style.c:229
0x42019b95: lv_obj_get_style_base_dir at /path/managed_components/lvgl__lvgl/src/core/lv_obj_style_gen.h:561
 (inlined by) lv_obj_get_scroll_left at /path/managed_components/lvgl__lvgl/src/core/lv_obj_scroll.c:167
0x42021384: invalidate_point at /path/managed_components/lvgl__lvgl/src/extra/widgets/chart/lv_chart.c:1683
0x42022dfd: lv_chart_set_next_value2 at /path/managed_components/lvgl__lvgl/src/extra/widgets/chart/lv_chart.c:559
0x42009eb4: UI::addRandomNumberToChart() at /path/main/ui/ui.cpp:181
0x420099fd: vTaskCode at /path/main/main.cpp:44 (discriminator 1)
0x4037f711: vPortTaskWrapper at /path/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:162

The issue is - this started happening after I added a style to the chart - I’m unsure of how would that impact anything.
Here is the relevant code:

void UI::addRandomNumberToChart() {
  if (xSemaphoreTake(mutex, (TickType_t)1000) == pdTRUE) {
    ref = real_time;
    lv_chart_set_next_value2(chart, ser1, ref, 0);  // lv_rand(490, 510));
    real_time += 3;

And the piece that I’ve actually changed and it’s causing the error:

  chart = lv_chart_create(ui_Screen1);
  lv_obj_add_style(chart, &chart_style, LV_PART_MAIN); // <- causes error
  // lv_obj_set_style_bg_color(chart, lv_color_hex(0x42819B), 0); //<- causes error
  lv_style_set_bg_color(&chart_style, lv_color_hex(0x42819B)); // <- causes error

Either adding a style and setting style bg color, or setting bg color directly on a chart make the error appear and I have no idea how to debug it.
If all troublesome lines are commented out - no error, everything runs smoothly.
Any idea how to figure out what’s wrong?
The whole init code:

void UI::initLiveChart() {
  ui_Screen1 = lv_obj_create(NULL);
  lv_obj_add_style(ui_Screen1, &style_ui, 0);

  chart = lv_chart_create(ui_Screen1);
  lv_obj_add_style(chart, &chart_style, LV_PART_MAIN);
  // lv_obj_set_style_bg_color(chart, lv_color_hex(0x42819B), 0);
  lv_style_set_bg_color(&chart_style, lv_color_hex(0x42819B));

  lv_obj_set_size(chart, 600, 300);
  lv_obj_align(chart, LV_ALIGN_CENTER, -30, -30);
  lv_obj_set_style_line_width(chart, 2, LV_PART_ITEMS);
  lv_obj_set_style_size(chart, 0, LV_PART_INDICATOR);
  lv_chart_set_type(chart, LV_CHART_TYPE_SCATTER);

  lv_chart_set_axis_tick(chart, LV_CHART_AXIS_PRIMARY_X, 5, 5, 25, 1, true, 30);
  lv_chart_set_axis_tick(chart, LV_CHART_AXIS_PRIMARY_Y, 10, 5, 6, 5, true, 50);

  lv_chart_set_range(chart, LV_CHART_AXIS_PRIMARY_X, 0, 6000);
  lv_chart_set_range(chart, LV_CHART_AXIS_PRIMARY_Y, 0, 1000);
  ser1 = lv_chart_add_series(chart, lv_palette_main(LV_PALETTE_RED),
  lv_chart_set_point_count(chart, 500);
  lv_chart_set_zoom_x(chart, 1536);
  lv_obj_set_scrollbar_mode(chart, LV_SCROLLBAR_MODE_OFF);
  lv_obj_clear_flag(chart, LV_OBJ_FLAG_SCROLLABLE);

  ESP_LOGI(TAG, "Initiated UI");

I’m not entirely sure this is the right answer, but I fixed it by putting the chart into a container.