LVGL - How to correctly read .bin images from the SD card? (Or memory leak bug) #73072
-
Hello everyone, I encountered a possible memory leak in LVGL. I want to retrieve a .bin image from an SD card to display it on the screen. Before that, I converted the image to .bin format using https://lvgl.io/tools/imageconverter. The image reads and displays well on the screen. BUT I want to switch between different displays, removing the old display and getting a new one, which also has an image that I want to load from the SD card. Upon re-reading the image, even after clearing the cache, memory leaks. However, without loading the image from the SD card, the memory is released correctly. To reproduce the situation, I use the following code:
An example of the resulting debug is attached below in the image: Can anyone suggest a solution to this issue? Or maybe I am not freeing image resources correctly in LVGL? I would appreciate any help. I am using: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Solved. Problem was in the lvgl_fs. file. Memory wasn't released in the lvgl_fs_close function. https://devzone.nordicsemi.com/f/nordic-q-a/108039/nrf52840dk-lvgl-file-system Patch for fix it:
|
Beta Was this translation helpful? Give feedback.
Solved. Problem was in the lvgl_fs. file. Memory wasn't released in the lvgl_fs_close function. https://devzone.nordicsemi.com/f/nordic-q-a/108039/nrf52840dk-lvgl-file-system
Patch for fix it: