[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] python igraph bug
From: |
Tamas Nepusz |
Subject: |
Re: [igraph] python igraph bug |
Date: |
Thu, 22 Nov 2007 19:16:55 +0100 |
Hi,
I think the bug is unrelated to getting a nonexistent edge:
>>> from igraph import *
>>> g=Graph(10000)
>>> g.get_eid(500, 600)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
igraph.core.InternalError: Error at igraph/type_indexededgelist.c:
1019: Cannot get edge id, no such edge, Invalid value
According to the backtrace, igraph is trying to free an invalid
pointer which is accidentally left in the "finally" stack (used to
emulate exception handling behavior in C the layer). Since the
"finally" stack is cleared when igraph returns an error, the error
message that's usually shown when getting a nonexistent edge triggers
the error, but it is not the main cause. I'm almost sure about this,
since igraph_get_eid (the underlying C function) does not use the
"finally" stack at all. (For more details on the "finally" stack,
please refer to the documentation of the C core, especially to the
chapter about error handling). It also seems that the pointer that's
left in the stack once belonged to an adjacency list view of the graph
since igraph is trying to free it by igraph_i_adjlist_destroy. So the
question is: what methods did you call before you encountered this
error and which ones can be somehow connected to an adjacency list
view? I checked the source code and it seems that the following
methods use igraph_i_adjlist_destroy:
- functions related to cliques and maximal independent vertex sets
- eigenvector based community detection
- minimum cut calculation
- Reingold-Tilford layout
- RAND-ESU motif detection and triad census (yet unimplemented in the
Python interface)
- diameter, average path length, Pagerank calculation
- random rewiring
- transitivity
--
T.