-
Notifications
You must be signed in to change notification settings - Fork 178
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
Regular crash on async_tcp during updating labels #321
Comments
I have another large project that I maintain. I have removed the websocket functionality due to stability issues. The ESP implementation of the TCP stacks is not stable. On the other project I still get occasional WD timeouts in the TCP stack processing. |
Oh ok I thought TCP is stable because the ESP controller exist for some years :-) Thanks, I will try your fork of the lib. |
Hi Google tells me this problem was identified as far back as 2015. If this adapter doesn't work, would it be feasible to migrate ESPUI to another MCU family? How much code is likely to need changing? My coding experience is shallow. |
It needs to be ported to the Arduino lib to be useful |
Hi |
I tried MartinMuellers library and now the ESP is more stable than previous, but there are occasionally slowdowns which affect CAN message tx and it is not acceptable. The used async libraries are not great for this amount of data. I searched the web and people has problems with the asyncwebserver and asynctcp as well.
I ditched the whole async tcp completely. I will use ArduinoWebsockets and transfer the data binary to a small js based website, I will serve via the included simple WebServer. I hope this will work now stable.
Thanks for your feedback.
Am 09.12.2024 um 04:12 schrieb dazz100 ***@***.***>:
Hi
Has anyone tried the TCP/IP adapter?
I found this link to code.
https://esp32developer.com/programming-in-c-c/tcp-ip/tcp-server<x-msg://1/url>
—
Reply to this email directly, view it on GitHub<#321 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AZLTJRY7MRFNR6X24UX6JZD2EUDCHAVCNFSM6AAAAABTHEMMTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRWG4ZDAOJWGU>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
It appears the esp adapter has been replaced with ESP-NETIF. |
I can see you are using Mathieu's AsyncTCP implementation and the priority you have set in platformio.ini for CONFIG_ASYNC_TCP_PRIORITY is 1. The author recommends the priority = 10. |
Thanks for you reply. I tried different numbers, but the behavior stays the same unfortunately.
Am 10.12.2024 um 11:42 schrieb Grzegorz Zajac ***@***.***>:
I can see you are using Mathieu's AsyncTCP implementation and the priority you have set in platformio.ini for CONFIG_ASYNC_TCP_PRIORITY is 1. The author recommends the priority = 10.
—
Reply to this email directly, view it on GitHub<#321 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AZLTJR55LB3DTFGESUYFVK32E3AQVAVCNFSM6AAAAABTHEMMTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZRGE4TAMRSGA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I used to get a lot of of those same crashes but then I figured out that UI element callbacks are called from the async-tcp task. This will quickly get you into multithreading trouble. I now queue my callback functions to be processed in the same task I access my other ESPUI elements and experienced no crashes so far. Maybe this was the issue? |
Describe the bug
If I use ESPUI in my project, I get regular crashes on async_tcp. I tried many things, like monitor stack sizes and heap space. Change task priorities and play with ASYNC_TCP settings like queue size, priority and ack time. I even used another async_tcp and AsyncWebserver lib and change ESPUI to work with that. But it is always the same.
I narrowed it down to my Update function which updates labels with values of my variables. I updated my code so it will update only five labels at one time and the uptime will be much longer, about an hour instead of minutes or seconds, but it crashes anyway.
I think it has to do with the websocket connection, if there is a label update during a transmission or something.
How can I proper update a lot of labels without crashing the ESP32 with using ESPUI?
ESPUI specific program part: https://git.bit-cloud.de/Crash_Override/NIU_CAN_BatteryChecker/src/branch/main/src/web_ui.cpp
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Not crashing if ESPUI will be used.
The text was updated successfully, but these errors were encountered: