mktime() causes crashing, memory leak???
We’ve found on the ESP32 that using this would cause inexplicable runtime crashing :
struct tm Tm1;
time_t tTime1 ;
//...
tTime1 = mktime(&Tm1); //<<<<<THIS COULD CAUSE A CRASH!!!
Changing the definition to this sovled it:
struct tm Tm1 = {0}; //<<The = {0} is really important to ensure the struct if properly initialised
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.