GUI Guider Screen transition using text area causes error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

GUI Guider Screen transition using text area causes error

跳至解决方案
1,676 次查看
TsuyoshiSugiyama
Contributor II

- Environment
* OS: Windows
* GUI-Guider: 1.3.1-GA
* LVGL: v8.0

Transition from a screen using [text area] to another screen using the [Load Screen] action.
Then, when you return to the screen that used [text area] using the [Load Screen] action, an error occurs.

The application freezes on the evaluation board.
After simulation using Visual Studio, we believe that "static lv_obj_t * g_kb;" is having an adverse effect in the Setup of the screen created by [generated].

Best Regards,

标记 (1)
0 项奖励
1 解答
1,660 次查看
TsuyoshiSugiyama
Contributor II

Thank you for your response!
Looking forward to GUI Guider v1.4.0.

在原帖中查看解决方案

0 项奖励
2 回复数
1,661 次查看
TsuyoshiSugiyama
Contributor II

Thank you for your response!
Looking forward to GUI Guider v1.4.0.

0 项奖励
1,666 次查看
zhenhualuo
NXP Employee
NXP Employee

Hi TsuyoshiSugiyama, 

There is bug of screen load in v1.3.1, when loading a new screen by lv_scr_load_anim() and enabling auto-delete previous screen by setting last parameter to "true", the variable of old screen still points to previous memory address even if the used memory is freed, when loading back to the old screen, lv_obj_is_valid is used to validate the old screen by just checking if the screen variable points to a memory address, then the application will be crash. This bug will be fixed in GUI Guider v1.4.0. the following code can be used in events_init.c is the workaround. 

static void Screen_btn_screen_to_screen2_event_handler(lv_event_t *e)
{
    lv_event_code_t code = lv_event_get_code(e); 
    switch (code)
    {
        case LV_EVENT_CLICKED:
        {
            lv_disp_t * d = lv_obj_get_disp(lv_scr_act());
            if (d->prev_scr == NULL && d->scr_to_load == NULL)
            { 
                setup_scr_screen2(&guider_ui);
                lv_scr_load_anim(guider_ui.screen2, LV_SCR_LOAD_ANIM_NONE, 1, 0, true);
            }
        }
            break;
        default:
            break;
    }
}

If the issue persists, can you please attach your test project? 

Best Regards, 

Zhenhua  

0 项奖励