View Issue Details

IDProjectCategoryView StatusLast Update
0002561PartDesignBugpublic2017-07-15 11:20
ReporterJean-Luc Assigned Towmayer  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
OSDebian GNU/LinuxOS Versionsid/Linux 4.6 
Product Version0.16 
Target Version0.17Fixed in Version0.17 
Summary0002561: SIGSEGV while moving an entity from a body to an other one
DescriptionHi,

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 ReproduceI 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

** Abort *** an exception was raised, but no catch was found.
    ... The exception is:SIGSEGV 'segmentation violation' detected. Address 1a0

TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2016-05-24 16:41

administrator   ~0007120

The crash happens in the method CmdPartDesignMoveFeature::activated on line 636:

    App::DocumentObject * sourceNewTip = source->Tip.getValue();
>  doCommand(Gui,"Gui.activeDocument().show(\"%s\")", sourceNewTip->getNameInDocument());
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).

The code can be easily fixed by adding

    App::DocumentObject * sourceNewTip = source->Tip.getValue();
    if (sourceNewTip)
        doCommand(Gui,"Gui.activeDocument().show(\"%s\")", sourceNewTip->getNameInDocument());
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 :) ).

Kunda1

2017-01-30 16:12

administrator   ~0008109

Forum thread: https://forum.freecadweb.org/viewtopic.php?f=10&t=20370

jnxd

2017-02-23 21:06

developer   ~0008413

Doesn't seem to happen with:

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10232 +1 (Git)
Build type: Debug
Branch: constraintselect
Hash: aa748cdfa847e4ca2cd4e59bc0910347d5bf977e
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

abdullah

2017-05-24 22:03

manager   ~0009119

@kunda1

This can not be reproduced anymore. I guess Werner fixed it in the meantime.

I think this ticket should be closed.

Kunda1

2017-05-24 22:06

administrator   ~0009120

Thanks @Abdullah
@wmayer any idea what git commit you fixed this with?
Resolving in the meantime.

Issue History

Date Modified Username Field Change
2016-05-24 08:19 Jean-Luc New Issue
2016-05-24 16:41 wmayer Note Added: 0007120
2016-05-24 16:41 wmayer Status new => confirmed
2017-01-30 16:12 Kunda1 Note Added: 0008109
2017-02-20 22:01 Kunda1 Target Version => 0.17
2017-02-23 21:06 jnxd Note Added: 0008413
2017-05-24 22:03 abdullah Note Added: 0009119
2017-05-24 22:06 Kunda1 Assigned To => wmayer
2017-05-24 22:06 Kunda1 Status confirmed => resolved
2017-05-24 22:06 Kunda1 Resolution open => fixed
2017-05-24 22:06 Kunda1 Fixed in Version => 0.17
2017-05-24 22:06 Kunda1 Note Added: 0009120
2017-07-15 11:20 Kunda1 Status resolved => closed