Post topics, source code that relate to the Arduino Platform

User avatar
By svicar
#89505 Hello to all
I have ESP8266 nodemcu connected to wifi and geting two values from web. Sometimes it restart with this error:
Exception 9: LoadStoreAlignmentCause: Load or store to an unaligned address
PC: 0x402090d4: HTTPClient::connected() at C:\Users\Matej\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\libraries\ESP8266HTTPClient\src\ESP8266HTTPClient.cpp line 475
EXCVADDR: 0x00000069

Decoding stack results
0x40205994: Print::println(char const*) at C:\Users\Matej\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266\Print.cpp line 198
0x402011a3: SendData1() at C:\Users\Matej\Documents\Arduino\ESP8266_php_1/ESP8266_php_1.ino line 199
0x40201376: loop() at C:\Users\Matej\Documents\Arduino\ESP8266_php_1/ESP8266_php_1.ino line 127
0x40100154: ets_post(uint8, ETSSignal, ETSParam) at C:\Users\Matej\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266\core_esp8266_main.cpp line 177
0x40206c2c: loop_wrapper() at C:\Users\Matej\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4\cores\esp8266\core_esp8266_main.cpp line 197

this is part of the program that is called every 20seconds
void GetData()
{
HTTPClient http;
http.begin("http://192.168.0.101/printer_state.txt");
int httpCode = http.GET();
if (httpCode > 0)
{
const String& payload = http.getString(); //Get the request response payload
Serial.println(payload); //Print the response payload
if (payload.length() > 3 and httpCode==200)
{
crne_s = payload.substring(0, payload.indexOf(','));
barvne_s = payload.substring(payload.indexOf(',') + 1, payload.length());
}
}
if (http.connected()) http.end();
delay(1000);
}

the restart comes around http.end()
Does somebody have some idea to try?

Thanks