pcb

Crash resulting from polygons with overlapping parallel segments

Bug #1797562 reported by Chad Parker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
Confirmed
Low
Unassigned

Bug Description

pcb crashes under certain conditions when a polygon, or a segment of a polygon has zero area. For example, creating a polygon with the following six points:

 1 ______ 6
  |******|
  |******|
 3|******|
  |\*****|
  |*\****|
  |**\___|
 2 4 5

(*'s are used so that the auto-formatting doesn't cause the ASCII art to collapse)

If you then attempt to move point 2, pcb will die. Obviously this is not a shape that people are frequently interested in, but, a simpler case could happen accidentally quite easily:

1,3 ----------- 2

While debugging something else, I stumbled on this. In a debug build, there is failed assertion in polygon1.c:

Assertion failed: (poly_Valid (np)), function original_poly, file ../../src/polygon.c, line 329.

This appears to check the number of points in a polygon against the number of items found in an r_search.

description: updated
Revision history for this message
Peter Clifton (pcjc2) wrote :

Hi, Doesn't crash for me - but the asserts are only enabled during debug builds.

It is quite possible to create an inconsistent (self intersecting) polygon geometry which will have the same effect if debug is enabled.

Revision history for this message
Chad Parker (parker-charles) wrote :

This only seems to be an issue when building with the DEBUG flag is set.

Changed in pcb:
milestone: none → future-bug-fix-release
importance: Undecided → Low
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.