Subject: CGAL users discussion list
List archive
- From: Anders Johansson <>
- To:
- Subject: [cgal-discuss] Segmentation fault in minkowski_sum_2()
- Date: Thu, 24 Mar 2011 16:07:08 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=ReOFqvRJJTF8OKFEtkwz0U3WEVJp1tXCySYtQb6Hp7OEAhmoen/tGxbaAIsA3/vkiV RFCyiV9yyByLqbK0X26VNeDZ0DgsKDdepJ17GaMZxEeSAASV97dUlyQHZ0XaTX5oWRfC Acx/f2bheMNI9SONfL4CSdmxkjtzXhWBOxvz4=
Hi,
I get a segmentation fault when compiling and running the attached file main.cpp as follows:
> g++ -g -I$CGAL_PATH/include -fPIC -frounding-math -L$CGAL_PATH/lib -Wl,-rpath,$CGAL_PATH/lib -lCGAL -lmpfr -lgmp -lCGAL_Core -o bug main.cpp
> ./bug
Before call to minkowski_sum_2()
Segmentation fault
I run CGAL-3.8-beta1 on Ubuntu Lucid.
Thanks in advance!
Anders
/* > g++ -g -I$CGAL_PATH/include -fPIC -frounding-math -L$CGAL_PATH/lib -Wl,-rpath,$CGAL_PATH/lib -lCGAL -lmpfr -lgmp -lCGAL_Core -o bug main.cpp > ./bug Before call to minkowski_sum_2() Segmentation fault */ #include <iostream> #include <CGAL/Exact_predicates_exact_constructions_kernel.h> typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; #include <CGAL/Polygon_2.h> #include <CGAL/Polygon_with_holes_2.h> #include <CGAL/minkowski_sum_2.h> typedef CGAL::Polygon_2<Kernel> Polygon; typedef Kernel::Point_2 Point; typedef CGAL::Polygon_with_holes_2<Kernel> PolygonWithHoles; int main() { Polygon fixed; Polygon orbiting; PolygonWithHoles sum; fixed.push_back(Point(0.0, 0.0)); fixed.push_back(Point(50.0, 0.0)); fixed.push_back(Point(50.0, 50.0)); fixed.push_back(Point(125.0, 50.0)); fixed.push_back(Point(125.0, 0.0)); fixed.push_back(Point(175.0, 0.0)); fixed.push_back(Point(175.0, 175.0)); fixed.push_back(Point(125.0, 175.0)); fixed.push_back(Point(125.0, 125.0)); fixed.push_back(Point(0.0, 125.0)); orbiting.push_back(Point(175.0, -0.0)); orbiting.push_back(Point(175.0, 50.0)); orbiting.push_back(Point(125.0, 50.0)); orbiting.push_back(Point(125.0, 125.0)); orbiting.push_back(Point(175.0, 125.0)); orbiting.push_back(Point(175.0, 175.0)); orbiting.push_back(Point(-0.0, 175.0)); orbiting.push_back(Point(-0.0, 125.00000000000001)); orbiting.push_back(Point(50.000000000000014, 125.00000000000001)); orbiting.push_back(Point(50.0, 7.654042494670958E-15)); std::cout << "Before call to minkowski_sum_2()" << std::endl; sum = minkowski_sum_2(fixed, orbiting); std::cout << "After call to minkowski_sum_2()" << std::endl; return 0; }
- [cgal-discuss] Segmentation fault in minkowski_sum_2(), Anders Johansson, 03/24/2011
- Re: [cgal-discuss] Segmentation fault in minkowski_sum_2(), Joachim Reichel, 03/26/2011
- Re: [cgal-discuss] Segmentation fault in minkowski_sum_2(), Efraim Fogel, 03/27/2011
- Re: [cgal-discuss] Segmentation fault in minkowski_sum_2(), Joachim Reichel, 03/26/2011
Archive powered by MHonArc 2.6.16.