Subject: CGAL users discussion list
List archive
- From: mangledorf <>
- To:
- Subject: [cgal-discuss] Epick intersection of 2 triangles crashing inside boost
- Date: Tue, 10 Feb 2015 15:01:39 -0800 (PST)
#define CGAL_INTERSECTION_VERSION 2
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
int main(int argc, char * argv[])
{
using namespace std;
typedef CGAL::Epick Kernel;
typedef CGAL::Point_3<Kernel> Point_3;
typedef CGAL::Triangle_3<Kernel> Triangle_3;
Triangle_3 A(
Point_3(0.34150699999999978,0.091506999999999811,2.5),
Point_3(0.56070299999999995,0.31070300000000001,2.7191960000000002),
Point_3(0.30823651205236469,0.058236512052364714,2.5));
Triangle_3 B(
Point_3(0.34150699999999978,0.091506999999999811,2.5),
Point_3(0.30823651205236469,0.058236512052364714,2.5),
Point_3(0.29923699999999998,0.049237000000000003,2.4577300000000002));
auto res = CGAL::intersection(A,B);
}
with CGAL_INTERSECTION_VERSION 2 the runtime error is
* thread #1: tid = 0x40ba73, 0x00007fff978aa286
libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread',
stop reason = signal SIGABRT
* frame #0: 0x00007fff978aa286 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x00007fff9aabc42f libsystem_pthread.dylib`pthread_kill + 90
frame #2: 0x00007fff977e5b53 libsystem_c.dylib`abort + 129
frame #3: 0x00007fff977adc39 libsystem_c.dylib`__assert_rtn + 321
frame #4: 0x000000010000d252
.main`_ZNK5boost8optionalINS_7variantIN4CGAL7Point_3INS2_5EpickEEEINS2_6Line_3IS4_EEEEEE3getEv(this=0x00007fff5fbfea40)
+ 66 at optional.hpp:991
frame #5: 0x000000010000a45c
.main`_ZNK5boost8optionalINS_7variantIN4CGAL7Point_3INS2_5EpickEEEINS2_6Line_3IS4_EEEEEEdeEv(this=0x00007fff5fbfea40)
+ 24 at optional.hpp:1012
frame #6: 0x0000000100007bb4
.main`_ZN4CGAL8internal13intersect_getINS_7Point_3INS_5EpickEEES4_INS_6Line_3IS3_EEEEEPKT_RKN5boost8optionalINSA_7variantIT0_IDpT1_EEEEE(v=0x00007fff5fbfea40)
+ 24 at Intersection_traits.h:196
frame #7: 0x0000000100005aff .main`void
CGAL::internal::intersection_coplanar_triangles_cutoff<CGAL::Epick>(p=0x00007fff5fbfec10,
q=0x00007fff5fbfebf0, r=0x00007fff5fbfef50, k=0x00007fff5fbfeeef,
inter_pts=0x00007fff5fbfebe0) + 715 at
Triangle_3_Triangle_3_intersection.h:73
frame #8: 0x000000010000460e .main`CGAL::Intersection_traits<CGAL::Epick,
CGAL::Epick::Triangle_3, CGAL::Epick::Triangle_3>::result_type
CGAL::internal::intersection_coplanar_triangles<CGAL::Epick>(t1=0x00007fff5fbfef50,
t2=0x00007fff5fbfefa0, k=0x00007fff5fbfeeef) + 396 at
Triangle_3_Triangle_3_intersection.h:109
frame #9: 0x000000010000359c .main`CGAL::Intersection_traits<CGAL::Epick,
CGAL::Epick::Triangle_3, CGAL::Epick::Triangle_3>::result_type
CGAL::internal::intersection<CGAL::Epick>(t1=0x00007fff5fbfef50,
t2=0x00007fff5fbfefa0, k=0x00007fff5fbfeeef) + 214 at
Triangle_3_Triangle_3_intersection.h:190
frame #10: 0x00000001000033ba
.main`CGAL::cpp11::result_of<CGAL::CommonKernelFunctors::Intersect_3<CGAL::Epick>
(this=0x00007fff5fbfef2e, t1=0x00007fff5fbfef50,
t2=0x00007fff5fbfefa0)>::type
CGAL::CommonKernelFunctors::Intersect_3<CGAL::Epick>::operator()<CGAL::Triangle_3<CGAL::Epick>,
CGAL::Triangle_3<CGAL::Epick> >(CGAL::Triangle_3<CGAL::Epick> const&,
CGAL::Triangle_3<CGAL::Epick> const&) const + 48 at function_objects.h:2577
frame #11: 0x000000010000303b
.main`CGAL::cpp11::result_of<CGAL::Epick::Intersect_3 (a=0x00007fff5fbfef50,
b=0x00007fff5fbfefa0)>::type
CGAL::intersection<CGAL::Epick>(CGAL::Triangle_3<CGAL::Epick> const&,
CGAL::Triangle_3<CGAL::Epick> const&) + 56 at
Triangle_3_Triangle_3_intersection.h:230
frame #12: 0x0000000100001a28 .main`main(argc=1, argv=0x00007fff5fbff198) +
584 at bug.cpp.cpp:61
frame #13: 0x00007fff90a335c9 libdyld.dylib`start + 1
frame #14: 0x00007fff90a335c9 libdyld.dylib`start + 1
and with CGAL_INTERSECTION_VERSION 1 the runtime error is
* thread #1: tid = 0x40c055, 0x000000010000f773
.main`_ZNSt10_List_nodeIN4CGAL7Point_3INS0_5EpickEEEEC1IIRKS3_EEEDpOT_(this=0x0000000105b6dda0,
(null)=0x0000000000000000) + 55 at stl_list.h:115, queue =
'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
* frame #0: 0x000000010000f773
.main`_ZNSt10_List_nodeIN4CGAL7Point_3INS0_5EpickEEEEC1IIRKS3_EEEDpOT_(this=0x0000000105b6dda0,
(null)=0x0000000000000000) + 55 at stl_list.h:115
frame #1: 0x000000010000c9bf
.main`_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIN4CGAL7Point_3INS2_5EpickEEEEE9constructIS6_IRKS5_EEEvPT_DpOT0_(this=0x00007fff5fbfec40,
__p=0x0000000105b6dda0, (null)=0x0000000000000000) + 69 at
new_allocator.h:110
frame #2: 0x000000010000a096
.main`_ZNSt4listIN4CGAL7Point_3INS0_5EpickEEESaIS3_EE14_M_create_nodeIIRKS3_EEEPSt10_List_nodeIS3_EDpOT_(this=0x00007fff5fbfec40,
(null)=0x0000000000000000) + 78 at stl_list.h:503
frame #3: 0x0000000100008305 .main`std::list<CGAL::Point_3<CGAL::Epick>,
std::allocator<CGAL::Point_3<CGAL::Epick> >
>::insert(this=0x00007fff5fbfec40, __position=list<Point_3<Epick>,
allocator<Point_3<Epick> > >::iterator at 0x00007fff5fbfea40,
__x=0x0000000000000000) + 39 at list.tcc:102
frame #4: 0x0000000100005f02 .main`void
CGAL::internal::intersection_coplanar_triangles_cutoff<CGAL::Epick>(p=0x00007fff5fbfec70,
q=0x00007fff5fbfec50, r=0x00007fff5fbfefa0, k=0x00007fff5fbfef3f,
inter_pts=0x00007fff5fbfec40) + 748 at
Triangle_3_Triangle_3_intersection.h:75
frame #5: 0x0000000100004944 .main`CGAL::Intersection_traits<CGAL::Epick,
CGAL::Epick::Triangle_3, CGAL::Epick::Triangle_3>::result_type
CGAL::internal::intersection_coplanar_triangles<CGAL::Epick>(t1=0x00007fff5fbfefa0,
t2=0x00007fff5fbfeff0, k=0x00007fff5fbfef3f) + 396 at
Triangle_3_Triangle_3_intersection.h:109
frame #6: 0x00000001000037c8 .main`CGAL::Intersection_traits<CGAL::Epick,
CGAL::Epick::Triangle_3, CGAL::Epick::Triangle_3>::result_type
CGAL::internal::intersection<CGAL::Epick>(t1=0x00007fff5fbfefa0,
t2=0x00007fff5fbfeff0, k=0x00007fff5fbfef3f) + 278 at
Triangle_3_Triangle_3_intersection.h:190
frame #7: 0x00000001000035c0
.main`CGAL::cpp11::result_of<CGAL::CommonKernelFunctors::Intersect_3<CGAL::Epick>
(this=0x00007fff5fbfef7e, t1=0x00007fff5fbfefa0,
t2=0x00007fff5fbfeff0)>::type
CGAL::CommonKernelFunctors::Intersect_3<CGAL::Epick>::operator()<CGAL::Triangle_3<CGAL::Epick>,
CGAL::Triangle_3<CGAL::Epick> >(CGAL::Triangle_3<CGAL::Epick> const&,
CGAL::Triangle_3<CGAL::Epick> const&) const + 48 at function_objects.h:2577
frame #8: 0x0000000100003265
.main`CGAL::cpp11::result_of<CGAL::Epick::Intersect_3 (a=0x00007fff5fbfefa0,
b=0x00007fff5fbfeff0)>::type
CGAL::intersection<CGAL::Epick>(CGAL::Triangle_3<CGAL::Epick> const&,
CGAL::Triangle_3<CGAL::Epick> const&) + 56 at
Triangle_3_Triangle_3_intersection.h:230
frame #9: 0x00000001000017e8 .main`main(argc=1, argv=0x00007fff5fbff198) +
584 at bug.cpp.cpp:61
frame #10: 0x00007fff90a335c9 libdyld.dylib`start + 1
frame #11: 0x00007fff90a335c9 libdyld.dylib`start + 1
Switching to Epeck or Simple_cartesian<double> avoids the crash.
I'm using CGAL version
#define CGAL_VERSION 4.5
#define CGAL_VERSION_NR 1040501000
#define CGAL_SVN_REVISION 99999
Installed via macports on a Mac OS X machine with Intel processor. The crash
appears regardless of using gcc 4.7 or clang 6.0.
Interestingly the crash goes away if you swap A and B and call auto res =
CGAL::intersection(B,A);
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Epick-intersection-of-2-triangles-crashing-inside-boost-tp4660428.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Epick intersection of 2 triangles crashing inside boost, mangledorf, 02/11/2015
- Re: [cgal-discuss] Epick intersection of 2 triangles crashing inside boost, mangledorf, 02/11/2015
Archive powered by MHonArc 2.6.18.