# Need help with igraph error:\[ igraph\_error.c:186: Assertion \`no \< 100’ failed.’\]

**URL:** <https://igraph.discourse.group/t/need-help-with-igraph-error-igraph-error-c-assertion-no-100-failed/478>\
**Category:** Usage\
**Tags:** C\
**Created:** [14 October 2020 20:29 UTC](https://igraph.discourse.group/t/need-help-with-igraph-error-igraph-error-c-assertion-no-100-failed/478 "2020-10-14T20:29:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![d9y1kk](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/d9y1kk/32/382_2.png) [@d9y1kk](https://igraph.discourse.group/u/d9y1kk)\
**Post date:** [14 October 2020 20:29 UTC](https://igraph.discourse.group/t/need-help-with-igraph-error-igraph-error-c-assertion-no-100-failed/478/1 "2020-10-14T20:29:01Z")

</div>

I have the same error information as in this topic:

> [@\#pragma omp parallel: igraph\_error.c:186: IGRAPH\_FINALLY\_REAL: Assertion \`no \< 100' failed](https://igraph.discourse.group/t/pragma-omp-parallel-igraph-error-c-igraph-finally-real-assertion-no-100-failed/469):
>
> Dear igraph users, I’m running my c++ code under multiple threads on Ubuntu with OpenMP and functions from the igraph c library. However, sometimes I get the error ‘igraph\_error.c:186: IGRAPH\_FINALLY\_REAL: Assertion `no \< 100’ failed.’, and when I run it without parallelism, there’s no error. Could any of you give some hints about what’s going wrong? Thanks in advance. Peng

But I’m working under windows, and this error always appear when I iteratively add vertices, edges and edge/vertices weights to a graph. For example, I have 50 graphs, I loop each graphs and add around 1000 vertices and 10000 edges. It always shows this error at the 46th graph, but if I simply do the operation on 46th graph, it works fine.

Error code

```c
igraph_attribute_combination_t comb;
igraph_attribute_combination(&comb, "weight", IGRAPH_ATTRIBUTE_COMBINE_SUM, "", IGRAPH_ATTRIBUTE_COMBINE_FIRST, IGRAPH_NO_MORE_ATTRIBUTES);
igraph_simplify(&sourceGraph, 1, 1, &comb); /* <---- error */

```

```plaintext
Assertion failed: no < 100, file D:\igraph-0.8.2-msvc\src\igraph_error.c, line 186

Error trace:
igraph_simplify () --> igraph_create() --> igraph_empty_attrs() --> igraph_i_cattributes_init() -->
IGRAPH_FINALLY_REAL().

```

I have two questions:

1. if this is also due to the parallel problem as that topic, where should I add the args? I work on windows and I only have igraph msvc project file.

2. Cound it be a problem with the `igraph_simplify`? I add multiply edges to the graph and I expect that the simplify function can sum the “weight” attributes while keep the vertex attributes.

Thank you!

---

<div class="post-metadata">

**Author:** ![vtraag](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/vtraag/32/38_2.png) [@vtraag](https://igraph.discourse.group/u/vtraag)\
**Post date:** [14 October 2020 20:51 UTC](https://igraph.discourse.group/t/need-help-with-igraph-error-igraph-error-c-assertion-no-100-failed/478/2 "2020-10-14T20:51:46Z")

</div>

This possibly points to a real bug, where there is a problem in error handling, possibly due to mismatching `FINALLY` calls. Could you please provide the exact code that reproduces the exact problem? That way we could look into it in more detail.

---

<div class="post-metadata">

**Author:** ![d9y1kk](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/d9y1kk/32/382_2.png) [@d9y1kk](https://igraph.discourse.group/u/d9y1kk)\
**Post date:** [14 October 2020 21:30 UTC](https://igraph.discourse.group/t/need-help-with-igraph-error-igraph-error-c-assertion-no-100-failed/478/3 "2020-10-14T21:30:19Z")

</div>

Thanks for your reply. The error code is in my image matching project which has a long pipeline. The error appears only when handles around hundreds of images. I will try to reproduce it with simple example code.

---

<div class="post-metadata">

**Author:** ![szhorvat](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/szhorvat/32/3_2.png) [@szhorvat](https://igraph.discourse.group/u/szhorvat)\
**Post date:** [15 October 2020 08:46 UTC](https://igraph.discourse.group/t/need-help-with-igraph-error-igraph-error-c-assertion-no-100-failed/478/4 "2020-10-15T08:46:32Z")

</div>

@d9y1kk Indeed, a minimal example would very much be appreciated, if you can construct one.

If you use `./configure --enable-verify-finally`, igraph will do additional checks (but it will be noticeably slower). This should help in teasing out the error. However, the configure script is not available with MSVC. You could only try this on a Unix-like system or if using MSYS2/MinGW.

A final note: please do upgrade to igraph 0.8.3. I see you have 0.8.2.

---

<div class="post-metadata">

**Author:** ![d9y1kk](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/d9y1kk/32/382_2.png) [@d9y1kk](https://igraph.discourse.group/u/d9y1kk)\
**Post date:** [15 October 2020 15:21 UTC](https://igraph.discourse.group/t/need-help-with-igraph-error-igraph-error-c-assertion-no-100-failed/478/5 "2020-10-15T15:21:53Z")

</div>

@vtraag @szhorvat I updated the igraph to 0.8.3 and the bug magically disappeared. I build a test case by repeatly building same graph and adding same vertices/edges/attris and then delete it, this crashed (no\<100) at 40-50 rounds for 0.8.2. But for 0.8.3 it success for testing more than 100 rounds.

I think this bug might be fixed in 0.8.3. Thank you for advice.

---

<div class="post-metadata">

**Author:** ![szhorvat](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/szhorvat/32/3_2.png) [@szhorvat](https://igraph.discourse.group/u/szhorvat)\
**Post date:** [15 October 2020 15:39 UTC](https://igraph.discourse.group/t/need-help-with-igraph-error-igraph-error-c-assertion-no-100-failed/478/6 "2020-10-15T15:39:06Z")

</div>

That’s great to hear! We did fix a number of similar issues in 0.8.3, thanks to @vtraag’s `--enable-verify-finally` tool, so it’s quite likely that whatever caused this for you was fixed too.
