Random segmentation fault when extending a Graph
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
igraph |
Fix Released
|
Medium
|
Tamás Nepusz |
Bug Description
We were using igraph 0.5.4 during a year, and after upgrading to 0.6 version our programs randomly crashes. The following source code excerpt basically summarizes the error:
# A new class graph that extends Graph
class MyGraph (ig.Graph):
def __init__(self, directed=True):
# Module B
g = MyGraph()
print g
(segmentation fault after print g)
The program fails or executes correctly depending on which module the MyGraph object is created and inspected (the last two lines). Inspecting the core dump using gdb shows the following error cause:
--
Program received signal SIGSEGV, Segmentation fault.
x00007ffff388acb7 in igraphmodule_
8760 return PyDict_
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
--
We believe that there is some kind of internal initialization problem inside ig.Graph constructor, however we have not been able to detect the error pattern.
The execution environment is:
- Linux 2.6.32-42-generic #95-Ubuntu x86_64
- Python 2.6.5
- igraph 0.6
- python-igraph 0.6
and the installation is apparently correct:
$ python
>>> import igraph.test
>>> igraph.
[...]
Ran 260 tests in 6.020s
OK
Changed in igraph: | |
assignee: | nobody → Tamás Nepusz (ntamas) |
Changed in igraph: | |
importance: | Undecided → Medium |
milestone: | none → 0.6.1 |
Changed in igraph: | |
status: | Fix Committed → Fix Released |
I haven't checked it yet, but I was wondering whether the above code snippet would compile; e.g., is "ig" the same as "igraph"? valgrind. log python test.py" (where test.py is your code snippet that reproduces the problem) and attach the output of valgrind?
Also, would it be possible to install valgrind, run "valgrind --log-file=
Thanks in advance. I'll try to reproduce the issue myself in the meanwhile.