elliotf / heekscad

Automatically exported from code.google.com/p/heekscad
0 stars 0 forks source link

Reordered sketches cause segfault #314

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Start a new Heeks file.  
Draw a sketch and make it closed.  Save it.  
Open it.  Enjoy the fact that it works.  
Re-order the sketch from counter clockwise to clockwise.  Save it.  
Re-open it.  Restart HeeksCAD because you just segfaulted.    

What is the expected output?  Less segfaulting.

What do you see instead?  Crash.

Examining the .heeks file before and after re-ordering shows two things.  
First, the object ID's of the lines and points have changed but the object IDs 
referenced in the constraints have not changed.

Second, the constraints have been duplicated.  In my test file there were 
originally three constraints.  After reordering there are six, three sets of 
two identical constraints.

I'm marking this as High priority because of the frequency of reordering 
(including automatic reordering) and the severity of the bug.

Attaching two files.  Identical except saved before and after reordering.

Original issue reported on code.google.com by shopinth...@gmail.com on 28 Oct 2010 at 3:38

Attachments:

GoogleCodeExporter commented 8 years ago
There are other ways to trigger the issue besides reordering.  Combining or 
splitting sketches can also cause point objects to be renumbered without also 
renumbering the constraints that reference those points.

Original comment by shopinth...@gmail.com on 28 Oct 2010 at 3:40