Hi,
I am currently testing FMI 2.0 state serialization API (fmi2SerializeFMUstate and fmi2DeSerializeFMUstate) using the BouncingBall example. And I wrote a small program for testing this.
It seems the FMU can import a serialized state correctly when both serialization/deserialization take place within "the same program run" (process). But, when I try to export/import a state in two different processes in sequence, (i.e. first run to dump the state into a file, and import it in a second run), FMU crashes.
After some investigation, it seems in cosiumlatiion.c Status setFMUState(ModelInstance*, void*), memcpying s->x (or also dereferncing s->x)
causes this crash.

Also seeing the same behaviour with fmpy:
