Screen freezes using lvgl v8.0

Description

EDIT: Screen freezes.

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

ESP32.

What LVGL version are you using?

lvgl v8.0.

What do you want to achieve?

I want it to work to reproduce my codes.

What have you tried so far?

I want to use the latest version of LVGL.

Code to reproduce

N/A

Screenshot and/or video

I don’t think it will be necessary.

Can anyone send an example of disp_draw? because I think I’m missing something.

It seems it’s the duplication of I'm having problems with version 8.0 · Issue #2296 · lvgl/lvgl · GitHub

Let’s continue here.

Can you use a debugger to see where it freezes? Please also enable logging in LVGL.

[Trace] (0.000, +0)      lv_timer_handler: begin        (in lv_timer.c line #68)
[Trace] (0.000, +0)      lv_timer_handler: finished (30 ms until the next timer call)   (in lv_timer.c line #132)

What about this?

And how do you now it freezes? What it does or doesn’t do?

How do I do that? Should I add monitor_cb?

You said the “screen freezes”. We need to know exactly what happens and where the program stops.

My display flush:

void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p)
{
  uint64_t w = (area->x2 - area->x1 + 1);
  uint64_t h = (area->y2 - area->y1 + 1);

  tft.startWrite();
  tft.setAddrWindow(area->x1, area->y1, w, h);
  tft.pushColors(&color_p->full, w * h, true);
  tft.endWrite();

  Serial.print("Display flush width: ");
  Serial.println(w);

  Serial.print("Display flush height: ");
  Serial.println(h);

  lv_disp_flush_ready(disp);
}

I added a debugger.

Debugger:
Display flush width: 480
Display flush height: 50
Display flush width: 480
Display flush height: 50
Display flush width: 480
Display flush height: 50
Display flush width: 480
Display flush height: 50
Display flush width: 480
Display flush height: 50
Display flush width: 480
Display flush height: 50
Display flush width: 480
Display flush height: 20

The program stops at:
[Info] (0.000, +0) lv_label_create: begin (in lv_label.c line #75)

But I don’t know what the mistake would be. :confused:

Note: TRACE does not send messages about LV_LOG_TRACE_INDEV and LV_LOG_TRACE_DISP_REFR.

And how that label create code looks like?

Also be sure that there is no warnings when you compile your code.

I’m using the music demo.

Please try a simpler example. E.g. lv_example_btn_1.

I’m getting this error: 'lv_example_btn_1' was not declared in this scope

You need to include #include "lvgl/examples/lv_examples.h".

lvgl/examples/lv_examples.h: No such file or directory

How does lvgl.h get included? You might have to use #include "examples/lv_examples.h" instead.

lvgl.h comes before examples/lv_examples.h

Ready, but still freezes :confused:.

On which line does it freeze?