I am having a strange overlapping issue while trying to load a screen from another screen.
For example, let say in a task I am doing this:
lv_scr_load_anim(home_scr, LV_SCR_LOAD_ANIM_FADE_ON, 500, 10, 0);
//create another task to load the menu after some delay
task2 = lv_task_create(menu_scr_load, 3000, LV_TASK_PRIO_MID, NULL);
lv_task_once(task2);
this works fine in the simulator, but when i ran it on my hardware, then 2 screens kinda overlap each other & creates a mess. Do i have to somehow manually clean the prev screen after/before loading a new screen?
This is just to simulate that screen loading works fine with my code, in reality it will be triggered by a hw input ofc.
Hmm. Please send a good quality video about a slow (e.g. 10000 ms) screen change animation.
I suggest trying this: add a button to the new screen with a click event that calls lv_obj_invalidate(lv_scr_act()). When the screen is loaded click the button. Does it remove the artifacts?
For now I just want to be sure that UI can work, so I can simulate that button press in a task right? But that too has no effect to my issue. This is what I have tried:
I have added lv_obj_invalidate(lv_scr_act()) just before that line, tried after that line too, nothing changed.
I donât know why but even after I have enabled logging from menuconfigm and set it to âTrace - Detailed informationâ I still couldnât see any log related to lvgl. I had to enable âPrint the log with âprintfââ option. Also, the esp log is set to Verbose, but I donât think it has any relation to lvglâs logging.
But anyways, hereâs what I found found interesting in the logs, I am going mad now that I havenât checked the logs before
Warn: Couldn't allocate memory (lv_mem.c #199 lv_mem_alloc())
Warn: Couldn't allocate memory (lv_mem.c #306 lv_mem_realloc())
Error: _lv_mem_buf_get (lv_mem.c #511 _lv_mem_buf_get())
Error: Out of memory, can't allocate a new buffer (increase your LV_MEM_SIZE/heap size) (0x00000000) (lv_debug.c #127 lv_debug_log_error())