Subject: CGAL users discussion list
List archive
- From: Bernhard Kornberger <>
- To:
- Subject: Re: [cgal-discuss] Regular_triangulation_3 Bug, CGAL 3.3
- Date: Tue, 31 Jul 2007 19:45:57 +0200
Andreas Fabri schrieb:
I could do it myself, but I think it is your task.
OK, done: dist.ist.tugraz.at/test3.tar.bz2
This is the minimal example:
$cat minkowski.cpp
#include <iostream>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Filtered_kernel.h>
#include <CGAL/Regular_triangulation_euclidean_traits_3.h>
#include <CGAL/Regular_triangulation_filtered_traits_3.h>
#include <CGAL/Regular_triangulation_3.h>
using namespace std;
typedef CGAL::Exact_predicates_exact_constructions_kernel K;
typedef CGAL::Regular_triangulation_filtered_traits_3<K> RegtrTraits;
typedef CGAL::Regular_triangulation_3<RegtrTraits> Regular_triangulation;
typedef Regular_triangulation::Weighted_point Weighted_point;
typedef Regular_triangulation::Bare_point Point;
int main(int argc, char *argv[])
{
double l=-2396.4;
double u=2595.59;
//double l=1;
//double u=2;
Regular_triangulation regTr;
regTr.insert(Weighted_point(Point(l,l,l),1));
cout << "a"<<endl;
regTr.insert(Weighted_point(Point(l,l,u),1));
cout << "b"<<endl;
regTr.insert(Weighted_point(Point(l,u,l),1));
cout << "c"<<endl;
regTr.insert(Weighted_point(Point(l,u,u),1));
cout << "d"<<endl;
regTr.insert(Weighted_point(Point(u,l,l),1));
cout << "e"<<endl;
regTr.insert(Weighted_point(Point(u,l,u),1));
cout << "f"<<endl;
regTr.insert(Weighted_point(Point(u,u,l),1));
cout << "g"<<endl;
regTr.insert(Weighted_point(Point(u,u,u),1));
cout << "h"<<endl;
}
..here is the output without valgrind:
bernd@polar:~/test3
$ ./minkowski
a
b
c
d
e
f
g
h
..and here the output with valgrind:
bernd@polar:~/test3
$ valgrind ./minkowski
==15875== Memcheck, a memory error detector.
==15875== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==15875== Using LibVEX rev 1658, a library for dynamic binary translation.
==15875== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==15875== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation framework.
==15875== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==15875== For more details, rerun with: -v
==15875==
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
==15875==
==15875== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 97 from 1)
==15875== malloc/free: in use at exit: 584,171 bytes in 489 blocks.
==15875== malloc/free: 537 allocs, 48 frees, 586,505 bytes allocated.
==15875== For counts of detected errors, rerun with: -v
==15875== searching for pointers to 489 not-freed blocks.
==15875== checked 1,638,696 bytes.
==15875==
==15875== LEAK SUMMARY:
==15875== definitely lost: 0 bytes in 0 blocks.
==15875== possibly lost: 150 bytes in 4 blocks.
==15875== still reachable: 584,021 bytes in 485 blocks.
==15875== suppressed: 0 bytes in 0 blocks.
==15875== Reachable blocks (those to which a pointer was found) are not shown.
==15875== To see them, rerun with: --show-reachable=yes
Aborted
It seems that the points are the points of a cube. Do you observe the
same with simpler values than
double l=-2396.4;
double u=2595.59;
It works with simpler values like l=1 and u=2 but not with the values
above.
Some version numbers:
valgrind-3.2.1-Debian
g++ (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
CGAL 3.3
CXXFLAGS=
-pg \
-I../../include \
$(CGAL_CXXFLAGS) \
$(LONG_NAME_PROBLEM_CXXFLAGS) \
-O3
Best
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.