Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Bug in AABB tree implementation

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Bug in AABB tree implementation


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Bug in AABB tree implementation
  • Date: Mon, 30 May 2011 08:46:32 +0200

I cannot reproduce the problem. Which version of CGAL are you using?

alexei wrote:
Hi all, I've recently stumbled upon a bug in CGAL's implementation of AABB trees. The bug occurs when you construct an AABB tree using a single primitive as
input (I used triangles); it seems that there's a common assumption that
there would be at least two primitives, and this is reflected in the
following two places: - AABB_tree.h:499 - if there's only one primitive, a 0-length block of
memory is allocated for the tree - AABB_tree_node.h:133 - if there's only one primitive the recursion is
incorrect since the switch handles the cases for two, three and more
primitives
The latter bug (or their combination) causes a segmentation fault (or some
other colorful panic) on my machine. I'm running Kubuntu 11.04 (Natty) in VM over Windows 7; CGAL was installed
via the package manager and there was no special configuration that needed
to be done. I'm using the latest Eclipse for editing but compile using the
CMake-generated Makefile.
Attached you'll find some simple code example that recreates the bug: http://cgal-discuss.949826.n4.nabble.com/file/n3555851/bug.h bug.h
Cheers, Alexei

--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Bug-in-AABB-tree-implementation-tp3555851p3555851.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.16.

Top of Page