View Issue Details

IDProjectCategoryView StatusLast Update
0002418FreeCADBugpublic2016-02-18 16:34
Reportersliptonic Assigned Toeivindkvedalen  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSMintOS Version17.3
Target Version0.16Fixed in Version0.16 
Summary0002418: Draft.scale causes segfault.
DescriptionOS: Linux Mint 17.3 Rosa
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6272 (Git)
Build type: Unknown
Branch: master
Hash: 57fadb1663ff668fa8e91f5629b55870476f4d8b
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.0

Attempting to scale a FreeCAD object causes a segfault
Steps To ReproduceCreate a Part object (cube, cylinder, etc.)
Select the part in the tree.

Paste these two lines (from the wiki) into the python console:

import FreeCAD,Draft
Draft.scale(FreeCAD.ActiveDocument.ActiveObject,FreeCAD.Vector(2,2,2))

The part should scale but instead freecad crashes with a segmentation violation error in the console.
Additional InformationI've reproduced this on two machines. The other running debian Jessie.
TagsNo tags attached.
FreeCAD Information

Relationships

related to 0002436 closedeivindkvedalen Crash when using mirror tool on items made with freecad prior to at least rev5808 

Activities

yorik

2016-01-25 18:33

administrator   ~0006756

Something wrong with the new expression parser apparently...

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff732ad28 in Gui::ExpressionBinding::bind(App::ObjectIdentifier const&)
    () from /home/yorik/Apps/FreeCAD/lib/libFreeCADGui.so
(gdb) bt
#0 0x00007ffff732ad28 in Gui::ExpressionBinding::bind(App::ObjectIdentifier const&) () from /home/yorik/Apps/FreeCAD/lib/libFreeCADGui.so
#1 0x00007ffff75166b7 in Gui::PropertyEditor::PropertyItem::bind(App::ObjectIdentifier const&) () from /home/yorik/Apps/FreeCAD/lib/libFreeCADGui.so
0000002 0x00007ffff751c6ad in Gui::PropertyEditor::PropertyVectorItem::propertyBound() () from /home/yorik/Apps/FreeCAD/lib/libFreeCADGui.so
0000003 0x00007ffff75166ce in Gui::PropertyEditor::PropertyItem::bind(App::ObjectIdentifier const&) () from /home/yorik/Apps/FreeCAD/lib/libFreeCADGui.so
0000004 0x00007ffff7514961 in Gui::PropertyEditor::PropertyItem::setPropertyData(std::vector<App::Property*, std::allocator<App::Property*> > const&) ()
   from /home/yorik/Apps/FreeCAD/lib/libFreeCADGui.so

The strange thing is that making a Draft Clone of the object, then changing its scale property (which is what Draft Scale does) works normally...

eivindkvedalen

2016-01-29 15:29

developer   ~0006776

This is caused by a problem with resolving the property, almost as reported in http://forum.freecadweb.org/viewtopic.php?f=3&t=13950

Related Changesets

FreeCAD: master e5f1e298

2016-01-26 22:22:45

Eivind Kvedalen


Committer: wmayer Details Diff
ObjectIdentifier: Reworked resolve() function to solve issue 0002389 and 0002418.

* Refactored code; moved mutable fields into a separate inner class.
* Added resolvedProperty to ResolveResults class.
* Set resolved document name, even if it does not resolve correctly, so we can give a better error message later.
* If the document name is explicitly set, and it does not resolve, don't try any further.
* If document name is set, use that instead of the ObjectIdentifier's owner when looking up the document object.
Affected Issues
0002389, 0002418, 0002436
mod - src/App/ObjectIdentifier.cpp Diff File
mod - src/App/ObjectIdentifier.h Diff File

Issue History

Date Modified Username Field Change
2016-01-25 00:58 sliptonic New Issue
2016-01-25 18:33 yorik Note Added: 0006756
2016-01-29 15:29 eivindkvedalen Note Added: 0006776
2016-01-29 15:36 eivindkvedalen Assigned To => eivindkvedalen
2016-01-29 15:36 eivindkvedalen Status new => assigned
2016-01-29 16:22 yorik Target Version => 0.16
2016-02-06 10:25 jmaustpc Relationship added related to 0002436
2016-02-18 16:33 wmayer Changeset attached => FreeCAD Master master e5f1e298
2016-02-18 16:34 wmayer Status assigned => closed
2016-02-18 16:34 wmayer Resolution open => fixed
2016-02-18 16:34 wmayer Fixed in Version => 0.16