That’s one kind of problem that can appear when your save system is running recursive functions and/or causing C undefined behavior, e.g: returning a reference to value of a variable declared locally in body of a function or another thread.
There are situations with save systems where you should get a copy of a value instead, but it’s difficult to determine clear rules because serialization can be achieved in so many different ways, some paths leading to this…