Skip to content

[Fixed] WLED 0.16 crashes when refresing the webpage #4785

@Andro-Marian

Description

@Andro-Marian

What happened?

When randomly requesting the web API json, or when refresing the webpage 2-3 times the wled crashes.
Sometimes takes a little longer 8-10 times, sometimes 2-3 times,

The esp settings can be the factory ones.

To Reproduce Bug

  1. Flash the latest 0.16 beta.
  2. Open the webpage.
  3. Refresh the webpage continously, around a 1 second delay to refresh.

The 0.16 is crashing really fast. I don't see this behaviour in 0.14.4 that easy to crash, seams more impossible with 0.14.4, sometimes after like 10 or more refreshes the page is not loading but the esp is not crashing, waiting a little and works again.

Expected Behavior

To not crash.

Install Method

Binary from WLED.me or Self Build

What version of WLED?

Nightly Release 20250723

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

CORRUPT HEAP: Bad head at 0x3ffe15fc. Expected 0xabba1234 got 0x3ffe1814
abort() was called at PC 0x4009020d on core 1

ELF file SHA256: 0000000000000000

Backtrace: 0x4008ab48:0x3ffdd600 0x4008aea5:0x3ffdd620 0x4009020d:0x3ffdd640 0x400862fa:0x3ffdd660 0x40086791:0x3ffdd680 0x4000bec7:0x3ffdd6a0 0x401be815:0x3ffdd6c0 0x401365c9:0x3ffdd6e0 0x401358a2:0x3ffdd700 0x40137ed5:0x3ffdd720 0x4013244f:0x3ffdd740 0x4013245d:0x3ffdd760 0x4012a9de:0x3ffdd780 0x4012abba:0x3ffdd7b0 0x4012acb1:0x3ffdd7e0 0x4012ad57:0x3ffdd800 0x4008c92e:0x3ffdd830
  #0  0x4008ab48:0x3ffdd600 in invoke_abort at /home/cschwinne/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:648
  #1  0x4008aea5:0x3ffdd620 in abort at /home/cschwinne/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:648
  #2  0x4009020d:0x3ffdd640 in multi_heap_free at /home/cschwinne/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:305
  #3  0x400862fa:0x3ffdd660 in heap_caps_free at /home/cschwinne/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:354
  #4  0x40086791:0x3ffdd680 in _free_r at /home/cschwinne/esp32-arduino-lib-builder/esp-idf/components/newlib/syscalls.c:42
  #5  0x4000bec7:0x3ffdd6a0 in ?? ??:0
  #6  0x401be815:0x3ffdd6c0 in operator delete(void*) at /builds/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/del_op.cc:46
  #7  0x401365c9:0x3ffdd6e0 in AsyncWebServerResponse::~AsyncWebServerResponse() at .pio\libdeps\esp32dev\ESPAsyncWebServerWLED\src/WebResponses.cpp:658
  #8  0x401358a2:0x3ffdd700 in AsyncWebServerRequest::~AsyncWebServerRequest() at .pio\libdeps\esp32dev\ESPAsyncWebServerWLED\src/WebRequest.cpp:1048
  #9  0x40137ed5:0x3ffdd720 in AsyncWebServer::_handleDisconnect(AsyncWebServerRequest*) at .pio\libdeps\esp32dev\ESPAsyncWebServerWLED\src/DynamicBuffer.h:259
  #10 0x4013244f:0x3ffdd740 in AsyncWebServerRequest::_onDisconnect() at .pio\libdeps\esp32dev\ESPAsyncWebServerWLED\src/WebRequest.cpp:1048
  #11 0x4013245d:0x3ffdd760 in std::_Function_handler<void (void*, AsyncClient*), AsyncWebServerRequest::AsyncWebServerRequest(AsyncWebServer*, AsyncClient*)::{lambda(void*, AsyncClient*)#3}>::_M_invoke(std::_Any_data const&, void*&&, AsyncClient*&&) at .pio\libdeps\esp32dev\ESPAsyncWebServerWLED\src/WebRequest.cpp:1048
      (inlined by) _M_invoke at c:\users\desktoptv\.platformio\packages\toolchain-xtensa32\xtensa-esp32-elf\include\c++\5.2.0/functional:1871
  #12 0x4012a9de:0x3ffdd780 in std::function<void (void*, AsyncClient*)>::operator()(void*, AsyncClient*) const at .pio\libdeps\esp32dev\AsyncTCP\src/AsyncTCP.cpp:1123
  #13 0x4012abba:0x3ffdd7b0 in AsyncClient::_error(signed char) at .pio\libdeps\esp32dev\AsyncTCP\src/AsyncTCP.cpp:1123
  #14 0x4012acb1:0x3ffdd7e0 in AsyncClient_detail::handle_async_event(AsyncClient_event_t*) at .pio\libdeps\esp32dev\AsyncTCP\src/AsyncTCP.cpp:1123
  #15 0x4012ad57:0x3ffdd800 in _async_service_task(void*) at .pio\libdeps\esp32dev\AsyncTCP\src/AsyncTCP.cpp:1123
  #16 0x4008c92e:0x3ffdd830 in vPortTaskWrapper at /home/cschwinne/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Rebooting...

Anything else?

No response

Code of Conduct

Fix:

For now is to use and old version of AsyncTCP with 0.16
Instead of using: willmmiles/AsyncTCP @ 1.3.1
use: https://github.com/pbolduc/AsyncTCP.git @ 1.2.0

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions