From 9dc50cef727713575972674dbd8a323e764c2d9f Mon Sep 17 00:00:00 2001 From: forbes Date: Thu, 29 Jan 2026 23:54:10 -0600 Subject: [PATCH] Fix SIGSEGV in Assembly solver during document restore AssemblyObject::onChanged() was calling updateSolveStatus() when the Group property changed during document restore. This triggered the solver (solve -> validateNewPlacements) while child objects were still being deserialized, causing a segfault in validateNewPlacements() due to accessing uninitialized data. Add isRestoring() and isPerformingTransaction() guards matching the pattern used by GroupExtension::onChanged() and other FreeCAD modules. --- src/Mod/Assembly/App/AssemblyObject.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/Assembly/App/AssemblyObject.cpp b/src/Mod/Assembly/App/AssemblyObject.cpp index 859859cecf..4cd4c1fec6 100644 --- a/src/Mod/Assembly/App/AssemblyObject.cpp +++ b/src/Mod/Assembly/App/AssemblyObject.cpp @@ -139,7 +139,10 @@ App::DocumentObjectExecReturn* AssemblyObject::execute() void AssemblyObject::onChanged(const App::Property* prop) { - if (prop == &Group) { + if (prop == &Group + && !isRestoring() + && getDocument() + && !getDocument()->isPerformingTransaction()) { updateSolveStatus(); } App::Part::onChanged(prop);