@wmayer confirmed the bug and wrote:Description
This apply to latest git master version (I've not found it in "Product version" box.
Version: 0.17
Revision: 7667 (git)
FreeCAD crashes with e SIGSEGV while moving a box from a body to another one in the same part.
Steps To Reproduce
I start in PartDesign
- Create a new part
- Create 3 bodies under this part
- Create a box in the third body
- Move the box from the 3rd body to the first one
(right click -> move object to another body -> choose the 1st in the list)
---> Crash
Code: Select all
** Abort *** an exception was raised, but no catch was found. ... The exception is:SIGSEGV 'segmentation violation' detected. Address 1a0[/quote]
wmayer wrote:The crash happens in the method CmdPartDesignMoveFeature::activated on line 636:
because 'sourceNewTip ' is a nullptr. Btw, to me this block doesn't make much sense anyway because in line 619 the Tip is removed from 'source' but nothing has been added to it. So, why is there a second call to get its Tip (when it actually must be null).Code: Select all
App::DocumentObject * sourceNewTip = source->Tip.getValue(); > doCommand(Gui,"Gui.activeDocument().show(\"%s\")", sourceNewTip->getNameInDocument());
The code can be easily fixed by adding
but when trying the example with the three bodies and a box, the box will be moved but not its attached coordinate system. So, to me it seems more things are broken in this command (or I don't understand the logic ).Code: Select all
App::DocumentObject * sourceNewTip = source->Tip.getValue(); if (sourceNewTip) doCommand(Gui,"Gui.activeDocument().show(\"%s\")", sourceNewTip->getNameInDocument());