me-no-dev / AsyncTCP

Async TCP Library for ESP32
GNU Lesser General Public License v3.0
757 stars 439 forks source link

Fixed "Guru Meditation Error: Core 1 panic'ed (LoadProhibited)" #30

Closed tantive closed 6 years ago

tantive commented 6 years ago

Fixed "Guru Meditation Error: Core 1 panic'ed (LoadProhibited) . Exception was unhandled." (see https://github.com/espressif/esp-idf/issues/1467)

romankc commented 6 years ago

This does not resolve https://github.com/espressif/arduino-esp32/issues/2205 unfortunately. I don't know if it is related or not.

luc-github commented 6 years ago

What is the difference with https://github.com/me-no-dev/AsyncTCP/pull/20 ?

tantive commented 6 years ago

@luc-github In addition to #20 it increases robustness by explicitly checking all calls to _tcp_output_api if msg->pcb is defined, otherwise the referenced exception is thrown:

static err_t _tcp_output_api(struct tcpip_api_call_data *api_call_msg){
    tcp_api_call_t * msg = (tcp_api_call_t *)api_call_msg;
-    msg->err = tcp_output(msg->pcb);
+   if(msg->pcb){
+      msg->err = tcp_output(msg->pcb);
+    } else {
+      msg->err = 0;
+    }
    return msg->err;
}
luc-github commented 6 years ago

@tantive thank you - please next time state explicitly it is cumulative PR that fix several issues - it allows to close related PR and save @me-no-dev time to check - I close my PR as yours have the fix

tantive commented 6 years ago

Seems that the root cause for the Guru Meditation Error was already identified and fixed in the async-mqtt-client: https://github.com/marvinroger/async-mqtt-client/issues/99 https://github.com/marvinroger/async-mqtt-client/pull/118

@tecteun: fyi