OpenCM 9.04 hangs when using Serial Port

Good afternoon, in our work we use the OpenCM 9.04, 3 ax-12a board, and when we display the state of the dynamics in Serial, then at some point the goal position values are not correct and the controller quickly freezes after that. Only restart helps. What is it and how to fix the situation?

When I set the angle to all the engines, I check in a loop to see if they have completed the command. Only then does the code continue.

void WaitServosPosPerformed() {
  int* servosPos = new int[JOINT_N];
  if (DEBUG_LEVEL >= 1) DEBUG_SERIAL.println("Current servos position: ");
  while (true) {
    int* servosPos = GetServosPos();
    bool* isMoving = GetServosMoving();
    if (DEBUG_LEVEL >= 1) {
      for (byte i = 0; i < JOINT_N; i++) {
        DEBUG_SERIAL.print(servosPos[i]);
        if (i < JOINT_N - 1) DEBUG_SERIAL.print(", ");
        else DEBUG_SERIAL.println();
      }
    }
    if (DEBUG_LEVEL >= 2) {
      for (byte i = 0; i < JOINT_N; i++) { // 1 - движение, 0 - движения нет
        DEBUG_SERIAL.print(isMoving[i]);
        if (i < JOINT_N - 1) DEBUG_SERIAL.print(", ");
        else DEBUG_SERIAL.println();
      }
    }
    if ((isMoving[0] == 0 && isMoving[1] == 0 && isMoving[2] == 0)) break;
    delay(10);
  }
  DEBUG_SERIAL.print("Motors performed position: ");
  for (byte i = 0; i < JOINT_N; i++) {
    DEBUG_SERIAL.print(servosPos[i]);
    if (i < JOINT_N - 1) DEBUG_SERIAL.print(", ");
    else DEBUG_SERIAL.println();
  }
}

int* GetServosPos() {
  int *pos = new int[JOINT_N];
  for (byte i = 0; i < JOINT_N; i++) {
    pos[i] = dxl.getPresentPosition(i + 1);
  }
  return pos;
}

int GetServoMoving(byte servoId) {
  return dxl.readControlTableItem(MOVING, servoId);
}

bool* GetServosMoving() {
  bool *moving = new bool[JOINT_N];
  for (byte i = 0; i < JOINT_N; i++) {
    moving[i] = dxl.readControlTableItem(MOVING, i + 1);
  }
  return moving;
}

Can someone tell me how to win this?