GUI Guider Screen transition using text area causes error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GUI Guider Screen transition using text area causes error

Jump to solution
1,533 Views
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,

Tags (1)
0 Kudos
1 Solution
1,517 Views
TsuyoshiSugiyama
Contributor II

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

View solution in original post

0 Kudos
2 Replies
1,518 Views
TsuyoshiSugiyama
Contributor II

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

0 Kudos
1,523 Views
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 Kudos