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

Memory leak when connecting / disconnecting to WiFi #224

Closed
lptr opened this issue Oct 9, 2024 · 6 comments · Fixed by #223 or #253
Closed

Memory leak when connecting / disconnecting to WiFi #224

lptr opened this issue Oct 9, 2024 · 6 comments · Fixed by #223 or #253
Assignees
Labels
bug Something isn't working

Comments

@lptr
Copy link
Member

lptr commented Oct 9, 2024

Looks like we are loosing a few dozen bytes of RAM every time we do a cycle of connecting and disconnecting to WiFi.

This became a problem since https://github.com/kivancsikert/ugly-duckling/releases/tag/0.31.0 as we are now disconnecting from WiFi when in power-save mode. When in this mode, some devices gradually loose memory:

image

However, it doesn't always happen. Some MK7 instances (but not all) do not experience this phenomenon somehow.

@lptr lptr added the bug Something isn't working label Oct 9, 2024
@lptr lptr self-assigned this Oct 9, 2024
@lptr
Copy link
Member Author

lptr commented Oct 9, 2024

There also seems to be a variation in the slope, where some devices loose memory at a faster (but similarly steady) rate.

image

@lptr
Copy link
Member Author

lptr commented Oct 9, 2024

The phenomenon stayed after moving from using ESP-IDF as an Arduino dependency to using Arduino as an ESP-IDF dependency.

@lptr
Copy link
Member Author

lptr commented Oct 9, 2024

Looks like this ESP-IDF issue is causing the problem: espressif/esp-idf#8446

@lptr
Copy link
Member Author

lptr commented Oct 9, 2024

The problem persists after upgrading from ESP-IDF 4.4.8 to 5.1.4 (and Arduino 2 to 3.0.5).

@lptr
Copy link
Member Author

lptr commented Oct 10, 2024

Nope. Unfortunately, the problem persists after upgrading to Arduino 3.1.0-rc-1 / ESP-IDF 5.3.1, too. :/

@lptr lptr reopened this Oct 10, 2024
@lptr
Copy link
Member Author

lptr commented Dec 4, 2024

The issue is actually caused by espressif/arduino-esp32#10664. For us it is now fixed via:

@lptr lptr closed this as completed Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant