View Issue Details

IDProjectCategoryView StatusLast Update
0001131SketcherBugpublic2014-03-10 16:39
Reporterwmayer Assigned Towmayer  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Summary0001131: Crash when trying to edit sketch
Descriptionhttp://sourceforge.net/apps/phpbb/free-cad/viewtopic.php?f=3&t=4041

1. Open the project cover.fcstd
2. Run App.ActiveDocument.Sketch001.touch()
3. Recompute the document (takes a while)
4. This output is printed:
>>> Exception (Mon May 13 10:23:44 2013): Not yet supported geometry for external geometry
>>> Over-constrained sketch
>>> Please remove at least one of the following constraints:
>>> 44, 45, 46
5. Center button-meter-crossfader and Screw holes are marked as invalid
6. Try to edit sketch "Center button-meter-crossfader" ==> Crash

The crash happens due to some asserts in the code of ViewProviderSketch.
These are the lines:
* 2411 assert(Constr->Second >= -extGeoCount && Constr->Second < intGeoCount);
* 2517 assert(Constr->First >= -extGeoCount && Constr->First < intGeoCount);
* 2518 assert(Constr->Second >= -extGeoCount && Constr->Second < intGeoCount);

IMO in ViewProviderSketch "asserts" are heavily misused. Asserts are fine to check that something very obvious is wrong but definitely should not be used for error checking. I think all these asserts should be replaced with a proper exception handling.
TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2013-10-16 06:40

administrator   ~0003751

See also: http://forum.freecadweb.org/viewtopic.php?f=3&t=4732&sid=f17656c9a111e196327a99bc7e66aa1b#p37185

wmayer

2014-03-10 16:16

administrator   ~0004406

The point is that rebuildExternalGeometry() has a reference to a non-supported geometry so that 'ExternalGeo' has not enough elements and thus is inconsistent to the number of external constraints.

The solution is to remove all external constraints.

Related Changesets

FreeCAD: master b9f284cb

2014-03-10 17:16:47

wmayer

Details Diff
+ fixes 0001131: Crash when trying to edit sketch Affected Issues
0001131
mod - src/Mod/Sketcher/App/SketchObject.cpp Diff File

Issue History

Date Modified Username Field Change
2013-05-13 06:37 wmayer New Issue
2013-10-16 06:40 wmayer Note Added: 0003751
2014-03-10 16:16 wmayer Note Added: 0004406
2014-03-10 16:39 wmayer Changeset attached => FreeCAD Master master b9f284cb
2014-03-10 16:39 wmayer Assigned To => wmayer
2014-03-10 16:39 wmayer Status new => closed
2014-03-10 16:39 wmayer Resolution open => fixed