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

Infrequent crashes caused by a bug #246

Open
Miq1 opened this issue Mar 13, 2023 · 3 comments
Open

Infrequent crashes caused by a bug #246

Miq1 opened this issue Mar 13, 2023 · 3 comments

Comments

@Miq1
Copy link

Miq1 commented Mar 13, 2023

p[len] = 0;

In fauxmoESP.cpp on line 326 is a hidden bug that in certain constellations will crash the ESP. You are writing a zero byte behind the buffer allocated by AsyncTCP. This goes unnoticed most of the time, but if you happen to have some address data immediately following in memory unexpected things will happen.

@ranger81
Copy link

@Miq1 Thank you very much for reporting that, I was wondering why my devices keep crashing from time to time. Especially when Alexa is searching for new smart home devices. I was able to find a workaround and so far, my devices no longer crash.
If anyone is interested:
https://github.com/ranger81/fauxmoESP/blob/3.3memorybugfix/src/fauxmoESP.cpp#L316

@Miq1
Copy link
Author

Miq1 commented May 12, 2023

@ranger81 You are welcome. 😁

Remains the issue of Alexa not understanding or ignoring the status responses. Most annoying, I must say.

@JSMSolns
Copy link

JSMSolns commented May 1, 2024

Just wanted to add my thanks to @Miq1 and @ranger81 for posting this - it seems to have fixed my intermittent exceptions problems too.

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

No branches or pull requests

3 participants