Coder Social home page Coder Social logo

Comments (3)

lumapu avatar lumapu commented on July 26, 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

from espasyncwebserver.

lumapu avatar lumapu commented on July 26, 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>

from espasyncwebserver.

lumapu avatar lumapu commented on July 26, 2024

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

from espasyncwebserver.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.