Michael... you helped me way back try to resolve this issue. Now the covid19 is allowing me so much time, I want to get rid of CRASHES forever. Have been conversing with Martin Ger, the creator of uMQTTBroker which operates the mqtt in the ESP. Between both of you I am hoping to get enough information to find a solution.
Broker connects successfully after a “fresh” ESP boot, but ALWAYS crashes on the SECOND connection attempt from HS3... but will connect multiple times to other clients.
Observation:
So, although the crash dump shows the failure location in uMQTTBroker library, it only fails with connections to mcsMQTT. I will be trying to learn some more complex debugging skills today.
Confusing to me. Your thoughts can only help... LZH
Crash dump shows:
Exception 29: StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores PC: 0x4021ebee:
append_string at C:\Users\r\Documents\Arduino\libraries\uMQTTBroker-master\src\mqtt_msg.c line 45 EXCVADDR: 0x00000003 which is in uMQTT code...
staticint ICACHE_FLASH_ATTR append_string(mqtt_connection_t * connection, constchar *string, int len) {
if (connection->message.length + len + 2 > connection->buffer_length)
return -1;
connection->buffer[connection->message.length++] = len >> 8; THIS IS CRASH LINE 45
connection->buffer[connection->message.length++] = len & 0xff;
os_memcpy(connection->buffer + connection->message.length, string, len);
connection->message.length += len;
return len + 2;
}
Broker connects successfully after a “fresh” ESP boot, but ALWAYS crashes on the SECOND connection attempt from HS3... but will connect multiple times to other clients.
Observation:
- Start ESP Broker
- Broker properly connects to its unique CLIENTS (SONOFF/Tasmota and Custom ESP)
- HS3 properly Connects to Broker
- All Is well...
- Disable HS3 connection to Broker
- Enable HS3 connection
- Broker receives HS3 MQTT Client ID
- CRASH... sometimes ESP auto-starts, sometimes it is dead
So, although the crash dump shows the failure location in uMQTTBroker library, it only fails with connections to mcsMQTT. I will be trying to learn some more complex debugging skills today.
Confusing to me. Your thoughts can only help... LZH
Crash dump shows:
Exception 29: StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores PC: 0x4021ebee:
append_string at C:\Users\r\Documents\Arduino\libraries\uMQTTBroker-master\src\mqtt_msg.c line 45 EXCVADDR: 0x00000003 which is in uMQTT code...
staticint ICACHE_FLASH_ATTR append_string(mqtt_connection_t * connection, constchar *string, int len) {
if (connection->message.length + len + 2 > connection->buffer_length)
return -1;
connection->buffer[connection->message.length++] = len >> 8; THIS IS CRASH LINE 45
connection->buffer[connection->message.length++] = len & 0xff;
os_memcpy(connection->buffer + connection->message.length, string, len);
connection->message.length += len;
return len + 2;
}
Comment