Random out of memory and possible memory leak help wanted

Yes I was isolating block by bock until I manage to track the problem. Problem is caused by this block inside dashboard task.

if (is_connected_to_mqtt_broker()) {
  lv_obj_set_hidden(mqtt_icon, false);
} else {
  lv_obj_set_hidden(mqtt_icon, true);
}
// Implementation of that method. I'm using PubSub library and here I'm checking am I still connected to mqtt broker. 
bool is_connected_to_mqtt_broker() {
  return client.connected();
}

I didn’t fix the problem, but now I know what is causing a problem.

I was confused because of log

used: 7764 ( 11 %), frag: 2 %, biggest free: 62776, max: 71680
used: 71668 (100 %), frag: 34 %, biggest free: 8, max: 71680
E (95622) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in
time:
E (95622) task_wdt: - IDLE0 (CPU 0)
E (95622) task_wdt: Tasks currently running:
E (95622) task_wdt: CPU 0: gui
E (95622) task_wdt: CPU 1: loopTask
E (95622) task_wdt: Aborting.

because when watchdog is triggered it was printing me that I’m using 100% of ram. So I was thinking that it is memory leak.

SO EVERYTHING IS OK WITH AMAZING LVGL LIBRARY!

While I was searching to find out what is problem with this code I manage to discover some possible memory leak problem with source code for this example.


If you are interested I can create example code and record the video of behaviour.