Hi @kisvegabor , @embeddedt
Description
I am using lv_scr_load_anim() for change screen with fade animation.
When animation has done, in scr_anim_ready(), I continue to change to other screen as below illustration.
Start screen ----(anim without delay)—> A screen ----(anim with delay)—> B screen
My code is as below:
In A screen: (a_change_screen will be called from Start screen)
void a_change_screen()
{
lv_scr_load_anim( A_screen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, true );
}
In B screen: (this func will be called by scr_anim_ready() in lv_disp.c)
void b_change_screen()
{
lv_scr_load_anim( B_screen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 1000, true );
}
In lv_disp.c (scr_anim_ready() will be called when Start->A or A->B anim has done)
scr_anim_ready()
{
... // lvgl code
if( Start->A == true )
{
b_change_screen()
}
}
What Problem?
Sometimes, the anim of A->B becomes Nothing->B, and after that, application is crashed.
※ Nothing means that is not A, and anim will be fade between B and the disp->bg_color regitered in lv_disp_drv_register().
I think, When the anim of Nothing->B has done, lvgl tries to delete Nothing screen by true setting in lv_scr_load_anim(…, true) and lead to crash.
What’s wrong with doing another animation in scr_anim_ready()?
What LVGL version are you using?
LVGL 7.10.1
What have you tried so far?
After the bug happened,
I checked lv_scr_act(), d->act_scr with A screen object when register anim in lv_disp.c, lv_scr_load_anim( B_screen, … ) , , and there is no problem.