Comments (3)
Just to understand a few questions:
- you are using the lib as a client and the exception happens on the client?
- if so, could you try with i-n-g-os origial mqtt-client lib. https://github.com/i-n-g-o/esp-mqtt-arduino
- you can reproduce this more or less deterministically?
Thanks,
Martin
from umqttbroker.
I'm using lib only as client and this happens on client.
Original lib -> the same problem
mqtt_pub.ino from origial mqtt-client lib, only wifi user/pass and mqtt server IP changed.
if I add in setup (before myMqtt.connect();):
myMqtt.setUserPwd("mymqttuser", "mymqttpass");
everything works correctly
but without setUserPwd I got:
Exception 9: LoadStoreAlignmentCause: Load or store to an unaligned address
Decoding 18 results
0x40104a44: ets_timer_setfn at ?? line ?
0x4010020c: _umm_free at C:\PROGRAMY\Arduino\hardware\esp8266com\esp8266\cores\esp8266\umm_malloc/umm_malloc.c line 1291
0x40104c70: ets_timer_arm_new at ?? line ?
0x401004f4: calloc at C:\PROGRAMY\Arduino\hardware\esp8266com\esp8266\cores\esp8266\umm_malloc/umm_malloc.c line 1688
0x402198da: MQTT_Connect at C:\PROGRAMY\arduino_projekty\libraries\esp-mqtt-arduino\src\mqtt/mqtt.c line 915
0x40219891: MQTT_Connect at C:\PROGRAMY\arduino_projekty\libraries\esp-mqtt-arduino\src\mqtt/mqtt.c line 901
0x40201340: delay at C:\PROGRAMY\Arduino\hardware\esp8266com\esp8266\cores\esp8266/core_esp8266_wiring.c line 46
0x4020269c: MQTT::connect() at C:\PROGRAMY\arduino_projekty\libraries\esp-mqtt-arduino\src/MQTT.cpp line 198
0x40201f77: myDisconnectedCb() at C:\tmp\arduino_modified_sketch_608881/mqtt_pub.ino line 90
0x4010420a: lmacTxFrame at ?? line ?
0x40203125: mqttDisconnectedCb at C:\PROGRAMY\arduino_projekty\libraries\esp-mqtt-arduino\src/MQTT.cpp line 198
0x40100a91: ppEnqueueRxq at ?? line ?
0x40218f65: mqtt_tcpclient_discon_cb at C:\PROGRAMY\arduino_projekty\libraries\esp-mqtt-arduino\src\mqtt/mqtt.c line 509
0x4022294b: espconn_tcp_disconnect_successful at app/espconn_tcp.c line 384
: (inlined by) espconn_Task at app/espconn_tcp.c line 439
0x40222958: espconn_tcp_disconnect_successful at app/espconn_tcp.c line 389
: (inlined by) espconn_Task at app/espconn_tcp.c line 439
0x4010085e: ppProcessTxQ at ?? line ?
0x4021b8a6: ppPeocessRxPktHdr at ?? line ?
from umqttbroker.
Hi Martin
Thanks for the hard work done with the Andriod library.
When running the code on ESP8266 I intermittently get a broker error message when I disconnect a client from the broker: (connect and then a few seconds later disconnect the client).
Fatal exception 9(LoadStoreAlignmentCause):
epc1=0x40227fd2, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000107, depc=0x00000000
Exception (9):
epc1=0x40227fd2 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000107 depc=0x00000000
With debug activated and a client disconnect requested, I noticed that during the client diconnect sequence a espconn_delete(mqttClientCon->pCon) and when the MQTT_ServerTask is executed a espconn_disconnect(clientcon->pCon) is called. The Fatal exception happens when espconn_disconnect(clientcon->pCon) is executed.
Would it not be better to prevent a espconn_delete to be followed by espconn_disconnect by changing ClientCon->connState in MQTT_server_deleteClientCon.
bool ICACHE_FLASH_ATTR MQTT_server_deleteClientCon(MQTT_ClientCon * mqttClientCon) {
MQTT_INFO("MQTT: DeleteClientCon\r\n");
if (mqttClientCon == NULL) return;
os_timer_disarm(&mqttClientCon->mqttTimer);
if (mqttClientCon->pCon != NULL) {
mqttClientCon->connState = TCP_DISCONNECTING;
espconn_delete(mqttClientCon->pCon);
}
Your feedback plse.
Regards
Marius
from umqttbroker.
Related Issues (20)
- disconnect and reconnect 6-10 time,the broker will cant't be connected HOT 1
- Client count HOT 8
- How to restart the broker?
- Ignored espconn_send() return (error) value.
- Broker Crashing when wifi disconnects HOT 2
- Accessing via mosquitto_sub/pub. How? HOT 1
- Broker doesn't accept new connections after 24h running? HOT 4
- Locally published topics do not appear to retain
- Compiling Error HOT 1
- ESP32 Port? HOT 1
- CRASH BROKER ((( WHY ?
- Ip address MQTT broker
- Compiling error using uMQTTBroker HOT 1
- Partial message / disconnections HOT 1
- Connection problem
- problem with using lwip:v2
- mqtt no user and pass HOT 1
- Broker cannot be connected after client disconnect
- Cannot send HTTPClient POST with MQTT
- Using ESP8266 as MQTT broker and datalogger HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from umqttbroker.