[GRASS-dev] [GRASS GIS] #3593: Error in v.stream.order add-on, segmentation fault
GRASS GIS
trac at osgeo.org
Sun Sep 16 10:58:47 PDT 2018
#3593: Error in v.stream.order add-on, segmentation fault
--------------------------+---------------------------------
Reporter: jradinger | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone:
Component: Addons | Version: svn-releasebranch74
Resolution: | Keywords:
CPU: Unspecified | Platform: Unspecified
--------------------------+---------------------------------
Comment (by jradinger):
I've not yet checked with `valgrind` or `pdb`, but I might have identified
the line that might cause the problem (L390,
https://trac.osgeo.org/grass/browser/grass-
addons/grass7/vector/v.stream.order/v.stream.order.py#L390): This is the
command `v.open(mode="r")`, where `v=VectorTopo('streams',
'test_stream_order')`.
I am not sure if this is a valid way to test but I ran the `v.open()`
command manually within python (within a GRASS session):
{{{
from grass.script import core as grass
from grass.pygrass.vector import VectorTopo
v = VectorTopo('streams','PERMANENT')
v.open(mode="r")
v.close()
}}}
This causes (not sure if this is a valid approach/related):
{{{
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Applications/GRASS-7.4.1.app/Contents/Resources/etc/python/grass/pygrass/vector/__init__.py",
line 638, in close
super(VectorTopo, self).close(build=build)
File
"/Applications/GRASS-7.4.1.app/Contents/Resources/etc/python/grass/pygrass/vector/abstract.py",
line 402, in close
if self.is_open():
File
"/Applications/GRASS-7.4.1.app/Contents/Resources/etc/python/grass/pygrass/vector/abstract.py",
line 283, in is_open
return is_open(self.c_mapinfo)
File
"/Applications/GRASS-7.4.1.app/Contents/Resources/etc/python/grass/pygrass/vector/abstract.py",
line 21, in is_open
return (c_mapinfo.contents.open != 0 and
AttributeError: 'struct_Map_info' object has no attribute 'open'
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3593#comment:6>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list