lvgl: Regression in v9, lodepng fails if cache is too small

LVGL version

v9.0.0

What happened?

In Tasmota, we have the same build for devices with PSRAM or without PSRAM. With PSRAM we can set define LV_CACHE_DEF_SIZE to a decently high value. But without PSRAM, the cache size is very small, or potentially set to 0.

The change is done at runtime with lv_cache_set_max_size()

This was not a problem with v8, but in v9 if the cache is too small to fit the image, the decoding fails.

However if the firmware is compiled with #define LV_CACHE_DEF_SIZE 0 decoding works fine although there is no cache.

My ask: if the cache is too small to fit the new image, decode it without caching instead of failing and not displaying the image.

How to reproduce?

No response

About this issue

  • Original URL
  • State: open
  • Created 5 months ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

Working on it

@PGNetHun are you saying this is the expected behavior?

It would be better to decode it and not cache it.

We say the same: the actual cache behaviour is wrong. The image should be decoded even if it does not fit into cache.