Subject: CGAL users discussion list
List archive
- From: Joachim Reichel <>
- To:
- Subject: Re: [cgal-discuss] Segmentation fault in minkowski_sum_2()
- Date: Sat, 26 Mar 2011 14:09:45 +0100
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.
I can confirm the crash (CGAL 3.7, Debian squeeze). Stack trace is attached.
Joachim
Program received signal SIGSEGV, Segmentation fault.
0x0000000000000071 in ?? ()
(gdb) #0 0x0000000000000071 in ?? ()
#1 0x0000000000405038 in CGAL::Handle::~Handle (this=0x6ffa58,
__in_chrg=<value optimized out>) at /usr/include/CGAL/Handle.h:62
#2 0x000000000040c556 in
CGAL::Lazy<CGAL::Line_2<CGAL::Simple_cartesian<CGAL::Interval_nt<false> > >,
CGAL::Line_2<CGAL::Simple_cartesian<CGAL::Gmpq> >, CGAL::Gmpq,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > >::~Lazy
(this=0x6ffa58, __in_chrg=<value optimized out>) at
/usr/include/CGAL/Lazy.h:1095
#3 0x000000000040c58a in
CGAL::Line_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > >::~Line_2
(this=0x6ffa58, __in_chrg=<value optimized out>) at
/usr/include/CGAL/Line_2.h:36
#4 0x0000000000462c6a in
CGAL::Lazy_rep_1<CGAL::CommonKernelFunctors::Construct_opposite_line_2<CGAL::Simple_cartesian<CGAL::Interval_nt<false>
> >,
CGAL::CommonKernelFunctors::Construct_opposite_line_2<CGAL::Simple_cartesian<CGAL::Gmpq>
>, CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > >,
CGAL::Line_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > >
>::~Lazy_rep_1 (this=0x6ffa10, __in_chrg=<value optimized out>) at
/usr/include/CGAL/Lazy.h:314
#5 0x0000000000405038 in CGAL::Handle::~Handle (this=0x7fffffffd760,
__in_chrg=<value optimized out>) at /usr/include/CGAL/Handle.h:62
#6 0x000000000040c556 in
CGAL::Lazy<CGAL::Line_2<CGAL::Simple_cartesian<CGAL::Interval_nt<false> > >,
CGAL::Line_2<CGAL::Simple_cartesian<CGAL::Gmpq> >, CGAL::Gmpq,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > >::~Lazy
(this=0x7fffffffd760, __in_chrg=<value optimized out>) at
/usr/include/CGAL/Lazy.h:1095
#7 0x000000000040c58a in
CGAL::Line_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > >::~Line_2
(this=0x7fffffffd760, __in_chrg=<value optimized out>) at
/usr/include/CGAL/Line_2.h:36
#8 0x000000000040d746 in
CGAL::Minkowski_sum_by_convolution_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > >,
std::vector<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > >,
std::allocator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > > > >
>::_convolution_cycle (this=0x7fffffffdc90, cycle_id=3, n1=10, forward1=true,
dirs1=std::vector of length 10, capacity 10 = {...}, curr1=..., k1=3, n2=10,
forward2=true, dirs2=std::vector of length 10, capacity 10 = {...},
curr2=..., k2=8, used_labels=std::set with 60 elements = {...}, queue=empty
std::list, cycle=std::list = {...}) at
/usr/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h:624
#9 0x0000000000409672 in
CGAL::Minkowski_sum_by_convolution_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > >,
std::vector<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > >,
std::allocator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > > > >
>::operator()<std::back_insert_iterator<std::list<CGAL::Polygon_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > >,
std::vector<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > >,
std::allocator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > > > > >,
std::allocator<CGAL::Polygon_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > >,
std::vector<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > >,
std::allocator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > > > > > > > > >
(this=0x7fffffffdc90, pgn1=..., pgn2=..., sum_bound=..., sum_holes=...) at
/usr/include/CGAL/Minkowski_sum_2/Minkowski_sum_conv_2.h:308
#10 0x0000000000407478 in
CGAL::minkowski_sum_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > >,
std::vector<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > >,
std::allocator<CGAL::Point_2<CGAL::Lazy_kernel<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::Cartesian_converter<CGAL::Simple_cartesian<CGAL::Gmpq>,
CGAL::Simple_cartesian<CGAL::Interval_nt<false> >,
CGAL::NT_converter<CGAL::Gmpq, CGAL::Interval_nt<false> > > > > > > >
(pgn1=..., pgn2=...) at /usr/include/CGAL/minkowski_sum_2.h:52
#11 0x0000000000403b8a in main () at main.cpp:54
- [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.