segfaults writing unicode
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
igraph |
Confirmed
|
Low
|
Tamás Nepusz |
Bug Description
writing unicode output causes igraph to segfault:
$ python
Python 2.5.5 (r255:77872, Feb 2 2010, 00:25:36)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys, igraph
>>> igraph.__version__
'0.5.3'
>>> gg = igraph.Graph(n=1, edges=[], vertex_attrs={'id': [u'\u0391\
>>> gg.write_
/* Created by igraph 0.5.3 */
graph {
0 [
Segmentation fault
the unicode string in the example is just "Αθήνα" ("Athens") and not some obscure construct.
the segfault occurs for all the write formats i tested (dot, graphml, graphmlz, pajek), except pickle, and for python 2.6 on debian.
----
as a side note, write_pickle gives
File "/usr/lib/
if file_was_opened: fname.close()
UnboundLocalError: local variable 'file_was_opened' referenced before assignment
which can fixed by adding "else: file_was_
it seems to be segfaulting when writing out the attribute - formats like gml which don't output the attribute don't segfault.