Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Re: Crash with Nef_polyhedron_3

Subject: CGAL users discussion list

List archive

[cgal-discuss] Re: Crash with Nef_polyhedron_3


Chronological Thread 
  • From: kintel <(005b7a4cd6%hidden_head%005b7a4cd6)marius(005b7a4cd6%hidden_at%005b7a4cd6)kintel.net(005b7a4cd6%hidden_end%005b7a4cd6)>
  • To: (005b7a4cd6%hidden_head%005b7a4cd6)cgal-discuss(005b7a4cd6%hidden_at%005b7a4cd6)lists-sop.inria.fr(005b7a4cd6%hidden_end%005b7a4cd6)
  • Subject: [cgal-discuss] Re: Crash with Nef_polyhedron_3
  • Date: Mon, 28 May 2012 16:08:12 -0700 (PDT)

I'm the maintainer of OpenSCAD (http://openscad.org), which uses CGAL.
I'm having the exact same problems and I've done some semi-structured
testing and reduced it down to the following:

1) The test program used is CGAL's examples/Nef_3/set_operations.cpp
2) It always works if the client program is compiled _without_ optimization
3) Crash configurations with -O2:
o Mac OS X 10.6, llvm-gcc-4.2.1
o Mac OS X 10.7, llvm-gcc-4.2.1
4) Working configurations with -O2:
o Mac OS X 10.6, gcc-4.2.1
o Every other configuration I've seen
5) clang is not tested since mpfr fails to build on my clang


A simple way to test this on Mac OS X 10.7:
$ port install cgal
<download set_operations.cpp>
$ g++ -O2 set_operations.cpp -o set_operations -I/opt/local/include
-L/opt/local/lib -lCGAL -lgmp -lmpfr
$ ./set_operations

(but it also crashes with a manually built CGAL)

Any ideas?

-Marius

==========

Typical stack trace:

#0 0x0000000100072503 in
std::__final_insertion_sort<__gnu_cxx::__normal_iterator<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > >*,
std::vector<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > >,
std::allocator<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > > > > >,
CGAL::Box_intersection_d::Predicate_traits_d<CGAL::Box_intersection_d::Box_traits_d&lt;CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > > >, true>::Compare> ()
#1 0x000000010007e442 in
CGAL::Box_intersection_d::modified_two_way_scan<__gnu_cxx::__normal_iterator<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > >*,
std::vector<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > >,
std::allocator<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > > > > >,
__gnu_cxx::__normal_iterator<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > >*,
std::vector<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > >,
std::allocator<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > > > > >,
CGAL::binop_intersection_test_segment_tree<CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> >
>::Bop_edge0_edge1_callback<CGAL::Binary_operation&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool>
>::Intersection_call_back<CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> >,
CGAL::Nef_polyhedron_3<CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool>::OR, CGAL::ID_support_handler<CGAL::SNC_items,
CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > > > >,
CGAL::Box_intersection_d::Predicate_traits_d<CGAL::Box_intersection_d::Box_traits_d&lt;CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > > >, true> > ()
#2 0x00000001000b740b in
CGAL::Box_intersection_d::segment_tree<__gnu_cxx::__normal_iterator<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > >*,
std::vector<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > >,
std::allocator<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > > > > >,
__gnu_cxx::__normal_iterator<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > >*,
std::vector<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > >,
std::allocator<CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > > > > >,
CGAL::binop_intersection_test_segment_tree<CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> >
>::Bop_edge0_edge1_callback<CGAL::Binary_operation&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool>
>::Intersection_call_back<CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> >,
CGAL::Nef_polyhedron_3<CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool>::OR, CGAL::ID_support_handler<CGAL::SNC_items,
CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > > > >, double,
CGAL::Box_intersection_d::Predicate_traits_d<CGAL::Box_intersection_d::Box_traits_d&lt;CGAL::Nef_box&lt;CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > > >, true> > ()
#3 0x00000001000bddcd in
CGAL::binop_intersection_test_segment_tree<CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> >
>::operator()<CGAL::Binary_operation&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool>
>::Intersection_call_back<CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> >,
CGAL::Nef_polyhedron_3<CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool>::OR, CGAL::ID_support_handler<CGAL::SNC_items,
CGAL::SNC_decorator&lt;CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool> > > > > ()
#4 0x00000001000beec7 in
CGAL::Binary_operation<CGAL::SNC_structure&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool>
>::operator()<CGAL::Nef_polyhedron_3&lt;CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool>::OR> ()
#5 0x00000001000bf2b3 in
CGAL::Nef_polyhedron_3<CGAL::Extended_homogeneous&lt;CGAL::Gmpz>,
CGAL::SNC_items, bool>::join ()
#6 0x0000000100004750 in main ()


--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Crash-with-Nef-polyhedron-3-tp4655099p4655103.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page