Subject: CGAL users discussion list
List archive
- From: Andreas Fabri <>
- To:
- Subject: Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3
- Date: Tue, 31 Jul 2007 16:26:53 +0200
Bernhard Kornberger wrote:
schrieb:
I had a quicklook at your files and they are not easy to read...
could you better isolate the problem?
In your first test, it seems that the program crashes only AFTER the triangulation is built ("Starting Postprocessing..."), right?
best
Monique
Thank you for the answer. I had a closer look at the problem and it
seems that what I have reported are actually two different problems.
The first problem:
Hello Bernhard,
You haven't computed the plane equation. See:
http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Polyhedron/Chapter_main.html#Subsection_12.3.4
andreas
The second problem:
===================
The second problem occurs only when the software runs in the valgrind
debugger. It is indeed related to Regular_Triangulation_3. I have
simplified the code I gave you last time:
The main routine calls the Triangulator's constructor:
CopyPaste:
###########################################################
int main(int argc, char *argv[])
{
Triangulator* powerDiagram=new Triangulator();
return 0;
}
###########################################################
This is the constructor:
CopyPaste:
###########################################################
Triangulator::Triangulator()
{
cout << "Triangulator: inserting 8 bounding spheres"<<endl;
double l=-2396.4;
double u=2595.59;
vBoundingVertices.insert(regTr.insert(Weighted_point(Point(l,l,l,1))));
cout << "a"<<endl;
vBoundingVertices.insert(regTr.insert(Weighted_point(Point(l,l,u,1))));
cout << "b"<<endl;
vBoundingVertices.insert(regTr.insert(Weighted_point(Point(l,u,l,1))));
cout << "c"<<endl;
vBoundingVertices.insert(regTr.insert(Weighted_point(Point(l,u,u,1))));
cout << "d"<<endl;
vBoundingVertices.insert(regTr.insert(Weighted_point(Point(u,l,l,1))));
cout << "e"<<endl;
vBoundingVertices.insert(regTr.insert(Weighted_point(Point(u,l,u,1))));
cout << "f"<<endl;
vBoundingVertices.insert(regTr.insert(Weighted_point(Point(u,u,l,1))));
cout << "g"<<endl;
vBoundingVertices.insert(regTr.insert(Weighted_point(Point(u,u,u,1))));
cout << "h"<<endl;
}
###########################################################
Here is the output if NO debugger is used:
CopyPaste:
###########################################################
./minkowski
/usr/bin/g++ -o minkowski minkowski.o Triangulator.o UnionOfSpheres.o VisualizerGV.o -lm -ldl -pg '-L/opt/CGAL330/lib' -L/usr/lib/qt3 -Wl,-R/opt/CGAL330/lib/i686_Linux-2.6_g++-4.1.2:/usr/lib/qt3 -lCGAL -lCGALcore++ -lCGALQt -lCGALimageIO -lCGALPDB -lqt-mt -lGL -lGLU -lz -lmpfr -lgmpxx -lgmp -lX11 -lboost_program_options -lm
Triangulator: inserting 8 bounding spheres
a
b
c
d
e
f
g
h
###########################################################
..everything is okay. But if a debugger is used:
CopyPaste:
###########################################################
valgrind ./minkowski
/usr/bin/g++ -o minkowski minkowski.o Triangulator.o UnionOfSpheres.o VisualizerGV.o -lm -ldl -pg '-L/opt/CGAL330/lib' -L/usr/lib/qt3 -Wl,-R/opt/CGAL330/lib/i686_Linux-2.6_g++-4.1.2:/usr/lib/qt3 -lCGAL -lCGALcore++ -lCGALQt -lCGALimageIO -lCGALPDB -lqt-mt -lGL -lGLU -lz -lmpfr -lgmpxx -lgmp -lX11 -lboost_program_options -lm
==9568== Memcheck, a memory error detector.
==9568== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==9568== Using LibVEX rev 1658, a library for dynamic binary translation.
==9568== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==9568== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation framework.
==9568== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==9568== For more details, rerun with: -v
==9568==
Triangulator: inserting 8 bounding spheres
a
b
c
d
e
f
CGAL error: precondition violation!
Expr: orientation(p0, p1, p2, p3) == POSITIVE
File: /opt/CGAL330/include/CGAL/Regular_triangulation_3.h
Line: 890
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
==9568==
==9568== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 97 from 1)
==9568== malloc/free: in use at exit: 1,125,702 bytes in 531 blocks.
==9568== malloc/free: 578 allocs, 47 frees, 1,128,077 bytes allocated.
==9568== For counts of detected errors, rerun with: -v
==9568== searching for pointers to 531 not-freed blocks.
==9568== checked 2,180,184 bytes.
==9568==
==9568== LEAK SUMMARY:
==9568== definitely lost: 0 bytes in 0 blocks.
==9568== possibly lost: 149 bytes in 4 blocks.
==9568== still reachable: 1,125,553 bytes in 527 blocks.
==9568== suppressed: 0 bytes in 0 blocks.
==9568== Reachable blocks (those to which a pointer was found) are not shown.
==9568== To see them, rerun with: --show-reachable=yes
Aborted (core dumped)
###########################################################
You can download this simplified example here:
http://dist.ist.tugraz.at/test2.tar.bz2
Best regards
Bernhard
- Regular_triangulation_3 Bug, CGAL 3.3, Bernhard Kornberger, 07/30/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Monique . Teillaud, 07/30/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Bernhard Kornberger, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Andreas Fabri, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Bernhard Kornberger, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Monique . Teillaud, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Andreas Fabri, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Bernhard Kornberger, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Camille Wormser, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Andreas Fabri, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Camille Wormser, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Andreas Fabri, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Bernhard Kornberger, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Andreas Fabri, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Bernhard Kornberger, 07/31/2007
- Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3, Monique . Teillaud, 07/30/2007
Archive powered by MHonArc 2.6.16.