-
Notifications
You must be signed in to change notification settings - Fork 15
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
ESP32 support - crashs #38
Comments
Hey @GIPdA First of all, you don't need to comment out debugs. Most likely this is a memory issue, as you said. ESP8266 has ~82 KB Are you running the branch esp32Support? After you compile in Arduino IDE (I assume) what is it saying your Sketch is using in regards to memory? for example:
Thanks. |
I did comment out the The sketch uses 772334 bytes (58%), max is 1310720. RAM use is 51568 bytes (15%) out of 327680. I tested a bit more, and actually the issue comes from
Yes.
Warning for unused variable. I probably should have let that be and remove it from the commit now that I think of it. Can do before a pull request if you want. |
Hi, to all. Sorry guys but examples provided in the library only for esp8266, I've tried to change it to esp32 compatible, it's compiled but magic with ports not happen. Can you provide pls archive with esp32 example/add esp32 examples to library to make it useful for me? I've already tested on esp8266 and it's work great. Thanks, a lot. |
Hello, |
Here you go : https://github.com/GIPdA/TinyUPnP/tree/esp32Support/examples/SimpleServerEsp32 |
Thanks, I’ve tried files from your link and all works great.
ср, 25 сент. 2019 г. в 23:43, Benjamin <notifications@github.com>:
… Here you go :
https://github.com/GIPdA/TinyUPnP/tree/esp32Support/examples/SimpleServerEsp32
I did not had the time to test it again, but it should work, I used it for
my tests. Otherwise, let me know.
Be sure to use the esp32Support branch.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#38?email_source=notifications&email_token=AHVPSBSNB4DZXY4GMJK4ASDQLPEN7A5CNFSM4IJBOM72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7TLCTQ#issuecomment-535212366>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHVPSBTDTLFK5C4UPRDGMCLQLPEN7ANCNFSM4IJBOM7Q>
.
|
Adding ESP32 support, I forked here: https://github.com/GIPdA/TinyUPnP/tree/esp32Support
It is working most of the time, when it doesn't crash.
It can crash and reboot several times (variable, 1 to 5 in my few tests, always in the same spot) and eventually it make it through the setup and runs the loop without crashing.
Here is the crash report:
crash.txt
I guess it is probably a heap/stack overflow.
The fact that each
readStringUntil
returns a String without any size check isn't very safe. In my case, it can buffer up to 4k characters (shouldn't run out of space with the simple example on the ESP32 though, but still).I monitored the free heap size before crash (
ESP.getFreeHeap()
) and there were still plenty of space (~ 260000 bytes). Seems unlikely that memory fragmentation could be an issue here?Also, the Arduino ESP32 is using FreeRTOS, so it might be related to that. Not sure exactly how stack & heap is handled under the hood (in a task), and the crash report isn't very helpful, I find.
Finally, enabling debug prints makes it crash very fast, every time. Certainly a memory issue. Need to comment most of the debugs to avoid the crash.
The text was updated successfully, but these errors were encountered: