View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001339 | FreeCAD | Bug | public | 2013-12-28 13:14 | 2015-01-06 16:25 |
Reporter | jrheinlaender | Assigned To | wmayer | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | amd64 | OS | Linux | OS Version | Ubuntu 13.10 |
Product Version | 0.14 | ||||
Summary | 0001339: Crash when giving sketch with external geometry a new support (face) after the original support was deleted | ||||
Description | The 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 Information | Solution 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. | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
|
|
|
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. |
|
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 ;) |
|
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. |
FreeCAD: master e7b44d28 2014-03-10 13:35:41 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 |
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 |
|
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 |