View Issue Details

IDProjectCategoryView StatusLast Update
0002926PartBugpublic2017-06-03 11:49
Reporternmt Assigned Towmayer  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version0.17 
Target Version0.17Fixed in Version0.17 
Summary0002926: Trying to access Part.Shape.children() before doc.recompute() crashes the whole program
DescriptionRun attached python script to crash FreeCAD 0.17
Steps To Reproduce
import FreeCAD
import Part
from FreeCAD import Base

doc = FreeCAD.newDocument('Slice')
Gui.activeDocument().activeView().viewAxonometric()
b = Part.makeBox(10,10,10,Base.Vector(0,0,0),Base.Vector(0,0,1))
box = doc.addObject("Part::Box","Box")
box.Shape = b
box.ViewObject.Transparency=50
planes = [box]
for i in range(2,10,2):
   p = Part.makePlane(14,14, Base.Vector(-2,-2,i), Base.Vector(0,0,1))
   plane = doc.addObject("Part::Plane",("Plane%s" % (i)))
   plane.Shape = p
   plane.ViewObject.Transparency=50
   planes.append(plane)

Gui.SendMsgToActiveView("ViewFit")

r = Part.BOPTools.SplitFeatures.makeBooleanFragments(name= 'BoolFrag')
r.Objects = planes
r.Mode = 'Standard'
r.ViewObject.Transparency = 60
children = r.Shape.childShapes()
for child in children:
   Part.show(child)
   child.ViewObject.Transparency=50

doc.recompute()
Gui.SendMsgToActiveView("ViewFit")
Additional InformationForum thread: https://forum.freecadweb.org/viewtopic.php?f=22&t=20935
TagsPart, python
FreeCAD Information

Activities

Kunda1

2017-02-26 11:54

administrator   ~0008440

@mnt thanks for the bug report. Is there a thread on the forum we can link this to or did you just open a ticket first? What FC revision are you running an on what system?
(please post Help > About FreeCAD > Copy to clipboard)

Kunda1

2017-02-26 12:25

administrator   ~0008441

found thread on forums + added to summary

Kunda1

2017-03-27 18:21

administrator   ~0008719

DeepSOIC confirmed crash on forum thread.

Kunda1

2017-06-02 15:12

administrator   ~0009257

Last edited: 2017-06-02 15:12

It crashes upon calling childShapes() of a null shape:
Part.Shape().childShapes()

@wmayer ping

wmayer

2017-06-03 11:49

administrator   ~0009274

https://github.com/FreeCAD/FreeCAD/commit/88bd341ad2da7399719d350bf9f715297d8d9f33

Issue History

Date Modified Username Field Change
2017-02-25 23:19 nmt New Issue
2017-02-26 11:54 Kunda1 Description Updated
2017-02-26 11:54 Kunda1 Steps to Reproduce Updated
2017-02-26 11:54 Kunda1 Note Added: 0008440
2017-02-26 12:24 Kunda1 Additional Information Updated
2017-02-26 12:25 Kunda1 Note Added: 0008441
2017-03-24 14:37 Kunda1 Target Version => 0.17
2017-03-27 18:21 Kunda1 Status new => confirmed
2017-03-27 18:21 Kunda1 Note Added: 0008719
2017-03-27 18:21 Kunda1 Priority immediate => high
2017-03-27 18:22 Kunda1 Steps to Reproduce Updated
2017-03-27 18:22 Kunda1 Steps to Reproduce Updated
2017-05-02 13:22 Kunda1 Tag Attached: python
2017-05-02 13:25 Kunda1 Tag Attached: Part
2017-05-10 19:57 Kunda1 Project FreeCAD => Part
2017-06-02 15:12 Kunda1 Note Added: 0009257
2017-06-02 15:12 Kunda1 Note Edited: 0009257
2017-06-03 11:49 wmayer Assigned To => wmayer
2017-06-03 11:49 wmayer Status confirmed => closed
2017-06-03 11:49 wmayer Resolution open => fixed
2017-06-03 11:49 wmayer Fixed in Version => 0.17
2017-06-03 11:49 wmayer Note Added: 0009274