Memory and ESP32

Description

I have been working on a project on VS sim.
then ported it successfully on the esp32.
but I had to update the LVGL library for the esp32, To get the full Arabic support that I and MR. Gabor worked on the past month.-by manually copying the version I used at VS-
and it works fine till I try to select the third tap.
then it crashes half the way in.


producing this error.

Error: _lv_mem_buf_get  (lv_mem.c #539 _lv_mem_buf_get())
Error: No free buffer. Increase LV_DRAW_BUF_MAX_NUM. (0x00000000)       (lv_debug.c #127 lv_debug_log_error())

I don’t know which buffer is this and how to control it.
it is weird because the Arabic processing shouldn’t make that much of a difference.

What have you tried so far?

doubled the memory size for lv_mem_malloc.


it was 32kb. making it 64 didn’t help.

=====================

I increased the buffer display size from display_width* 40 to display_width* 64.
and it also didn’t help.

help needed

cuz I still need to add items to the screen.
and this project is smaller -I believe- than the out of the box demo.
and the demo works fine.
I am afraid because I won’t be able to change the esp32 to any other platform. :frowning:

I have never seen anyone encounter this error with a released version, but try #define LV_MEM_BUF_MAX_NUM 32 in your lv_conf.h file.

These buffers are separate from the heap; that’s why increasing that did not solve the error.

yes, this is not a released version.
can you tell me what buffer is this?
it is kinda feel that LVGL saves everything in memory even if it is offscreen.
is there is a way to prevent this.
what are the best practices in such situation?
what items or features that I can cut of the library.

=============
OH. THANKS GOD.
your solution worked :heart:
but I still want to understand what is happening under the hood.
if you ever though of making a course about software engineering.
giving this library as an example, I will be the first to buy.
cheers :heart:
and many thanks

and is it a bad thing that I encountered this error?
even if it now fixed?
what does it have to do with released version or a developer one?

Now, It is weird because this buffer has nothing to do with the Esp32 memory
because it is the same at VS and this error never happened there

I suspect that Arabic characters require a larger number of these buffers than normal text, due to the added processing complexity. We may need to increase the default value or at least add a note to increase this if Arabic text is being used.

no, it was working fine with the default number at VS with the same project. :thinking:
don’t you know what are these buffer for?
maybe Mr @kisvegabor can help?