Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3
Chronological Thread
- From: Giles Bathgate <>
- To:
- Subject: Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3
- Date: Wed, 18 Feb 2015 08:43:13 +0000
While I agree that the root cause of the problem should be
investigated and fixed, I still think that the symptom of throwing an
exception from a destructor is undesirable as it causes the program to
crash. The exception cannot be caught becuase of the reason discussed
here:
http://www.kolpackov.net/projects/c++/eh/dtor-1.xhtml
My solution to the problem is to redefine CGAL_assertion using the
following hack:
https://github.com/GilesBathgate/RapCAD/blob/master/src/cgalassert.h
I would much rather see CGAL implement a CGAL_destructor_assertion
macro and use this explicitly for this purpose.
Regards,
Giles
On 18 February 2015 at 07:34, Sebastien Loriot (GeometryFactory)
<>
wrote:
> On 02/17/2015 10:40 PM, kintel wrote:
>>
>> Bump.
>>
>> The issue is that CGAL throws exceptions from destructors. These
>> exceptions
>> are not catchable and causes programs to terminate. Read e.g.
>> http://www.kolpackov.net/projects/c++/eh/dtor-1.xhtml
>>
>> See e.g. ~Polyhedron_incremental_builder_3()
>>
>> We work around this by forking parts of CGAL into our own sources and
>> patch
>> it to submission, which is far from ideal.
>>
>> -Marius
>>
>
> Your input is self-intersecting which is why you have this error.
> If you import the model using OFF_to_nef_3 and then try to export
> to polyhedron, you'll get the following assertion:
>
> terminate called after throwing an instance of
> 'CGAL::Precondition_exception'
> what(): CGAL ERROR: precondition violation!
> Expr: is_simple()
> File: /home/sloriot/CGAL/git/cgal/Nef_3/include/CGAL/Nef_polyhedron_3.h
> Line: 1041
> Aborted
>
> because of the self-intersection that was fixed during the import to Nef_3.
>
> Is it an option to test for self-intersections before trying to do this?
>
> (using CGAL::self_intersect(P) from
> include/CGAL/Self_intersection_polyhedron_3.h for example)
>
> Sebastien.
>
>
>
>>
>>
>> --
>> View this message in context:
>> http://cgal-discuss.949826.n4.nabble.com/Uncatchable-exception-converting-from-Nef-polyhedron-to-Polyhedron-3-tp4658603p4660455.html
>> Sent from the cgal-discuss mailing list archive at Nabble.com.
>>
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
>
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, kintel, 02/17/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Sebastien Loriot (GeometryFactory), 02/18/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Giles Bathgate, 02/18/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Sebastien Loriot (GeometryFactory), 02/19/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Marius Kintel, 02/20/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Sebastien Loriot (GeometryFactory), 02/20/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Marius Kintel, 02/20/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Giles Bathgate, 02/20/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Sebastien Loriot (GeometryFactory), 02/23/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Giles Bathgate, 02/23/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Marius Kintel, 02/20/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Sebastien Loriot (GeometryFactory), 02/20/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Marius Kintel, 02/20/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Sebastien Loriot (GeometryFactory), 02/19/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Giles Bathgate, 02/18/2015
- Re: [cgal-discuss] Uncatchable exception converting from Nef polyhedron to Polyhedron_3, Sebastien Loriot (GeometryFactory), 02/18/2015
Archive powered by MHonArc 2.6.18.