Hello! I keep getting an exception(3) on this code. I tried all i finded but i didn't find a solution! Here is the important code
if(getFingerprintEnroll() == true){
if(downloadFingerprintTemplate(id) == true){
fbdo.clear();
for (int i = 0; i < size; ++i){
String PR2 = GetOldFinger(i);
Serial.println("\n");
// FHex is a global variable.
Serial.println(FHex);
delay(200);
Serial.println("\n");
Serial.println(PR2);
delay(200);
//Prints both variables to see if they have the data. This part is succesfull
bool res = Compare(FHex, PR2);
if (res == true){
break;
}
}
}
}
Here is where the exception occurs. Its inside the Compare fuction
bool Compare (String New, String Old){
//transforms the Strings to std strings
std::string a = New.c_str(); //here the exception occurs
std::string b = Old.c_str();
double incmn = 0;
double vSz = 0;
if(a == b) {
Serial.println(F("100% Similarity!"));
} else{
if(a > b) {
vSz = b.size();
}else {
vSz = a.size();
}
for(double i = 0; i < vSz;++i){
if(a[i] == b[i]){
++incmn;
}
}
double result = (incmn/vSz)*100;
Serial.println("\n");
Serial.println(result);
if (result > 55) {
return true;
}
}
return false;
}
This is what the ESPExceptionDecoder tells me
Exception 3: LoadStoreError: Processor internal physical address or data error during load or store
PC: 0x40205bf4
EXCVADDR: 0x40000000
Decoding stack results
0x4021d919: String::copy(char const*, unsigned int) at C:\Users\Usuario\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266/WString.h line 343
0x40205d8b: loop() at D:\Raúl Gonzalez ASIX 2\Firebase_client/Firebase_client.ino line 151
0x40220208: uart_tx_free(uart_t*) at C:\Users\Usuario\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266\uart.cpp line 557
0x4021cc84: Print::println(int, int) at C:\Users\Usuario\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266\Print.cpp line 238
0x40100631: cont_check(cont_t*) at C:\Users\Usuario\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2\cores\esp8266\cont_util.cpp line 50
If anyone can help i will be very gratefull! This is for my final proyect that i am doing for my high grade so its very important. If you need anything more tell me.