Crash when setting button event handler

Code

Warn] (4.407, +4407) lv_draw_buf_create_ex: No memory: 27x64, cf: 14, stride: 27, 1728Byte, lv_draw_buf.c:272
[Error] (4.407, +0) lv_draw_unit_draw_letter: Asserted at expression: draw_buf != NULL (Out of memory) lv_draw_label.c:647

I am getting the above error when just setting an event handler for a button. The board appears to have enough memory. I am using lvgl 9.5, Arduino CYD board and Arduino IDE 2.3.8. Any help will be appreciated.

@lasvegasjose , Could you share a code snippet? And the lv_config.h file?

OK, first two snippets:
static void stub1(lv_event_t * e) {
if (lv_event_get_code(e) != LV_EVENT_CLICKED) return;
Serial.println(“stub1”);
}
lv_obj_add_event_cb(objects.manual_set_button, stub1, LV_EVENT_CLICKED, NULL);

This code is part of a very cool app written by somebody else that I am trying to get to work. The lv_conf.h is attached.
lv_conf.h (51.6 KB)

Jose

Hi José, I haven’t been able to identify the root cause of your problem. Could you provide more details about the project?

I tested it using the LVGL simulator, since I don’t have the same board, but I didn’t find any problems.

First thank you much for the help!

Second I am trying to get the following project to work with the CYD boards I bought from Amazon. I emailed the developer and he blamed my boards.

FYI: I got the app running with the assigment of the button handlers commented out. But without them you cannot set the time nor use the wifi so they are needed.

Jose