Document renames cause problems #13841
Labels
Core
Issue or PR touches core sections (App, Gui, Base) of FreeCAD
Expressions
Missing: example file
Missing: steps to reproduce
Is there an existing issue for this?
Problem description
After doing "Save As..." to a different file, the expression engine might point to the OLD file until FreeCAD is restarted. This is tricky to reproduce, but can lead to data corruption.
Partial example:
<<Not>> + Sphere.Label
Unnamed#Box.ExpressionEngine
At this point, I tried different combinations of renaming the saved document and opening it, and somehow managed to get changes in Sphere.Label to affect Box.Label, but I can't reproduce it reliably. It might be some weird race condition? In my case I ended up with two open tabs, one a "wrong-doc-bugtest" and the other a "wrong-doc-bugtest1" that were cross-referencing each other in memory.
When in the "failing" mode, both open documents showed:
##@@ Label wrong_doc_bugtest1#Box.ExpressionEngine (NotSpherex) ##@@ <<Not>> + Sphere.Label
I ran into this in a larger project, where I Opened the file "foo-mk3.FCStd" and after doing Save As foo-mk4, foo-mk5, foo-mk6... I found out when re-opening foo-mk3 that my still open foo-mk6 was suddenly using old values from a spreadsheet in foo-mk3. Am I making any sense?
Sorry, I wish I could reproduce it reliably :(
Full version info
Subproject(s) affected?
None
Anything else?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: