aewallin / openvoronoi

2D voronoi diagram for point and line-segment sites using incremental topology-oriented algorithm. C++ with python bindings. Licensed under LGPL2.1.

Home Page:http://www.anderswallin.net/cam/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

insert_point_site fail

trlsmax opened this issue · comments

I try to build the cpp example on win10 with vs2019. build ok, but even insert first point site made program crash.
In medial axis example, it failed at line 27:
int id0 = vd->insert_point_site(p0);
image

Is that openvoronoi is not support windows? Or I use the wrong version of boost ?

I got the same on macOS (running any of the tests)

I wonder if it works on Linux since in CI things seem to work fine.

Screenshot 2022-12-15 at 17 06 50

I can confirm that it works correctly on linux, and the this line seems to have an effect on the macOS / windows issue:

https://github.com/aewallin/openvoronoi/blob/master/src/common/halfedgediagram.hpp#L277

When that is commented out, things >seem< to work. perhaps @aewallin can tell us more with that hint?

EDIT: When that is commented out, the minimal example seems to work, others don't segfault anymore but the graph is invalid, so it seems something is working differently in linux vs macos, and it might have to do with edge invalidation, but that is all I can figure out with my limited C++ / boost::graph knowledge ;)

Does macOS always use Clang as the compiler? gcc vs. clang could be tested on linux also.
I can try to take a look at some point - but it's years since I worked with this code seriously..

Hi Anders, have you seen my PR #53 ? It should fix this issue.

now merged. but I probably won't have time to test in the next week or so..

Thanks!