Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Combinatorial Maps: Getting runtime assertation errors while using marks

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Combinatorial Maps: Getting runtime assertation errors while using marks


Chronological Thread 
  • From: Guillaume Damiand <>
  • To:
  • Subject: Re: [cgal-discuss] Combinatorial Maps: Getting runtime assertation errors while using marks
  • Date: Wed, 25 Feb 2015 12:29:02 +0100

Hi,


Le 25/02/2015 11:22, Pranav a écrit :
Hi,

I am assigning a mark to some darts while iterating over all 2-cells in a
CMap. But I am getting following assertation violation error at runtime:

terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: (is_whole_orbit_unmarked<Map, CMap_non_basic_iterator&lt;Map,Iterator>
(amap, adart, amark))
File: /usr/local/include/CGAL/Combinatorial_map_basic_operations.h
Line: 111
Aborted (core dumped)

I would like to know the possible reason(s) behind this. Here is the code
<https://gist.github.com/pranavkantgaur/272e7c6b10b5108453f2#file-plytolcc-cpp>
. Marks have been used only in /generateLCC()/ function(refer code from
line: 121)

I cannot compile your code due to the #include "../rply/rply.h"
You need to search the line in your code causing the assertion using a debugger.



The problem is that you modify the map (sew<2>) inside a loop which uses a mark. Due to this modification, there is a cell which is not correctly marked.

The rule is to not modify a map inside a loop based on cmap iterators. You need to store in a data structure (eg std::vector) the pair of darts to sew, then iterate through this ds to modify the map.

Guillaume







--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Combinatorial-Maps-Getting-runtime-assertation-errors-while-using-marks-tp4660525.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



--
===================================================================
Guillaume DAMIAND

CNRS - LIRIS UMR 5205
Université Claude Bernard
Bâtiment Nautibus (710)
43 Boulevard du 11 Novembre 1918
69622 Villeurbanne Cedex (France)
-------------------------------------------------------------------
Tél: +33 (0)4.72.43.14.34 Fax: +33 (0)4.72.43.15.36
Mail:

Web: http://liris.cnrs.fr/guillaume.damiand/
===================================================================


Attachment: smime.p7s
Description: Signature cryptographique S/MIME




Archive powered by MHonArc 2.6.18.

Top of Page