Closed alexbarteau-temboo closed 5 years ago
Thanks for the report @alexbarteau-temboo.
we've already had a PR addressing this issue -- just been merged. This should resolve the crash your describe (please reopen otherwise) Thanks!
@david-cermak
It appears the repository reference in the esp-idf repository is old. It is still linking to the old 11f8846
commit. Manually checking out the master
branch of the esp-mqtt submodule does fix this issue.
When can we expect esp-idf to reference a commit with this fix?
This usually takes some time until changes propagate to IDF, sorry cannot give any estimate. There's a corresponding IDF issue https://github.com/espressif/esp-idf/issues/3619, which would close once merged to IDF master (so you can subscribe to get notified)
Any updates on this issue? I don't see fix for this issue is updated to master branch??
It is critical that we can shutdown and cleanup failed mqtt connections. Attempting to do so now crashes the application.
If the
esp_mqtt_client_config_t
passed toesp_mqtt_client_init()
is invalid the client cannot be shutdown/destroyed. This was tested with an invaliduri
andcert_pem
, but likely extends toport
and all other parameters used to connect to broker.Attempting to shutdown a connection that did not reach the "MQTT_EVENT_CONNECTED" state results in a panic as the "disconnect" message can't be sent. The backtrace is below. Additionally, you cannot "destroy" the client because that calls the esp_mqtt_client_stop.
Trace on stop call:
Commenting out the call to stop in
esp_mqtt_client_destroy
results in a different panic as the destroy method appears to be attempting to free an uninitialized memory reference.