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

A lot of large controls kills system and you get a blank web page. #322

Open
jberezin opened this issue Dec 30, 2024 · 1 comment
Open

Comments

@jberezin
Copy link

Describe the bug
When adding a large control or a lot of controls, the system stops working. I was able to simplify the issue to demonstrate the problem on one of the library example files.

In the serial output I see a mix of the following types of messages when the problem occurs.

[ 10675][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[ 10681][W][AsyncTCP.cpp:930] _poll(): pcb is NULL
[ 15141][W][AsyncTCP.cpp:950] _poll(): rx timeout 4

To Reproduce
Steps to reproduce the behavior:
Run the attached program which is the tab demo from ESPUI with a few lines of code added.

In main.cpp
...
// if maxselects > 6, web page stops working, if it is less, everthing works fine
#define MAXSELECTS 7
..

If you change MAXSELECTS to 6 or lower, everything works fine and is fast.

Expected behavior
The modified demo should work but when we add seven option boxes it fails (I think there is too much data in the webpage at that point).

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: windows 11
  • Browser fails on both chrome and edge

Smartphone (please complete the following information):

  • Fails in same way on android (pixel 6 pro running android 15)

Additional context

  1. I tried increasing buffers in ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer/) with no change in behaviour:

in file-AsyncWebSocket.cpp

#include <AsyncTCP.h>
.....
#define WS_MAX_QUEUED_MESSAGES 32 ( I doubled and quadrupled this without visible improvement).

  1. I also adapted a version to work with the fork made by MartinMueller2003 ] but it failed in the same way.

  2. I uploaded my source files and my platformio directory for this test.

I would like to be able to fix this if possible.

simpletest.zip

image

@jberezin
Copy link
Author

jberezin commented Jan 20, 2025

Well I think the problem is likely not in ESPUI but instead in the underlying ESP Async Webserver so I am going to try to port ESPUI to [PsychicHttp] (https://github.com/hoeken/PsychicHttp) in hopes that it will solve this issue. PsychicHttp reportedly addresses a lot of the shortcomings of the ESP Async Server.

So I will fork ESPUI, setup a JTAG debugger, and give it a shot.

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

1 participant