Combinatorial maps: assertion error: this->mmap->is_marked

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Combinatorial maps: assertion error: this->mmap->is_marked

Pranav
This post was updated on .
Hi,

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)
File: /usr/local/include/CGAL/Combinatorial_map_iterators_base.h
Line: 258
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?


Reply | Threaded
Open this post in threaded view
|

Re: Combinatorial maps: assertion error: this->mmap->is_marked

Pranav
Hi,

Do I need to add more information to this question? Unfortunately, as of now, I am unable to make a minimal code for demonstrating this problem.
Reply | Threaded
Open this post in threaded view
|

Re: Combinatorial maps: assertion error: this->mmap->is_marked

Guillaume Damiand
Hi,

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
your problem.

Good luck

Guillaume


Le 05/08/2015 11:35, Pranav a écrit :

> Hi,
>
> Do I need to add more information to this question? Unfortunately, as of
> now, I am unable to make a minimal code for demonstrating this problem.
>
>
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/Combinatorial-maps-assertion-error-this-mmap-is-marked-tp4661029p4661047.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: [hidden email]
Web: http://liris.cnrs.fr/guillaume.damiand/
===================================================================



smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Combinatorial maps: assertion error: this->mmap->is_marked

Pranav
In reply to this post by Pranav
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 Directory>\CGAL-4.6.1\include\CGAL\Combinatorial_map_iterators_base.h
Line: 262
Explanation:
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?
Reply | Threaded
Open this post in threaded view
|

Re: Combinatorial maps: assertion error: this->mmap->is_marked

Guillaume Damiand
Le 18/08/2015 15:50, Pranav a écrit :

> 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
> Directory>\CGAL-4.6.1\include\CGAL\Combinatorial_map_iterators_base.h
> Line: 262
> Explanation:
> 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).

Guillaume

>
>
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/Combinatorial-maps-assertion-error-this-mmap-is-marked-tp4661029p4661079.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: [hidden email]
Web: http://liris.cnrs.fr/guillaume.damiand/
===================================================================



smime.p7s (3K) Download Attachment