Subject: CGAL users discussion list
List archive
- From: mparusinski <>
- To:
- Subject: [cgal-discuss] CGAL circulator operator* runtime error - segmenation fault
- Date: Thu, 5 Aug 2010 04:30:57 -0700 (PDT)
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
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
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/CGAL-circulator-operator-runtime-error-segmenation-fault-tp2314733p2314733.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [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.