Important: unclear posts may not receive useful answers.
Before posting
- Get familiar with Markdown to format and structure your post
- Be sure to update lvgl from the latest version from the
master
branch.- Be sure you have checked the FAQ and read the relevant part of the documentation.
- If applicable use the Simulator to eliminate hardware related issues.
Delete this section if you read and applied the mentioned points.
My LVGL application started crashing when the number of lv_obj_create() exceeded 200.
What MCU/Processor/Board and compiler are you using?
gcc, linux
What LVGL version are you using?
8.3
What do you want to achieve?
Create a menu widget with multiple pages and multiple labels
What have you tried so far?
Managed to create menu and subpages and add labels to it, but crashing when I add more labels
Code to reproduce
//porting display interface using lv_drivers fbdev
lv_init();
fbdev_init();
static lv_color_t disp_buf[320240];
static lv_disp_draw_buf_t draw_buf;
static lv_disp_drv_t disp_drv;
lv_disp_draw_buf_init(&draw_buf, disp_buf, NULL, 320 240);
lv_disp_drv_init(&disp_drv);
disp_drv.draw_buf = &draw_buf;
disp_drv.flush_cb = fbdev_flush;
disp_drv.hor_res = 320;
disp_drv.ver_res = 240;
g_disp = lv_disp_drv_register(&disp_drv);
// test code , everything fine until i goes over 290
for (int i = 0; i < 300; i++)
{
lv_obj_create(lv_scr_act());
}
while(1)
{
lv_timer_handler();
sleep(1);
}
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.