Subject: CGAL users discussion list
List archive
- From: Michal Parusinski <>
- To:
- Subject: Re: [cgal-discuss] CGAL circulator operator* runtime error - segmenation fault
- Date: Fri, 6 Aug 2010 14:18:22 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=sexrg5GFa1chDRbCu2qntGy0G+VgY8jh9Jvlo6+NaVTxBlnRuhRidTF//ucS09lWVU xCfRGDqCnJ8rPP5LZr34IAavSezh22vR84+9nF9qC8gw9tCRVc1EtrDVZ3Dvc3sdaWCp K8AwAinSUxNs40e46NtCGxRhsJarNadBKfAfo=
No it doesn't work regardless of using valgrind or not!
But thanks anyway. I found another to solve my problem and it doesn't require the circulators anymore.
On 6 August 2010 14:04, Sylvain Pion <> wrote:
Le 05/08/10 13:30, mparusinski a écrit :Do you see this problem when running under valgrind ?
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
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.Sylvain
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
--
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- [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.