-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Description
Platform
- Hardware: [ESP-12E]
- Core Version: [2.3.0-rc2]
- Development Env: [Arduino IDE]
- Operating System: [Windows]
Settings in IDE
- Module: [Generic ESP8266 Module|Wemos D1 mini r2|Nodemcu|other]
- Flash Size: [4MB]
- CPU Frequency: [80Mhz]
- Upload Using: [SERIAL]
- Upload Speed: [115200] (serial upload only)
Problem Description
I'm using:
https://github.com/Schm1tz1/aws-sdk-arduino-esp8266
But can't open an issue there.
I can update the AWS IoT device shadow properly.
But after the 17 update the Exception 29 occurs.
I know that this method "iotClient.update_shadow(shadow, actionError);" (and called functions/libraries) is the problem, because after every call the Heap getting smaller. I checked that with ESP.getFreeHeap()
The Heap size at the beginning is 39352 and when the error occurs at about 20000
MCVE Sketch
#include <ESP8266WiFi.h>
#include <AmazonIOTClient.h>
#include "ESP8266AWSImplementations.h"
Esp8266HttpClient httpClient;
Esp8266DateTimeProvider dateTimeProvider;
AmazonIOTClient iotClient;
ActionError actionError;
const char* ssid = "xxx";
const char* password = "xxx";
void setup() {
Serial.begin(115200);
delay(10);
// Connect to WAP
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
iotClient.setAWSRegion("us-east-1");
iotClient.setAWSEndpoint("amazonaws.com");
iotClient.setAWSDomain(".iot.us-east-1.amazonaws.com");
iotClient.setAWSPath("/things/xxx/shadow");
iotClient.setAWSKeyID("xxx");
iotClient.setAWSSecretKey("xxx");
iotClient.setHttpClient(&httpClient);
iotClient.setDateTimeProvider(&dateTimeProvider);
}
void loop(){
char shadow[100];
strcpy(shadow, "{\"state\":{\"reported\": {\"foobar\": \"bar\"}}}");
char* result = iotClient.update_shadow(shadow, actionError);
// Serial.print(result);
Serial.println(ESP.getFreeHeap());
delay(500);
}
Debug Messages
Exception (29):
epc1=0x4000e1b2 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000004 depc=0x00000000
ctx: cont
sp: 3fff0f90 end: 3fff1550 offset: 01a0
>>>stack>>>
3fff1130: 3fff0448 000013e7 000013e7 40226763
3fff1140: 00000208 3fff9ba4 3fff7964 402268fc
3fff1150: 00000104 00009d28 000013a5 3fff9ba4
3fff1160: 00000040 00000082 3fffadbc 40226bae
3fff1170: 00800000 00000080 00000000 00000041
3fff1180: 00000040 0000003f 40206cf8 00000041
3fff1190: 3fffb794 3fff9ba4 3fffad8c 3fff4824
3fff11a0: 3fffbca8 ffffffff 3fff9ba4 3fff9ba4
3fff11b0: 00000040 3fff9ba4 3fffadbc 3fff9ba4
3fff11c0: 00000040 3fff9ba4 3fffadbc 4022770a
3fff11d0: 3fff5c04 0000003f 33149086 00000001
3fff11e0: 3fff9ba4 3fffada4 3fffadbc 00000001
3fff11f0: 00000010 3fff9ba4 0000000f 40227965
3fff1200: 3fffad8c 3fff480c 0000000f 00000001
3fff1210: 00000001 3fff287c 3fff7aa1 402267c8
3fff1220: 00000100 3fff56f4 3fff7a9f 00000000
3fff1230: 00000100 3fff56f4 3fff7a9f 402289f1
3fff1240: 3fff1270 00000000 000000d0 00000030
3fff1250: 1d240649 1c2c6111 e714e207 00000004
3fff1260: 00000004 3fff79dc 3fff7a99 40224afc
3fff1270: 9a650203 c473328a d4203f54 d7552177
3fff1280: 99f504fc cd973018 c59b12aa c48f69c2
3fff1290: eb0e8724 5c26ab42 98119408 0649dfd6
3fff12a0: 00000004 3fff864a 3fff79dc 40224efd
3fff12b0: 5e9a8eb5 1f7b052d 2836d612 413fe662
3fff12c0: 44d994a6 f4103e0d 02fcb068 f8f3a81b
3fff12d0: 749d6fbd 3fff864a 3fff9584 00000b00
3fff12e0: 00000b6b 3fff8634 00000015 00000004
3fff12f0: 3fff79dc 3fff864a 00000004 00000004
3fff1300: 00000004 3fff864a 3fff79dc 402248f4
3fff1310: 00000000 3fff7a99 3fff79dc 40224c9c
3fff1320: 0000002a 3fff26ac 0000002b 401004d8
3fff1330: 3fff1380 0000000e 00000010 00000000
3fff1340: 3fff7554 3fff26ac 3fff79dc 01000000
3fff1350: 3fff1380 3fff13d0 3fff79dc 40224a4c
3fff1360: 40203064 00000001 3fff0530 00001387
3fff1370: 000190a2 3fff13d0 3fff7044 402036c5
3fff1380: 000001bb 3fff78ac 3fff13d0 40202b0a
3fff1390: 1cb90534 3fff26ac 3fff13f8 3fff7614
3fff13a0: 000001bb 3fff13d0 3fff26ac 40203a19
3fff13b0: 3ffe9770 1cb90534 3ffe9770 1cb90534
3fff13c0: 000001bb 3fff26ac 3fff046c 40204614
3fff13d0: 3ffe9180 00000000 000003e8 40206678
3fff13e0: 3fff02dc 3fff51e4 3fff7044 3fff0528
3fff13f0: 00000060 3fff14f0 3fff705c 0000000f
3fff1400: 00000000 00000055 3fff1514 401004d8
3fff1410: 00000004 3ffe93ec 000003de 3fff0528
3fff1420: 000000a0 3fff044c 3fff027c 4020706e
3fff1430: 000000a0 3fff044c 3fff027c 40204380
3fff1440: 3fffdad0 3fff044c 3fff046c 402024bd
3fff1450: 7473227b 22657461 72227b3a 726f7065
3fff1460: 22646574 4c227b3a 66746675 68637565
3fff1470: 6b676974 22746965 3336203a 2c30382e
3fff1480: 65542220 7261706d 72757461 32203a22
3fff1490: 30372e36 4322202c 3a22324f 31373120
3fff14a0: 7d7d7d33 00000000 00000003 40206456
3fff14b0: 31383632 00000001 3ffe9395 40207170
3fff14c0: 401059f2 0000000b 3ffe9013 3fff0528
3fff14d0: 3ffe9628 3fff027c 00000029 401004d8
3fff14e0: 3ffe9394 3fff0334 3fff046c 40206c1c
3fff14f0: 3fff32fc 0000005f 00000054 3fff278c
3fff1500: 0000000f 00000005 3fff4314 0000000f
3fff1510: 00000005 3fff2e2c 3fff0200 41d5999a
3fff1520: 427f3333 00000000 00000001 40206d19
3fff1530: 3fffdad0 00000000 3fff0520 40206d44
3fff1540: feefeffe feefeffe 3fff0530 40100720
<<<stack<<<
Decoded:
Exception 29: StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores
Decoding 29 results
0x402260f3: more_comps at /Users/igrokhotkov/e/axtls/e1/crypto/bigint.c line 1072
0x4022628c: alloc at /Users/igrokhotkov/e/axtls/e1/crypto/bigint.c line 1106
0x4022653e: regular_multiply at /Users/igrokhotkov/e/axtls/e1/crypto/bigint.c line 822
0x4020669c: esp_yield at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266/core_esp8266_main.cpp line 56
0x4022709a: bi_barrett at /Users/igrokhotkov/e/axtls/e1/crypto/bigint.c line 1289
0x402272f5: bi_mod_power at /Users/igrokhotkov/e/axtls/e1/crypto/bigint.c line 1414
0x40226158: trim at /Users/igrokhotkov/e/axtls/e1/crypto/bigint.c line 1197
0x40228381: RSA_public at /Users/igrokhotkov/e/axtls/e1/crypto/rsa.c line 242
: (inlined by) RSA_encrypt at /Users/igrokhotkov/e/axtls/e1/crypto/rsa.c line 276
0x4022448c: send_client_key_xchg at /Users/igrokhotkov/e/axtls/e1/ssl/tls1_clnt.c line 352
0x4022488d: do_clnt_handshake at /Users/igrokhotkov/e/axtls/e1/ssl/tls1_clnt.c line 109
0x40224284: do_handshake at /Users/igrokhotkov/e/axtls/e1/ssl/tls1.c line 1481
: (inlined by) basic_read at /Users/igrokhotkov/e/axtls/e1/ssl/tls1.c line 1357
0x4022462c: do_client_connect at /Users/igrokhotkov/e/axtls/e1/ssl/tls1_clnt.c line 154
0x401004d8: malloc at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266\umm_malloc/umm_malloc.c line 1664
0x402243dc: ssl_read at /Users/igrokhotkov/e/axtls/e1/ssl/tls1.c line 265
0x40202ba8: WiFiClient::_s_connected(void*, void*, signed char) at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\libraries\ESP8266WiFi\src/WiFiClient.cpp line 327
0x40203209: SSLContext::connect(ClientContext*, char const*, unsigned int) at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\libraries\ESP8266WiFi\src/WiFiClientSecure.cpp line 517
: (inlined by) WiFiClientSecure::_connectSSL(char const*) at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\libraries\ESP8266WiFi\src/WiFiClientSecure.cpp line 279
0x4020264e: WiFiClient::connect(IPAddress, unsigned short) at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\libraries\ESP8266WiFi\src/WiFiClient.cpp line 327
0x4020355d: WiFiClientSecure::connect(char const*, unsigned short) at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\libraries\ESP8266WiFi\src/WiFiClientSecure.cpp line 269
0x40204158: Esp8266HttpClient::send(char const*, char const*, int) at C:\Users\Jonas\Documents\Arduino\libraries\AWS-SDK-Arduino\src/ESP8266AWSImplentations.cpp line 26
0x40206151: String::copy(char const*, unsigned int) at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266/WString.cpp line 688
0x40206285: String::operator=(char const*) at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266/WString.cpp line 688
0x401004d8: malloc at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266\umm_malloc/umm_malloc.c line 1664
0x40206a12: AWSClient4::sendData(char const*) at C:\Users\Jonas\Documents\Arduino\libraries\AWS-SDK-Arduino\src/AWSClient4.cpp line 230
0x40203ec4: AmazonIOTClient::update_shadow(MinimalString, ActionError&) at C:\Users\Jonas\Documents\Arduino\libraries\AWS-SDK-Arduino\src/AmazonIOTClient.cpp line 23
0x402022cb: loop at C:\Users\Jonas\Documents\Arduino\ESP8266_AWS/ESP8266_AWS.ino line 130
0x402066bd: esp_schedule at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266/core_esp8266_main.cpp line 56
0x402066e8: loop_wrapper at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266/core_esp8266_main.cpp line 56
0x40100720: cont_norm at C:\Users\Jonas\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0-rc2\cores\esp8266/cont.S line 109
Metadata
Metadata
Assignees
Labels
No labels