-
Notifications
You must be signed in to change notification settings - Fork 127
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
An receive error occured, FID=NN and ESP32 crashes #92
Comments
It would be helpful to decode the backtrace addresses to source file lines. |
@squonk11 is right, without being able to know where the addresses in the backtrace point to and without having the binary to check the PC value, it's impossible to say what's happening there. PlatformIO now supports the monitor_filters = esp32_exception_decoder See here for infos on options for |
Thanks fhessel, squonk1, I will try plataformio monitor filters next time, I didn't know that trick. I did it manually using xtensa-esp32-elf-addr2line probably is the same result. This is the decoding: 0x400d66d5: httpsserver::WebsocketHandler::send(std::__cxx11::basic_string<char, std::char_traits, std::allocator >, unsigned char) at .platformio/lib/esp32_https_server_ID5887/src/WebsocketHandler.cpp:243 Line 243 is next one: _con->writeBuffer(data, length); 0x400d382a: WebSocketHandler::sendJSON(ArduinoJson6152_0000010::BasicJsonDocument<ArduinoJson6152_0000010::DefaultAllocator>&) at /home/Projects/HomeBrain/src/common/ESP32/MyWebsocketHandler.cpp:67 (discriminator 1) This is my code at that point, a wrapper of WebsocketHandler: void MyWebsocketHandler::sendJSON(DynamicJsonDocument &json) {
} 0x400d516a: taskStatus(void*) at /home/Projects/HomeBrain/src/main.cpp:83 This is the code at main.cpp is a freertos task which periodically invokes sendJSON 0x400d516a: taskStatus(void*) at /home/Projects/HomeBrain/src/main.cpp:83 This is the code at main.cpp is a freertos task which periodically invokes sendJSON: void taskStatus( void * parameter )
} 0x40088d29: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1) |
The line activeClients[i]->send(msg, WebsocketHandler::SEND_TYPE_TEXT);
Did you check that in your local file at From your code snippets, I wouldn't expect the execution to reach line 243 at all, or at least not from the call in Also, if you'd switch to PlatformIO, enabling the DEBUG logs could help with that:
|
I reinstalled the library from platformio's libraries (just in case) "version": "1.0.0" in manifest file. This time I tried with platformio monitoring. I recompiled and upload the code into the device. After some minutes sending JSON via websockets (and refreshing once in a while the web page), I obtained two different exceptions: [HTTPS:I] Request: GET / (FID=58) Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Backtrace: 0x400d6a4e:0x3ffd42e0 0x400d38e2:0x3ffd4310 0x400d5222:0x3ffd4370 0x40088d29:0x3ffd4390 Rebooting... The other one: [HTTPS:D] >> Websocket.send(): length=176 Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Backtrace: 0x40196a2f:0x3ffb1d60 0x400d8e62:0x3ffb1d80 0x400d5e0a:0x3ffb1f60 0x400d510e:0x3ffb1f90 0x400dd715:0x3ffb1fb0 0x40088d29:0x3ffb1fd0 #0 0x40196a2f:0x3ffb1d60 in httpsserver::WebsocketHandler::closed() at /home/user1/.platformio/lib/esp32_https_server_ID5887/src/WebsocketHandler.cpp:251 Rebooting... First one is at WebsocketHandler.cpp:244, one line after the first error I sent. I clicked in the link the monitoring tool provides and it took me to the debugging line after the writeBuffer. _con->writeBuffer(data, length); |
At least the second one sounds somewhat familiar, can you try #89 and see if it helps? I didn't get to reviewing that in detail, but the situation seems similar. With PIO, the easiest way to test it is to create a (And you may want to change the password you're using on the ESP32, I missed to warn you that an auth header would be logged, too. Sorry for that) |
Yeah...bligeti's code works! Now, trace shows the receive error but does not crash. [HTTPS:E] An receive error occured, FID=55 Thanks! |
Hi,
Sometimes the ESP32 reboots because this exception.
The error occurs sporadically but before ESP32 crashes it always shows the log:
[HTTPS:E] An receive error occured, FID=NN
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x400d66d5 PS : 0x00060a30 A0 : 0x800d382d A1 : 0x3ffd4340
A2 : 0x3ffd5aec A3 : 0x3ffd4394 A4 : 0x00007e00 A5 : 0x00000002
A6 : 0x00000001 A7 : 0x000000aa A8 : 0x00007e81 A9 : 0x0000007d
A10 : 0x00000010 A11 : 0x3ffd55e0 A12 : 0x3ffd5690 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x3ffd1d80 SAR : 0x00000008 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000010 LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000
Backtrace: 0x400d66d5:0x3ffd4340 0x400d382a:0x3ffd4370 0x400d516a:0x3ffd43d0 0x40088d29:0x3ffd43f0
Rebooting...
I'm using just the HTTPServer and WebSockets (3 Max parameter)
Any idea why it happens or any workaround?
Thanks and congratulations for your project.
Victor.-
The text was updated successfully, but these errors were encountered: