LVGL fails to draw properly when LV_DRAW_COMPLEX=1


Hello, due to project requirements, I initially had a test board with MIPI LCD and SDRAM. My program runs on the SDRAM, and all variables are defined in the SDRAM as well. In this case, all the functions of the program work fine. Then, I obtained an final board which had a different MIPI screen. Due to size requirements, it uses HyperRAM instead. The program now runs on NOR Flash, and I defined all the large variables required by LVGL in the HyperRAM. The rest of the program, including lv_conf.h, remains unchanged.

However, in this situation, I encountered some strange issues. On my existing GUI, there are multiple screens. Screen 1 has some labels, and Screen 2 has a list. If I directly open Screen 2, the program always freezes in the lv_task_handler. If I first open Screen 1 and then open Screen 2, Screen 2 can load correctly. However, if I repeatedly load Screen 2 multiple times, the program still freezes. Additionally, I noticed that the display of components like switches and buttons is not normal.

Therefore, I created a separate LVGL project and a simple screen. It contains a button, and I have enabled LV_USE_PERF_MONITOR. The background of the button should be blue, but each time after power-on, it shows one of the following four behaviors.

I found that the code always gets stuck at lv_event_send(obj, LV_EVENT_DRAW_MAIN, draw_ctx), and ultimately, it gets stuck at lv_draw_sw_rect. The call process of lv_draw_sw_rect is as follows:

		refr_obj_and_children(draw_ctx, top_act_scr);
					lv_event_send(obj, LV_EVENT_DRAW_MAIN, draw_ctx);
								base->event_cb(base, e);//lv_obj_event
										lv_draw_rect(draw_ctx, &draw_dsc, &coords);
											draw_ctx->draw_rect(draw_ctx, dsc, coords);//lv_draw_nxp_rect
												#if LV_DRAW_COMPLEX
												/* Draw the shadow with CPU */
												lv_draw_sw_rect(draw_ctx, &nxp_dsc, coords);//Stuck here!
												nxp_dsc.shadow_opa = 0;
												#endif /*LV_DRAW_COMPLEX*/

lv_draw_sw_rect(draw_ctx, &nxp_dsc, coords);//Stuck here!
    lv_draw_sw_blend(draw_ctx, &blend_dsc)
           vg_lite_finish()     //Stuck here

The program stuck in vg_lite_finish() in the function lv_event_send(obj, LV_EVENT_DRAW_MAIN, draw_ctx) rather than every time vg_lite_finish() is called.Then, I tested by disabling LV_DRAW_COMPLEX and performed multiple power-on tests. The display was normal in all cases. However, I need to enable LV_DRAW_COMPLEX to draw these shadows.What could be the possible reasons for this situation?

You test 8.3.7 ???

My LVGL version is 8.3.2.Do you mean try LVGL 8.3.7?
I have identified the bug to be in NXP’s VGLite. Everything works fine when I disable VGLite, but it was working normally on my previous board. It’s very strange.

What works or not for you is irelevant. Every sw / hw have bugs and this is or not corrected in next versions. Yes ofcourse latest is 8.3.7 or 2 days 8.3.8

I’ve tested LVGL 8.3.8,it doesn’t help.

The occurrence of abnormal situations upon power-up is random. Additionally, I have observed that enabling VGLite does not decrease CPU usage. This seems to be related to the cache, but the varying behavior upon each power-up is somewhat peculiar.

If VGLITE is disabled, all components display properly. However, I have an MIPI camera on my board that displays the camera image using lv_canvas, and there are very short horizontal lines in green/white color on left and right sides of the LCD.

It’s solved right now.It’s the FlexSPI issue.