I am getting following assertion error related with Combinatorial maps while iterating over all 2-cells of a 3-cell using One_dart_per_incident_cell_range<2, 3>:
terminate called after throwing an instance of 'CGAL::Assertion_exception'
what(): CGAL ERROR: assertion violation!
Expr: this->mmap->is_marked((*this), mmark_number)
Aborted (core dumped)
Using gdb I figured out that this assertion is coming from here in my code. Unfortunately, it is coming at certain iteration of for loop(specifically, at the beginning of iteration number 3) due to which I am not getting any idea on how to write minimal code demonstrating this problem. I have also noticed that this problem occurs on multiple datasets.
Update: August 5 I am still fiddling with this problem. It seems that CGAL assigns a mark 'mmark_number' to darts of CMap in call to constructor of the iterator structure, but I am still not sure how to relate this to faults in my code or dataset, if any?
I think the problem could be that you remove twice a same 2-cell.
Indeed, in the first loop (line 1743) you push one dart per 2-cell to
test; but in the second loop (line 1758) you iterate through all the
faces of each volume having one dart in the vector.
Thus probably in the second loop you reach to a face which has one of
its dart later in the vector.
This is only a supposition after a quick look at your code. You need to
try to debug your code, by adding assertion and by developing some
functions allowing to add debug test.
For example you can develop a function which tests, just before that you
remove a 2-cell, that all the other darts in the vector do not belong to
the same 2-cell than the one removed. This function will help to solve
> Further I would like to add that compiling same code on Windows 7(32-bit)
> with Visual Studio 2012 and CGAL(4.6.1) gives following error:
> CGAL error: assertion violation!
> Expression: this->mmap->is_marked((*this), mmark_number)
> File: <CGAL Installation
> Line: 262
> Refer to the bug-reporting instructions at
> http://www.cgal.org/bug_report.html >
> which is same as that in linux(shown in my original post) but with an added
> explanation which seems to suggest that it is a bug in CGAL code. Do I need
> to create an Issue on Github?
No, the explanation is wrong here. This is a bug in your code, not in
the library (as explained in my last email).