{"action":"created","issue":{"url":"https://api.github.com/repos/CGAL/cgal/issues/107","labels_url":"https://api.github.com/repos/CGAL/cgal/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/CGAL/cgal/issues/107/comments","events_url":"https://api.github.com/repos/CGAL/cgal/issues/107/events","html_url":"https://github.com/CGAL/cgal/issues/107","id":84827185,"number":107,"title":"assertion firing due to degenerate triangles","user":{"login":"jamesd-twice","id":7432207,"avatar_url":"https://avatars.githubusercontent.com/u/7432207?v=3","gravatar_id":"","url":"https://api.github.com/users/jamesd-twice","html_url":"https://github.com/jamesd-twice","followers_url":"https://api.github.com/users/jamesd-twice/followers","following_url":"https://api.github.com/users/jamesd-twice/following{/other_user}","gists_url":"https://api.github.com/users/jamesd-twice/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesd-twice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesd-twice/subscriptions","organizations_url":"https://api.github.com/users/jamesd-twice/orgs","repos_url":"https://api.github.com/users/jamesd-twice/repos","events_url":"https://api.github.com/users/jamesd-twice/events{/privacy}","received_events_url":"https://api.github.com/users/jamesd-twice/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CGAL/cgal/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/CGAL/cgal/labels/doc","name":"doc","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-04T00:01:48Z","updated_at":"2015-06-17T17:27:08Z","closed_at":null,"body":"Ran into the following while running all_intersections() on an AABB tree with an arbitrary Segment, repeatably: \r\n\r\n    CGAL error: assertion violation!\r\n    Expression :\r\n    File       : /opt/local/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h\r\n    Line       : 389\r\n    Explanation:\r\n    Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html\r\n    libc++abi.dylib: terminating with uncaught exception of type CGAL::Assertion_exception: CGAL ERROR: assertion violation!\r\n    File: /opt/local/include/CGAL/internal/Intersections_3/Triangle_3_Segment_3_intersection.h\r\n    Line: 389\r\n    Abort trap: 6  \r\n\r\nThe tree was loaded with Triangles from the well known Stanford Dragon PLY, read in via lib assimp.\r\n\r\n The following typedefs were in place:\r\n\r\n    typedef CGAL::Simple_cartesian<CGAL::Gmpq> K;\r\n\r\n    typedef K::Point_3 Point;\r\n    typedef K::Ray_3 Ray;\r\n    typedef K::Plane_3 Plane;\r\n    typedef K::Vector_3 Vector;\r\n    typedef K::Segment_3 Segment;\r\n    typedef K::Triangle_3 Triangle;\r\n\r\n    typedef std::list<Triangle>::iterator Iterator;\r\n    typedef CGAL::AABB_triangle_primitive<K, Iterator> Primitive;\r\n    typedef CGAL::AABB_traits<K, Primitive> AABB_triangle_traits;\r\n    typedef CGAL::AABB_tree<AABB_triangle_traits> Tree;\r\n\r\n    typedef boost::optional< Tree::Intersection_and_primitive_id<Segment>::Type > Segment_intersection;\r\n\r\nAfter much head scratching I thought to add a check for is_degenerate on the Triangle's I was passing into the tree; there were some and removing these appears to have stopped this assert from firing.\r\n\r\nIf that's actually what was the issue, flagging because `assert` style handling should not be used as a replacement for guarding user input error / proper Error Handling (http://stackoverflow.com/questions/1854302/is-assert-evil).\r\n\r\nAlso reporting in to hit Google cache so somebody else in the future has something to find, even if you decide this was programmer error."},"comment":{"url":"https://api.github.com/repos/CGAL/cgal/issues/comments/112884214","html_url":"https://github.com/CGAL/cgal/issues/107#issuecomment-112884214","issue_url":"https://api.github.com/repos/CGAL/cgal/issues/107","id":112884214,"user":{"login":"lrineau","id":5746675,"avatar_url":"https://avatars.githubusercontent.com/u/5746675?v=3","gravatar_id":"","url":"https://api.github.com/users/lrineau","html_url":"https://github.com/lrineau","followers_url":"https://api.github.com/users/lrineau/followers","following_url":"https://api.github.com/users/lrineau/following{/other_user}","gists_url":"https://api.github.com/users/lrineau/gists{/gist_id}","starred_url":"https://api.github.com/users/lrineau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrineau/subscriptions","organizations_url":"https://api.github.com/users/lrineau/orgs","repos_url":"https://api.github.com/users/lrineau/repos","events_url":"https://api.github.com/users/lrineau/events{/privacy}","received_events_url":"https://api.github.com/users/lrineau/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T17:27:08Z","updated_at":"2015-06-17T17:27:08Z","body":"@jamesd-twice , do you still have the strange behavior of CGAL?\r\n"}}