fix(assembly): guard onChanged against solver during document restore #245
Reference in New Issue
Block a user
Delete Branch "fix/assembly-restore-segfault"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Opening documents containing Assembly objects causes a segfault (SIGSEGV) in
Assembly::AssemblyObject::validateNewPlacements().During document restore,
PropertyLinkList::Restoresets theGroupproperty onAssemblyObject, which triggers:At this point, joints reference objects via
PropertyXLinkSublinks that have not been restored yet — dereferencing these null pointers causes the crash.Fix
Add an
isRestoring()guard toAssemblyObject::onChanged()to skip solver invocation during restore. This matches the existing pattern inAssemblyLink::onChanged()(same file family).The solver runs properly later when the document is fully loaded and a recompute is triggered.
Stack trace (abbreviated)