View Issue Details

IDProjectCategoryView StatusLast Update
0001339FreeCADBugpublic2015-01-06 16:25
Reporterjrheinlaender Assigned Towmayer  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Platformamd64OSLinuxOS VersionUbuntu 13.10
Product Version0.14 
Summary0001339: Crash when giving sketch with external geometry a new support (face) after the original support was deleted
DescriptionThe reason is that the external geometry for the constraint doesn't exist any more, so an assertion in ViewProviderSketch::draw() fails.
Steps To Reproduce- Load the attached file.
- Switch to PartDesign workbench
- Look at Sketch002. It has an equal constraint to external geometry from Pad001
- Delete Pad001
- The sketch now has no support, so select the top face of Pad001, go to the PartDesign menu, and choose "assign sketch to face".
- Crash in ViewProviderSketch::draw()
Additional InformationSolution should be to either delete the constraint when the external geometry is deleted, or mark it as invalid so that the user has a chance to re-create it. Personally I would prefer the second solution because I don't like parts of my design simply disappearing without being alerted.
TagsNo tags attached.
FreeCAD Information

Relationships

related to 0001791 closedwmayer Counterbores do not follow when hole is moved 

Activities

jrheinlaender

2013-12-28 13:14

developer  

SketcherCrash.fcstd (Attachment missing)

wmayer

2013-12-29 09:09

administrator   ~0003986

Unfortunately, in the sketch view provider are by far too many asserts which I consider bad programming practice for error handling. Maybe this class should be rewritten from ground up.

Jriegel

2013-12-30 09:02

administrator   ~0003990

asserts for error handling is bad, that's true. But in that case its a good thing. If you write code you always makes certain assumptions that have to be true. As a sketch with external reference has an support. If the assumption not hold in real live a assert is a good way to show up the problem, otherwise you have a unclear behaviour or even crash and don't know what's going on. There a assert is good thing ;)

wmayer

2014-03-04 11:30

administrator   ~0004378

When removing the pad the document clears the ExternalGeometry list of the sketcher but the Constraints list still has a constraint to the external geometry. So, there is an inconsistency which triggers the assert later.

Solution:
We have to inform the sketcher that the support pad gets removed. This should be done on App level.

Related Changesets

FreeCAD: master e7b44d28

2014-03-10 13:35:41

wmayer

Details Diff
+ fixes 0001339: Crash when giving sketch with external geometry a new support (face) after the original support was deleted Affected Issues
0001339
mod - src/Mod/Sketcher/App/SketchObject.cpp Diff File
mod - src/Mod/Sketcher/App/SketchObject.h Diff File

Issue History

Date Modified Username Field Change
2013-12-28 13:14 jrheinlaender New Issue
2013-12-28 13:14 jrheinlaender File Added: SketcherCrash.fcstd
2013-12-29 09:09 wmayer Note Added: 0003986
2013-12-30 09:02 Jriegel Note Added: 0003990
2014-03-04 11:30 wmayer Note Added: 0004378
2014-03-10 12:49 wmayer Changeset attached => FreeCAD Master master e7b44d28
2014-03-10 12:49 wmayer Assigned To => wmayer
2014-03-10 12:49 wmayer Status new => closed
2014-03-10 12:49 wmayer Resolution open => fixed
2015-01-06 16:25 shoogen Relationship added related to 0001791