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

[Controller] Fail gracefully when almost out of memory #5059

Merged
merged 2 commits into from
May 29, 2024

Conversation

TD-er
Copy link
Member

@TD-er TD-er commented May 23, 2024

One often reported issue is that the ESPEasy node (especially ESP8266 ones) will crash when WiFi is unstable.

This could be due to memory suddenly filling up by the controller queue. When creating a new item for the controller queue, there was no (std::nothrow) included on the new calls, so if running out of memory this might have thrown a std::bad_alloc exception, which are not caught and thus ESPEasy might crash on it.

Fixes: #4726
Fixes: #3649
Fixes: #2341

Before merge, see: #4770

TD-er added 2 commits May 23, 2024 15:20
One often reported issue is that the ESPEasy node (especially ESP8266 ones) will crash when WiFi is unstable.

This could be due to memory suddenly filling up by the controller queue.
When creating a new item for the controller queue, there was no `(std::nothrow)` included on the `new` calls, so if running out of memory this might have thrown a `std::bad_alloc` exception, which are not caught and thus ESPEasy might crash on it.
@TD-er TD-er merged commit c1e2912 into letscontrolit:mega May 29, 2024
171 checks passed
@TD-er TD-er deleted the bugfix/ControllerQueue_crash_OOM branch May 29, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant