JMG1 / ExplodedAssembly

FreeCAD workbench to create exploded views and animations of assemblies
GNU Lesser General Public License v2.1
118 stars 27 forks source link

Corrupted data after save #31

Closed jmickelin closed 1 year ago

jmickelin commented 1 year ago

The ExplodedAssembly and the groups therein fail to load their data after an application restart.

Investigating the .FcStd it turns out that it fails already when attempting to save. Each of the following properties get set to a value bnVsbA==, which is null in base64:

This means all the data about the assembly is lost and neither retrievable from the project file or backup file(s), except for the trajectory lines. (To be clear, the rest of the objects in your model are not affected, though their placement might be wrong, since the InitialPlacement data is lost.)

This makes this addon pretty much unusable currently, sadly.

Program versions:

FreeCAD 0.21.1 Python 3.11.5

jmickelin commented 1 year ago

The cause seems to be FreeCAD itself: https://github.com/FreeCAD/FreeCAD/pull/10769

Closing this as invalid.

(And FreeCAD uses Pickle if the save file specifies so? That's sketchy and incredibly dangerous :worried: )

jmickelin commented 1 year ago

Never mind. As mentioned in that PR, they used to use Pickle but the program now uses JSON regardless of what the save file says and just kept the method names unchanged. Quite literally so:

 Py::Module pickle(PyImport_ImportModule("json"),true);

:stuck_out_tongue: