Lv_label_set_text_fmt crashed

Description

i tried to clear 6 seperate text labels simultaneously which made my code to restart (right from “void setup” ).

What MCU/Processor/Board and compiler are you using?

esp32s3

What LVGL version are you using?

8.3.11

What do you want to achieve?

clear 6 seperate text labels simultaneously.

What have you tried so far?

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

i have pasted relevant parts of my code below for reference.
void percent() {

  if (readString.length() > 0) {
    Serial2.print(readString);
    String messageend = readString.substring(readString.length() - 6, readString.length());
    const char* str502 = messageend.c_str();
    String messagestart = readString.substring(0, 18);
    const char* str501 = messagestart.c_str();
    String comp = readString.substring(0, 19);
    const char* str1 = comp.c_str();
    String compslid = readString.substring(0, 22);
    const char* str11 = compslid.c_str();
    const char* str10 = readString.c_str();
    if (strcmp(str1, str2) == 0) {
      Serial2.println("blue");
      readString.replace(" ", "");
      readString.replace("$", "");
      String hexDigits = readString.substring(readString.length() - 4, readString.length());
      long decimalValue = strtol(hexDigits.c_str(), NULL, 16);
      Serial2.println(decimalValue);
      char formattedValue[10];
      sprintf(formattedValue, "%05.2f", (float)decimalValue / 100.0);
      Serial2.println(formattedValue);
      label_xy();

      lv_label_set_text_fmt(ui_Label801, "%s %%", formattedValue);
    }
    if (strcmp(str1, str4) == 0) {
      Serial2.println("blue");
      readString.replace(" ", "");
      readString.replace("$", "");
      String hexDigits = readString.substring(readString.length() - 4, readString.length());
      long decimalValue = strtol(hexDigits.c_str(), NULL, 16);
      Serial2.println(decimalValue);
      char formattedValue[10];
      sprintf(formattedValue, "%05.2f", (float)decimalValue / 100.0);
      Serial2.println(formattedValue);
      label_xy1();
      lv_label_set_text_fmt(ui_Label802, "%s %%", formattedValue);
    }
    if (strcmp(str1, str5) == 0) {
      Serial2.println("blue");
      readString.replace(" ", "");
      readString.replace("$", "");
      String hexDigits = readString.substring(readString.length() - 4, readString.length());
      long decimalValue = strtol(hexDigits.c_str(), NULL, 16);
      Serial2.println(decimalValue);
      char formattedValue[10];
      sprintf(formattedValue, "%05.2f", (float)decimalValue / 100.0);
      Serial2.println(formattedValue);
      label_xy2();
      lv_label_set_text_fmt(ui_Label803, "%s ", formattedValue);
    }

    if (strcmp(str1, str6) == 0) {
      Serial2.println("blue");
      readString.replace(" ", "");
      readString.replace("$", "");
      String hexDigits = readString.substring(readString.length() - 4, readString.length());
      long decimalValue = strtol(hexDigits.c_str(), NULL, 16);
      Serial2.println(decimalValue);
      char formattedValue[10];
      sprintf(formattedValue, "%05.2f", (float)decimalValue / 100.0);
      Serial2.println(formattedValue);
      label_xy3();
      lv_label_set_text_fmt(ui_Label804, "%s %%", formattedValue);
    }

    if (strcmp(str1, str7) == 0) {
      Serial2.println("blue");
      readString.replace(" ", "");
      readString.replace("$", "");
      String hexDigits = readString.substring(readString.length() - 4, readString.length());

      long decimalValue = strtol(hexDigits.c_str(), NULL, 16);

      Serial2.println(decimalValue);
      //  Serial2.print(decimalValue1);
      char formattedValue[10];
      sprintf(formattedValue, "%05.2f", (float)decimalValue / 100.0);
      Serial2.println(formattedValue);
      label_xy4();
      lv_label_set_text_fmt(ui_Label805, "%s %%", formattedValue);
    }

    if (strcmp(str1, str8) == 0) {
      Serial2.println("blue");
      readString.replace(" ", "");
      readString.replace("$", "");
      String hexDigits = readString.substring(readString.length() - 4, readString.length());
      long decimalValue = strtol(hexDigits.c_str(), NULL, 16);
      Serial2.println(decimalValue);
      char formattedValue[10];
      sprintf(formattedValue, "%05.2f", (float)decimalValue / 100.0);
      Serial2.println(formattedValue);
      label_xy5();
      lv_label_set_text_fmt(ui_Label806, "%s °C", formattedValue);
    }

        if (strcmp(str10, str15) == 0) {

          goto_widget_flag = 71;

        }
  Serial2.println("stop");
        readString = "";
      }
    }

inside void loop ---

 lv_task_handler();
      lv_timer_handler();

      if (Serial2.available() > 0) {
        char c = Serial2.read();
        if (c == '\n') {
          percent();

        }

        else {

          readString += c;
        }
      }
 if (goto_widget_flag == 71) {
       lv_label_set_text_fmt(ui_Label801, " ");
        goto_widget_flag = 72;
      }
     
       if (goto_widget_flag == 72) {
       lv_label_set_text_fmt(ui_Label802, " ");
        goto_widget_flag = 73;
      }

      if (goto_widget_flag == 73) {
       lv_label_set_text_fmt(ui_Label803, " ");
        goto_widget_flag = 74;
      }

       if (goto_widget_flag == 74) {
       lv_label_set_text_fmt(ui_Label804, " ");
        goto_widget_flag = 75;
      }

       if (goto_widget_flag == 75) {
       lv_label_set_text_fmt(ui_Label805, " ");
        goto_widget_flag = 76;
      }

       if (goto_widget_flag == 76) {
       lv_label_set_text_fmt(ui_Label806, " ");
        goto_widget_flag = 1000;
      }

## Screenshot and/or video
If possible, add screenshots and/or videos about the current state.
here is a screenshot of the output printed on the serial monitor when the code restarts.
![LvglWidgets-LVGL-7.0 _ Arduino IDE 2.3.2 17-04-2024 17_28_11|690x356](upload://kO5gjZE5UE698pm3XBP9gLXMu1Y.png)