kylelutz / chemkit

A C++ library for molecular modelling, cheminformatics and molecular visualization.
http://www.chemkit.org
BSD 3-Clause "New" or "Revised" License
54 stars 26 forks source link

Segmentation fault in the delaunay triangulation #37

Open ktns opened 8 years ago

ktns commented 8 years ago

Hi.

I'm trying to debianize this package, and have encountered a segmentatoin fault. When I build and test on an amd64 system, everything goes well. However, when it comes on an i386 system (both on debian jessie and sid), MolecularSurfaceTest::buckminsterfullerene() receives a segmentation fault. I've managed to figure out that this segmentation fault is caused by -2 in the Tetrahedron::neighbors, which seems to mean that DelaunayTriangulation::insertPoint cannot find a neighboring tetrahedron for a new tetrahedron. Strangely enough, it does not receive a segfalt when it run under valgrind, yet valgrind reports no errors.

I'm not sure why and under what condition it happens, but I'm afraid that chemkit::geometry::planeOrientation goes unstable when it handles near-coplanar points in some environment.

What do you think?