Skip to content

Pickle: Mesh points at wrong series after deserializing #1919

Description

@pordyna

Describe the bug
When serializing and deserializing a series object in python and doing the same for a MeshRecord (or MeshRecordComponent ?) both will successfully deserialize. But, although calling load_chunk on the deserialized mesh will work, calling flush on the deserialized series won't actually load the data.
There is no proper error message, but the buffer will contain random data. When serializing with some parallelization libraries like joblib workers can fail with messages like:

Fatal Python error: gilstate_tss_set: failed to set current tstate (TSS)
Python runtime state: finalizing (tstate=0x00000000017f9e18)

To Reproduce
uv run deserialize_bug.py
deserialize_bug.py

Expected behavior
Since the MeshRecordComponent and MeshRecord both have add_pickle both methods in the example should work

Software Environment
See attached file

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions