EEPROMAnything bug with NodeMCU 0.9

Hi,
I'd like to know if someonelse is encountering the same issue than me.
Let me explain, I'm using ESP8266 based board for sometimes with arduino IDE, it's working pretty well.
Since some days, I try to store some kind of "configuration" in the nodeMCU EEPROM.
It's working well with the standard EEPROM Lib.
I wanted to use a struct and store directly it in the EEPROM with EEPROMAnything (with EEPROM.commit() added), but there's an issue:
1- If I switch off and on the nodemcu, when I try to load the struct, there's some garbage in my struct then (but some element are good)
2- If I save the struct in the eeprom, commit and load from the eeprom directly, it's working well. But If I load the struct from the eeprom, it's beggining to show garbage. And then, it's directly reseting the nodemcu
3- I've tried with a simple string, same issue.

I've tried to use different value for EEPROM.being (128 => 4096), same issue.
I've tried to write at different offset, same issue.

Any idea about this ? Is someone was successfull to use EEPROManything with ESP8266 ?

Any idea about this ?

Yep. I have an idea. Post your code.

Ok, thank you to take time to help me !

test-eeprom.ino


#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
// #include <OneWire.h>
#include <math.h>
#include <Wire.h>
// #include <LiquidCrystal_I2C.h>
// #include "MyTypes.h"
#include <HttpClient.h>
//#include <WiFi.h>
#include <elapsedMillis.h>
#include <EEPROM.h>
#include "EEPROManything.h"

String teststring2;
int teststringlength;

void setup() {
//Debug serial port
Serial.begin(115200);
EEPROM.begin(4096);
delay(10000);
String teststring="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
int result;

Serial.println("on ecrit les datas");
//on ecrit la string
resullt=EEPROM_readAnything(0,teststring);
Serial.print("resullt: ");
Serial.println(result);
}

void loop() {

int result;
String teststring2;
Serial.println("----------------------------");
Serial.println("Lecture depuis l'eeprom: ");
result=EEPROM_readAnything(0,teststring2);
Serial.print("result: ");
Serial.println(result);
Serial.print("teststring2: ");
Serial.print(teststring2);
Serial.println("----------------------------");
delay(10000);

}

++++++++++++++++++
EEPROMAnything.h


#include <EEPROM.h>
#include <Arduino.h> // for type definitions

template int EEPROM_writeAnything(int ee, const T& value)
{
const byte* p = (const byte*)(const void*)&value;
unsigned int i;
for (i = 0; i < sizeof(value); i++)
{
EEPROM.write(ee++, *p++);

}
EEPROM.commit();
return i;
}

template int EEPROM_readAnything(int ee, T& value)
{
byte* p = (byte*)(void*)&value;
unsigned int i;
for (i = 0; i < sizeof(value); i++)
*p++ = EEPROM.read(ee++);
return i;
}

I'm pretty sure that the read and write anything functions can read and write any standard types. A String is an instance of a class. A class instance is not a standard type. chars, char arrays, pointers to chars are standard types.

EEPROMAnything functions are done to be able to write almost everything, as it seems. People are using them to write struct (what I've tried, half sucessfully).

For now, I'm using the old way EEPROM.read EEPROM.write. It's working nicely, but I needed to add a lot more code to do what was normally "so easy to do" with EEPROMAnything.

was someone in this forum already using EEPROManyhting successfully ?