Platform
ESP32
IDE / Tooling
Arduino (IDE/CLI)
What happened?
Crash with Event Source:
It is my opensource project here: https://github.com/dzungpv/mitsubishi2MQTT
It build with ESP IDF 4.4.6
Stack Trace
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x400f4715 PS : 0x00060b30 A0 : 0x800f4751 A1 : 0x3ffd3f60
0x400f4715: std::__uniq_ptr_impl<AsyncEventSourceClient, std::default_delete<AsyncEventSourceClient> >::_M_ptr() const at /Users/vietdzung/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/8.4.0/bits/unique_ptr.h:150
(inlined by) std::unique_ptr<AsyncEventSourceClient, std::default_delete<AsyncEventSourceClient> >::get() const at /Users/vietdzung/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/8.4.0/bits/unique_ptr.h:346
(inlined by) AsyncEventSource::_handleDisconnect(AsyncEventSourceClient*) at /Users/vietdzung/dev/projects/esp32/mitsubishi2MQTT/components/ESPAsyncWebServer/src/AsyncEventSource.cpp:360
A2 : 0x3ffb59f4 A3 : 0x3ffd5048 A4 : 0xfefefefe A5 : 0x3ffb5a34
A6 : 0x3ffd44e8 A7 : 0x00000000 A8 : 0x3ffb5a28 A9 : 0xfefefefe
A10 : 0x3ffb5a28 A11 : 0x3ffd5b34 A12 : 0x3ffd5048 A13 : 0x00000000
A14 : 0x00000001 A15 : 0x00000001 SAR : 0x00000019 EXCCAUSE: 0x0000001c
EXCVADDR: 0xfefeff06 LBEG : 0x4000c46c LEND : 0x4000c477 LCOUNT : 0x00000000
Backtrace: 0x400f4712:0x3ffd3f60 0x400f474e:0x3ffd3f80 0x400f475d:0x3ffd3fa0 0x40100b75:0x3ffd3fc0 0x40100ce2:0x3ffd3ff0 0x40100cf8:0x3ffd4010 0x4010109f:0x3ffd4030 0x4010115f:0x3ffd4050 0x4008defd:0x3ffd4080
0x400f4712: AsyncEventSource::_handleDisconnect(AsyncEventSourceClient*) at /Users/vietdzung/dev/projects/esp32/mitsubishi2MQTT/components/ESPAsyncWebServer/src/AsyncEventSource.cpp:359 (discriminator 1)
0x400f474e: AsyncEventSourceClient::_onDisconnect() at /Users/vietdzung/dev/projects/esp32/mitsubishi2MQTT/components/ESPAsyncWebServer/src/AsyncEventSource.cpp:290
0x400f475d: std::_Function_handler<void (void*, AsyncClient*), AsyncEventSourceClient::AsyncEventSourceClient(AsyncWebServerRequest*, AsyncEventSource*)::{lambda(void*, AsyncClient*)#4}>::_M_invoke(std::_Any_data const&, void*&&, AsyncClient*&&) at /Users/vietdzung/dev/projects/esp32/mitsubishi2MQTT/components/ESPAsyncWebServer/src/AsyncEventSource.cpp:170
(inlined by) _M_invoke at /Users/vietdzung/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/8.4.0/bits/std_function.h:297
0x40100b75: std::function<void (void*, AsyncClient*)>::operator()(void*, AsyncClient*) const at /Users/vietdzung/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch5-8.4.0/xtensa-esp32-elf/xtensa-esp32-elf/include/c++/8.4.0/bits/std_function.h:687
0x40100ce2: AsyncClient::_fin(tcp_pcb*, signed char) at /Users/vietdzung/dev/projects/esp32/mitsubishi2MQTT/components/AsyncTCP/src/AsyncTCP.cpp:934
0x40100cf8: AsyncClient::_s_fin(void*, tcp_pcb*, signed char) at /Users/vietdzung/dev/projects/esp32/mitsubishi2MQTT/components/AsyncTCP/src/AsyncTCP.cpp:1257
0x4010109f: _handle_async_event(lwip_event_packet_t*) at /Users/vietdzung/dev/projects/esp32/mitsubishi2MQTT/components/AsyncTCP/src/AsyncTCP.cpp:167
0x4010115f: _async_service_task(void*) at /Users/vietdzung/dev/projects/esp32/mitsubishi2MQTT/components/AsyncTCP/src/AsyncTCP.cpp:199
0x4008defd: vPortTaskWrapper at /Users/vietdzung/esp/esp-idf-v4.4.6/components/freertos/port/xtensa/port.c:142
Minimal Reproductible Example (MRE)
It is complex web server but you can try to flash it to an ESP32, then set the wifi, after that open Setup -> Wifi page, waiting for some minutes for scan wifi and update to the list, press back and it crash. https://github.com/dzungpv/mitsubishi2MQTT there is guide to build it with ESP IDF
I confirm that:
Platform
ESP32
IDE / Tooling
Arduino (IDE/CLI)
What happened?
Crash with Event Source:
It is my opensource project here: https://github.com/dzungpv/mitsubishi2MQTT
It build with ESP IDF 4.4.6
Stack Trace
Minimal Reproductible Example (MRE)
It is complex web server but you can try to flash it to an ESP32, then set the wifi, after that open Setup -> Wifi page, waiting for some minutes for scan wifi and update to the list, press back and it crash. https://github.com/dzungpv/mitsubishi2MQTT there is guide to build it with ESP IDF
I confirm that: