Unresponsive screen


Currently created on several screens
There is an object for each screen
There are many image objects on the unresponsive screen.
(About 30 )

Screen operating normally: A
Problem screen: B

No response when going from A to B using external button
After that, it works normally when you return to the C screen

However, if I reduce the number of image objects on screen B to 24 and test, screen B responds.

Is it due to insufficient memory?

What MCU/Processor/Board and compiler are you using?

  • TI(AM57xx)

What LVGL version are you using?

  • 6.0

What do you want to achieve?

  • Normal operation between each screen

What have you tried so far?

  • When first started, all screens and objects are created and started.
    I did not hide the screen and objects

I thought that was the problem, so I made the screen and something to hide

But I get a memory error.

error message

Data abort exception at USER tUser(82767EB0)

DFSR: 00000005, Read, Translation Section, Domain: 0000
FAR: 0000001C

PC: 801134B4 LR: 80032ABC SP: 82769054
PSR: 00000013(nzcvqjeaift IT: 0 GE:3 SVC32)

R00: 00000000 00000001 80CF8AFC 00000010 8071C0A8
R05: 00000002 00000000 00000000 00000000 00000000
R10: 00000000 00000000 80CF8BA0 82769054 80032ABC

#01 00000000 lv_obj_set_hidden() + 0

Code to reproduce

/You code here/

/*create screen*/
scr_1 = lv_obj_create(NULL,NULL);
scr_2 = lv_obj_create(NULL,NULL);
scr_10 = lv_obj_create(NULL,NULL);

/*create img*/
img1 = lv_img_create(scr_1,NULL);
img2 = lv_img_create(scr_2,NULL);
img10 = lv_img_create(scr_10,NULL);

/*Create object for each screen*/
test_label1 = lv_label_create(scr_1,NULL);
test_label2 = lv_label_create(scr_1,NULL);
test_label3 = lv_label_create(scr_1,NULL);
test_img1 = lv_img_create(scr_1,NULL);
test_img2 = lv_img_create(scr_1,NULL);
test_img3 = lv_img_create(scr_1,NULL);

case 1 : lv_scr_load(scr_1);
/*Object loading function required for each screen*/
case 2 : lv_scr_load(scr_2);
/*Object loading function required for each screen*/
case 10 : lv_scr_load(scr_10);
/*Object loading function required for each screen*/

The first thing to try is updating to 6.1 (release/v6) to make sure that this bug has not already been fixed.


It was version 6.12 and was ported earlier this year.
It still responds or does not respond according to the number of objects.

Please help me…!!!
The issue still persists.
The screen becomes unresponsive when you increase the image object by more than a certain amount.

You could try enabling logging to see if anything useful gets printed.

try this, when you change screen delete active scr, and load youre next scr, I think the problem is that you do not clear the previous screen, and there is a memory leak,

lv_obj_del(lv_scr_act ());

You should never delete a screen that is active. That is guaranteed to cause a crash. Instead, save a reference to it, load the next screen, and then delete the previous screen (which is no longer active).

i did it do as follows

first= lv_obj_create(NULL, NULL);

lv_obj_del(lv_scr_act ());

and then, when i needed change screen, i did it do as folows

second= lv_obj_create(NULL, NULL);

its work for me…

I think you got lucky. The issue won’t happen every time as it’s a typical use-after-free condition.

The correct approach to switch between two screens is as follows:

lv_obj_t * first = lv_obj_create(NULL, NULL);
/* Later */
lv_obj_t * prev = lv_scr_act(); /* save previously active screen */
lv_obj_t * second = lv_obj_create(NULL, NULL);
lv_obj_del(prev); /* prev is now not the active screen, so it can safely be deleted */

Thank you for answer

Yes, that is correct. I get an error when I delete the current page.
However, repeating creation and deletion in this way will cause too much delay when creating.
It’s not natural.

Is there any other way?


Creating 30-40 objects with such a powerful MCU shouldn’t last that long.

Can you create a video about the issue, to see what “unresponsive” really means?