Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak when deinitializing display feeder tasks #306

Merged
merged 1 commit into from
May 10, 2024

Conversation

vroland
Copy link
Owner

@vroland vroland commented Apr 30, 2024

Towards #269 .

@vroland
Copy link
Owner Author

vroland commented Apr 30, 2024

@aceisace Can you check if this fixes the issue?

@aceisace
Copy link

@vroland Yes sure, but I'll need a few days before I can test this due to some refactoring that is required when using the latest version of epdiy

@martinberlin martinberlin self-requested a review May 1, 2024 06:17
@martinberlin
Copy link
Collaborator

martinberlin commented May 1, 2024

Looking good.
Will test it tonight! -> UPDATE:
It works good. Maybe for this one will be nice to make a test that draws the Dragon, and deinits epdiy everytime, and checks that the RAM usage is stable. Although no idea if it's so easy to implement something like this.

Copy link
Collaborator

@martinberlin martinberlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, just wait please for @aceisace check to see if it fixes his issue

@vroland vroland merged commit e855efe into main May 10, 2024
24 checks passed
@aceisace
Copy link

@vroland
Hey, I finally had time to test this out today, but sadly, it does not fix the issue. This is the error this time:

assert failed: lq_init line_queue.c:23 (queue.bufs != NULL)

Backtrace: ... 
0x400823f9: panic_abort at ../esp/v4.4.6/esp-idf/components/esp_system/panic.c:408
0x400926a9: esp_system_abort at ../esp/v4.4.6/esp-idf/components/esp_system/esp_system.c:137
0x40099e09: __assert_func at ../esp/v4.4.6/esp-idf/components/newlib/assert.c:85
0x400f78b9: lq_init at ../esp-idf/test/components/epdiy-main/src/output_common/line_queue.c:23 (discriminator 1)
0x400f6bf1: epd_renderer_init at ../esp-idf/test/components/epdiy-main/src/render.c:322
0x400f6949: epd_init at ../esp-idf/test/components/epdiy-main/src/epdiy.c:491
0x400e74d2: loopTask(void*) at ../esp-idf/test/components/arduino/cores/esp32/main.cpp:42
0x40095d35: vPortTaskWrapper at ../esp/v4.4.6/esp-idf/components/freertos/port/xtensa/port.c:142

And the error is caused on this line:

epd_init(&epd_board_v5, &ED133UT2, EPD_LUT_64K);

It basically fails on the first initialisation of epdiy.

Additional Details:

  • esp-idf version 4.4.6
  • v5 board

@martinberlin
Copy link
Collaborator

That’s really strange in v7 works. Actually it is only on deinitialization.
Are you sure nothing at all is changed in your side of the things?
Wanted to reproduce it but I gave out all my v5 boards

@vroland vroland deleted the fix-lfbuffers-memleak branch May 27, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants