Skip to content

Crash once capture list is 'const' while responding by callback containing templates and extra headers #29

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

Closed
lumapu opened this issue May 20, 2024 · 3 comments

Comments

@lumapu
Copy link

lumapu commented May 20, 2024

Strange thing - I try to get a function for the user to download the core dump from the coredump partition. During loading the data I faced an issue and get contiously core-dumps.

I'm developing on a standard ESP32-Wroom32.

The code is slightly changed for debugging purposes. The buffer is initialized by a for-loop to better check for valid data. First the capture list was only by reference [&] but then I saw that my buffer (data[]) was modified. Then I changed the capture-list to const reference. This leads to a reproduceable state where the ESP reboots.

Code snippet
void getCoreDump(AsyncWebServerRequest *request) {
    const esp_partition_t *partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_COREDUMP, "coredump");
    if (partition != NULL) {
        size_t size = partition->size;
        uint8_t *data = new uint8_t[size];

        // must be separate from transfer - otherwise it failes during read
        //if (ESP_OK != esp_partition_read(partition, 0, data, size))
        //    DPRINTLN(DBG_ERROR, F("can't read partition"));

        for(int i = 0; i < size; i++) {
            data[i] = i % 256;
        }

        AsyncWebServerResponse *response = request->beginResponse("application/octet-stream", size, [&data, &size](uint8_t *buffer, size_t maxLen, size_t index) -> size_t {
            if((index + maxLen) > size)
                maxLen = size - index;
            DPRINTLN(DBG_INFO, "maxLen: " + String(maxLen)); // without this, the ESP crahses!?
            memcpy(buffer, &data[index], maxLen);

            if((index + maxLen) == size)
                delete[] data;

            return maxLen;
        });

        response->addHeader("Content-Description", "File Transfer");
        response->addHeader("Content-Disposition", "attachment; filename=coredump.bin");
        request->send(response);
    } else {
        AsyncWebServerResponse *response = request->beginResponse(200, F("application/json; charset=utf-8"), "{}");
        request->send(response);
    }
}

once I call my ESP with [IP]/coredump the following stacktrace will be printed

Core Dump
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x4019bc71  PS      : 0x00060630  A0      : 0x8012908d  A1      : 0x3ffb30f0  
A2      : 0x8d11cd38  A3      : 0x00000006  A4      : 0x00000014  A5      : 0x0000ffff
A6      : 0x00000000  A7      : 0x00000001  A8      : 0x00000002  A9      : 0x0000ff00  
A10     : 0x00ff0000  A11     : 0x3ffdf898  A12     : 0x00000001  A13     : 0x00000002
A14     : 0x00000000  A15     : 0x00000001  SAR     : 0x00000019  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x8d11cd38  LBEG    : 0x4008a234  LEND    : 0x4008a24a  LCOUNT  : 0xffffffff


Backtrace: 0x4019bc6e:0x3ffb30f0 0x4012908a:0x3ffb3110 0x4012936a:0x3ffb3130 0x4012a956:0x3ffb3160 0x4012f97a:0x3ffb31d0 0x401339c6:0x3ffb3200 0x401248c5:0x3ffb3220

  #0  0x4019bc6e:0x3ffb30f0 in pbuf_clen at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/lwip/lwip/src/core/pbuf.c:824
  #1  0x4012908a:0x3ffb3110 in tcp_free_acked_segments at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/lwip/lwip/src/core/tcp_in.c:1113
  #2  0x4012936a:0x3ffb3130 in tcp_receive at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/lwip/lwip/src/core/tcp_in.c:1289 (discriminator 4)
  #3  0x4012a956:0x3ffb3160 in tcp_process at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/lwip/lwip/src/core/tcp_in.c:987
      (inlined by) tcp_input at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/lwip/lwip/src/core/tcp_in.c:438
  #4  0x4012f97a:0x3ffb31d0 in ip4_input at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/lwip/lwip/src/core/ipv4/ip4.c:803
  #5  0x401339c6:0x3ffb3200 in ethernet_input at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/lwip/lwip/src/netif/ethernet.c:186
  #6  0x401248c5:0x3ffb3220 in tcpip_thread_handle_msg at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/lwip/lwip/src/api/tcpip.c:180
      (inlined by) tcpip_thread at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/lwip/lwip/src/api/tcpip.c:154




ELF file SHA256: e63468b51f8e834c

Rebooting...

Your documentation:
https://github.com/esphome/ESPAsyncWebServer/blob/main/README.md#respond-with-content-using-a-callback-containing-templates-and-extra-headers

Is there anything I'm missing? Don't know where the issue is related to.

@lumapu
Copy link
Author

lumapu commented May 20, 2024

another stack trace I got. It seems that the maxLen somehow changes to a very big number (0xffffa733). The number variies while the first two bytes stay 0xff

Stack Trace
Backtrace: 0x400dd8f2:0x3ffddc30 0x400dda36:0x3ffddc90 0x400fc62e:0x3ffddcb0 0x400fd643:0x3ffddce0 0x400fdb11:0x3ffddd70 0x400f9cce:0x3ffdddd0 0x400f9cd9:0x3ffdddf0 0x400f4d36:0x3ffdde10 0x400f50a1:0x3ffdde40 0x400f50b1:0x3ffdde90 0x400f526b:0x3ffddeb0

  #0  0x400dd8f2:0x3ffddc30 in RestApi<HmSystem<(unsigned char)16, Inverter<float> > >::getCoreDump(AsyncWebServerRequest*)::{lambda(unsigned char*, unsigned int, unsigned int)#1}::operator()(unsigned char*, unsigned int, unsigned int) const at web/RestApi.h:375 (discriminator 27)
  #1  0x400dda36:0x3ffddc90 in std::_Function_handler<unsigned int (unsigned char*, unsigned int, unsigned int), RestApi<HmSystem<(unsigned char)16, Inverter<float> > >::getCoreDump(AsyncWebServerRequest*)::{lambda(unsigned char*, unsigned int, unsigned int)#1}>::_M_invoke(std::_Any_data const&, unsigned char*&&, unsigned int&&, unsigned char*&&) at c:\users\lukas\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:282
  #2  0x400fc62e:0x3ffddcb0 in std::function<unsigned int (unsigned char*, unsigned int, unsigned int)>::operator()(unsigned char*, unsigned int, unsigned int) const at c:\users\lukas\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:687
      (inlined by) AsyncCallbackResponse::_fillBuffer(unsigned char*, unsigned int) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebResponses.cpp:611
  #3  0x400fd643:0x3ffddce0 in AsyncAbstractResponse::_fillBufferAndProcessTemplates(unsigned char*, unsigned int) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebResponses.cpp:384
  #4  0x400fdb11:0x3ffddd70 in AsyncAbstractResponse::_ack(AsyncWebServerRequest*, unsigned int, unsigned int) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebResponses.cpp:328
  #5  0x400f9cce:0x3ffdddd0 in AsyncWebServerRequest::_onPoll() at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebRequest.cpp:193
      (inlined by) AsyncWebServerRequest::_onPoll() at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebRequest.cpp:190
  #6  0x400f9cd9:0x3ffdddf0 in std::_Function_handler<void (void*, AsyncClient*), AsyncWebServerRequest::AsyncWebServerRequest(AsyncWebServer*, AsyncClient*)::{lambda(void*, AsyncClient*)#9}>::_M_invoke(std::_Any_data const&, void*&&, AsyncClient*&&) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebRequest.cpp:77
      (inlined by) _M_invoke at c:\users\lukas\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:297
  #7  0x400f4d36:0x3ffdde10 in std::function<void (void*, AsyncClient*)>::operator()(void*, AsyncClient*) const at c:\users\lukas\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:687
  #8  0x400f50a1:0x3ffdde40 in AsyncClient::_poll(tcp_pcb*) at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:1016
      (inlined by) AsyncClient::_poll(tcp_pcb*) at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:985
  #9  0x400f50b1:0x3ffdde90 in AsyncClient::_s_poll(void*, tcp_pcb*) at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:1288
  #10 0x400f526b:0x3ffddeb0 in _async_service_task(void*) at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:173
      (inlined by) _async_service_task at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:199

this how the maxLen info is printed:

serial log
I: maxLen: 5501
I: maxLen: 4308
I: maxLen: 1436
I: maxLen: 4308
I: maxLen: 1436
I: maxLen: 2872
I: maxLen: 2872
I: maxLen: 2872
I: maxLen: 2872
I: maxLen: 2872
I: maxLen: 2872
I: maxLen: 2872
I: maxLen: 2872
I: maxLen: 2872
I: maxLen: 2872
I: maxLen: 2872
I: maxLen: 2872
I: maxLen: 2872
I: maxLen: 4294915843

@lumapu
Copy link
Author

lumapu commented May 20, 2024

stack trace again

abort() was called at PC 0x4018062f on core 1


Backtrace: 0x40083cb1:0x3ffddb70 0x4008c98d:0x3ffddb90 0x40092b3d:0x3ffddbb0 0x4018062f:0x3ffddc30 0x40180676:0x3ffddc50 0x401805d7:0x3ffddc70 0x4018093a:0x3ffddc90 0x4018115d:0x3ffddcb0 0x400d505f:0x3ffddcd0 0x40198c09:0x3ffddd30 0x400fdb5d:0x3ffddd50 0x400fbafd:0x3ffddda0 0x400fbc0d:0x3ffdddf0 0x400fbdf5:0x3ffdde40 0x400f47e5:0x3ffdde60 0x400f4875:0x3ffdde90 0x400f50ee:0x3ffddeb0

  #0  0x40083cb1:0x3ffddb70 in panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c:408
  #1  0x4008c98d:0x3ffddb90 in esp_system_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/esp_system.c:137
  #2  0x40092b3d:0x3ffddbb0 in abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/abort.c:46
  #3  0x4018062f:0x3ffddc30 in __cxxabiv1::__terminate(void (*)()) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:47
  #4  0x40180676:0x3ffddc50 in std::terminate() at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:57
  #5  0x401805d7:0x3ffddc70 in __cxa_throw at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:95
  #6  0x4018093a:0x3ffddc90 in operator new(unsigned int) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_op.cc:54
  #7  0x4018115d:0x3ffddcb0 in operator new[](unsigned int) at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/gcc/libstdc++-v3/libsupc++/new_opv.cc:32
  #8  0x400d505f:0x3ffddcd0 in RestApi<HmSystem<(unsigned char)16, Inverter<float> > >::getCoreDump(AsyncWebServerRequest*) at web/RestApi.h:356
  #9  0x40198c09:0x3ffddd30 in void std::__invoke_impl<void, void (RestApi<HmSystem<(unsigned char)16, Inverter<float> > >::*&)(AsyncWebServerRequest*), RestApi<HmSystem<(unsigned char)16, Inverter<float> > >*&, AsyncWebServerRequest*>(std::__invoke_memfun_deref, void (RestApi<HmSystem<(unsigned char)16, Inverter<float> > >::*&)(AsyncWebServerRequest*), RestApi<HmSystem<(unsigned char)16, Inverter<float> > >*&, AsyncWebServerRequest*&&) at c:\users\lukas\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/invoke.h:73
      (inlined by) std::__invoke_result<void (RestApi<HmSystem<(unsigned char)16, Inverter<float> > >::*&)(AsyncWebServerRequest*), RestApi<HmSystem<(unsigned char)16, Inverter<float> > >*&, AsyncWebServerRequest*>::type std::__invoke<void (RestApi<HmSystem<(unsigned char)16, Inverter<float> > >::*&)(AsyncWebServerRequest*), RestApi<HmSystem<(unsigned char)16, Inverter<float> > >*&, AsyncWebServerRequest*>(void (RestApi<HmSystem<(unsigned char)16, Inverter<float> > >::*&)(AsyncWebServerRequest*), RestApi<HmSystem<(unsigned char)16, Inverter<float> > >*&, AsyncWebServerRequest*&&) at c:\users\lukas\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/invoke.h:95
      (inlined by) void std::_Bind<void (RestApi<HmSystem<(unsigned char)16, Inverter<float> > >::*(RestApi<HmSystem<(unsigned char)16, Inverter<float> > >*, std::_Placeholder<1>))(AsyncWebServerRequest*)>::__call<void, AsyncWebServerRequest*&&, 0u, 1u>(std::tuple<AsyncWebServerRequest*&&>&&, std::_Index_tuple<0u, 1u>) at c:\users\lukas\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0/functional:400
      (inlined by) void std::_Bind<void (RestApi<HmSystem<(unsigned char)16, Inverter<float> > >::*(RestApi<HmSystem<(unsigned char)16, Inverter<float> > >*, std::_Placeholder<1>))(AsyncWebServerRequest*)>::operator()<AsyncWebServerRequest*, void>(AsyncWebServerRequest*&&) at c:\users\lukas\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0/functional:484
      (inlined by) std::_Function_handler<void (AsyncWebServerRequest*), std::_Bind<void (RestApi<HmSystem<(unsigned char)16, Inverter<float> > >::*(RestApi<HmSystem<(unsigned char)16, Inverter<float> > >*, std::_Placeholder<1>))(AsyncWebServerRequest*)> >::_M_invoke(std::_Any_data const&, AsyncWebServerRequest*&&) at c:\users\lukas\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:297
  #10 0x400fdb5d:0x3ffddd50 in std::function<void (AsyncWebServerRequest*)>::operator()(AsyncWebServerRequest*) const at c:\users\lukas\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:687
      (inlined by) AsyncCallbackWebHandler::handleRequest(AsyncWebServerRequest*) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebHandlerImpl.h:132
  #11 0x400fbafd:0x3ffddda0 in AsyncWebServerRequest::_parseLine() at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebRequest.cpp:581 (discriminator 1)
  #12 0x400fbc0d:0x3ffdddf0 in AsyncWebServerRequest::_onData(void*, unsigned int) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebRequest.cpp:123
  #13 0x400fbdf5:0x3ffdde40 in std::_Function_handler<void (void*, AsyncClient*, void*, unsigned int), AsyncWebServerRequest::AsyncWebServerRequest(AsyncWebServer*, AsyncClient*)::{lambda(void*, AsyncClient*, void*, unsigned int)#8}>::_M_invoke(std::_Any_data const&, void*&&, AsyncClient*&&, std::_Any_data const&, unsigned int&&) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebRequest.cpp:76     
      (inlined by) _M_invoke at c:\users\lukas\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:297
  #14 0x400f47e5:0x3ffdde60 in std::function<void (void*, AsyncClient*, void*, unsigned int)>::operator()(void*, AsyncClient*, void*, unsigned int) const at c:\users\lukas\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:687
      (inlined by) AsyncClient::_recv(tcp_pcb*, pbuf*, signed char) at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:972
  #15 0x400f4875:0x3ffdde90 in AsyncClient::_s_recv(void*, tcp_pcb*, pbuf*, signed char) at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:1292
  #16 0x400f50ee:0x3ffddeb0 in _async_service_task(void*) at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:164
      (inlined by) _async_service_task at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:199
``` Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x4008a298 PS : 0x00060430 A0 : 0x800d3382 A1 : 0x3ffddce0
A2 : 0x3ffe15fc A3 : 0x0000157c A4 : 0x00000b38 A5 : 0x3ffe15fc
A6 : 0x00000004 A7 : 0x000000b3 A8 : 0x40000000 A9 : 0x3ffddd20
A10 : 0x3ffe15fc A11 : 0x00000001 A12 : 0x3ffe0440 A13 : 0x00000007
A14 : 0x00000005 A15 : 0x00000001 SAR : 0x00000008 EXCCAUSE: 0x0000001c
EXCVADDR: 0x0000157c LBEG : 0x40084c05 LEND : 0x40084c0d LCOUNT : 0x00000027

Backtrace: 0x4008a295:0x3ffddce0 0x400d337f:0x3ffddcf0 0x400fc3da:0x3ffddd10 0x400fd3ef:0x3ffddd40 0x400fd8bd:0x3ffdddd0 0x4019997a:0x3ffdde30 0x400f9a99:0x3ffdde50 0x400f4672:0x3ffdde70 0x400f47e4:0x3ffddea0 0x400f5009:0x3ffddec0

#0 0x4008a295:0x3ffddce0 in memcpy at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/machine/xtensa/memcpy.S:262
#1 0x400d337f:0x3ffddcf0 in RestApi<HmSystem<(unsigned char)16, Inverter > >::getCoreDump(AsyncWebServerRequest*)::{lambda(unsigned char*, unsigned int, unsigned int)#1}::operator()(unsigned char*, unsigned int, unsigned int) const at web/RestApi.h:372
(inlined by) std::_Function_handler<unsigned int (unsigned char*, unsigned int, unsigned int), RestApi<HmSystem<(unsigned char)16, Inverter > >::getCoreDump(AsyncWebServerRequest*)::{lambda(unsigned char*, unsigned int, unsigned int)#1}>::_M_invoke(std::_Any_data const&, unsigned char*&&, unsigned int&&, unsigned char*&&) at c:\users\lukas.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:282
#2 0x400fc3da:0x3ffddd10 in std::function<unsigned int (unsigned char*, unsigned int, unsigned int)>::operator()(unsigned char*, unsigned int, unsigned int) const at c:\users\lukas.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:687
(inlined by) AsyncCallbackResponse::_fillBuffer(unsigned char*, unsigned int) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebResponses.cpp:611
#3 0x400fd3ef:0x3ffddd40 in AsyncAbstractResponse::_fillBufferAndProcessTemplates(unsigned char*, unsigned int) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebResponses.cpp:384
#4 0x400fd8bd:0x3ffdddd0 in AsyncAbstractResponse::_ack(AsyncWebServerRequest*, unsigned int, unsigned int) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebResponses.cpp:328
#5 0x4019997a:0x3ffdde30 in AsyncWebServerRequest::_onAck(unsigned int, unsigned int) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebRequest.cpp:201
(inlined by) AsyncWebServerRequest::_onAck(unsigned int, unsigned int) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebRequest.cpp:197
#6 0x400f9a99:0x3ffdde50 in std::_Function_handler<void (void*, AsyncClient*, unsigned int, unsigned int), AsyncWebServerRequest::AsyncWebServerRequest(AsyncWebServer*, AsyncClient*)::{lambda(void*, AsyncClient*, unsigned int, unsigned int)#5}>::_M_invoke(std::_Any_data const&, void*&&, AsyncClient*&&, unsigned int&&, AsyncClient*&&) at .pio/libdeps/esp32-wroom32/ESPAsyncWebServer-esphome/src/WebRequest.cpp:73
(inlined by) _M_invoke at c:\users\lukas.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:297
#7 0x400f4672:0x3ffdde70 in std::function<void (void*, AsyncClient*, unsigned int, unsigned int)>::operator()(void*, AsyncClient*, unsigned int, unsigned int) const at c:\users\lukas.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:687
(inlined by) AsyncClient::_sent(tcp_pcb*, unsigned short) at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:955
(inlined by) AsyncClient::_sent(tcp_pcb*, unsigned short) at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:950
#8 0x400f47e4:0x3ffddea0 in AsyncClient::_s_sent(void*, tcp_pcb*, unsigned short) at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:1304
#9 0x400f5009:0x3ffddec0 in _async_service_task(void*) at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:170
(inlined by) _async_service_task at .pio/libdeps/esp32-wroom32/AsyncTCP-esphome/src/AsyncTCP.cpp:199

</details>

@lumapu
Copy link
Author

lumapu commented May 30, 2024

it was my fault, I didn't took enough care about scope of variables used in lambda.

@lumapu lumapu closed this as completed May 30, 2024
kuba2k2 pushed a commit to libretiny-eu/ESPAsyncWebServer that referenced this issue May 27, 2025
fix(sse): break loop after erasing client
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