ESPUI icon indicating copy to clipboard operation
ESPUI copied to clipboard

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

Open jberezin opened this issue 1 year ago • 3 comments

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 avatar Dec 30 '24 15:12 jberezin

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.

jberezin avatar Jan 20 '25 14:01 jberezin

Hello jberezin. Did you manage to port ESPUI to PsychicHttp? Are there any improvements to this issue?

Anode-bit avatar Mar 21 '25 08:03 Anode-bit

Hi, was there any improvement to this so far?

I still see a lot of times an almost blanc page and then the ESP32 restarts…

Some dropdown lists like the time zone box are really large and depending how many entries are in such a list you can see this bug more often. I could reduce it a bit by removing the amount of shown text in them, but as soon as you add more entries, the behavior appears more often…

I have the in the picture shown ESPUI portal running with V2.2.3 still, because with V2.2.4 the ESP32 crashs all the time on startup…

Image

Image

Thanks for your help in advance.

AWSW-de avatar Jul 30 '25 04:07 AWSW-de