Opened 10 years ago

Last modified 8 years ago

#7984 assigned Bugs

In very rare cases, boost::polygon crashed or generate bad polygon when substracting 2 sets of polygons

Reported by: jp.charras@… Owned by: Andrii Sydorchuk
Milestone: To Be Determined Component: polygon
Version: Boost 1.53.0 Severity: Problem
Keywords: Cc:

Description

I am using boost:: polygon to calculate sum or difference of sets of polygons. Recently, When calcualting the difference of 2 sets of polygons, I found 2 cases creating a serious issue: Depending on the shape of polygons ( a slight change "fix" the bug) I have one case which create no polygon and one (in fact 2 samples) which crashes.

In the sample which calculate the difference between 2 polygon sets, there are 2 polygon sets: one creates no polygon, and the other crashes.

This it reproducible under Linux or Windows-gcc-mingw, with different gcc versions and boost version. (I tried to make the polygons as simple as possible) (see comments inside the sample).

I have used a lot boost:: polygon, and I have only 2 cases which fails (Seems related to a particular shape, not to a polygon complexity)

Thanks to the developpers.

Attachments (1)

test_boost_polygon.cpp (8.4 KB ) - added by jp.charras@… 10 years ago.
sample which generate bad polygon difference, or crashes (see comments inside the sample)

Download all attachments as: .zip

Change History (5)

by jp.charras@…, 10 years ago

Attachment: test_boost_polygon.cpp added

sample which generate bad polygon difference, or crashes (see comments inside the sample)

comment:1 by Andrii Sydorchuk, 10 years ago

Owner: changed from Lucanus Simonson to Andrii Sydorchuk

comment:2 by Andrii Sydorchuk, 9 years ago

Hi,

Thanks for the report. I was able to reproduce the issue. Will have a closer look.

Andrii

comment:3 by Andrii Sydorchuk, 9 years ago

Status: newassigned

comment:4 by arantius@…, 8 years ago

This bug hit me when using KiCad: https://bugs.launchpad.net/bugs/1408494

Has there been progress?

Note: See TracTickets for help on using tickets.