Subject: CGAL users discussion list
List archive
- From: Sylvain Pion <>
- To:
- Subject: Re: [cgal-discuss] CGAL circulator operator* runtime error - segmenation fault
- Date: Fri, 06 Aug 2010 15:04:23 +0200
- Organization: INRIA
Le 05/08/10 13:30, mparusinski a écrit :
Hi everyone,
I am having some trouble with CGAL circulators. I am stuck with an akward
segmentation fault. The gdb debugger informs that * operator fails to work.
But it doesn't happen systematically. The code usually manages to perform a
few iterations. Any ideas on what could be wrong or any advice on how to use
circulators? (I am using CGAL 3.6)
if (circ == 0) {
cerr<< "ERROR: Unexpected error empty circulator"<< endl;
exit(-1);
}
Orientation minimun = none;
Facet_circulator origin(circ);
do {
// operator * fails
// Valgrind -> "Invalid read of size 8" Compact_container.h:808
operator*() const
Do you see this problem when running under valgrind ?
As mentioned recently in another mail, valgrind does not work
with (most of) CGAL. Namely it kills some numerical computations
(because it does not support rounding modes), so the triangulation
computed can be severely buggy, and then circulators can go wrong.
Otherwise, I don't see anything wrong with your piece of code,
but you don't show much anyway.
if (circ == 0) {
cerr<< "ERROR: Unexpected empty circulator"<< endl;
exit(-1);
}
Facet adj_facet = *circ;
// Make sure adjacent facet is a surface facet
map<Facet, int>::iterator iter = f_map.find(adj_facet);
if (iter != f_map.end()){
int adj_facet_pos = iter->second;
Orientation dir = orientations[adj_facet_pos];
minimun = dir< minimun ? dir : minimun;
}
} while (++circ != origin);
Michal Parusinski
--
Sylvain
- [cgal-discuss] CGAL circulator operator* runtime error - segmenation fault, mparusinski, 08/05/2010
- Re: [cgal-discuss] CGAL circulator operator* runtime error - segmenation fault, Sylvain Pion, 08/06/2010
- Re: [cgal-discuss] CGAL circulator operator* runtime error - segmenation fault, Michal Parusinski, 08/06/2010
- Re: [cgal-discuss] CGAL circulator operator* runtime error - segmenation fault, Sylvain Pion, 08/06/2010
Archive powered by MHonArc 2.6.16.