GUI Guider Screen transition using text area causes error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

GUI Guider Screen transition using text area causes error

ソリューションへジャンプ
1,672件の閲覧回数
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,656件の閲覧回数
TsuyoshiSugiyama
Contributor II

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

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
1,657件の閲覧回数
TsuyoshiSugiyama
Contributor II

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

0 件の賞賛
1,662件の閲覧回数
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 件の賞賛