[GRASS-dev] [GRASS GIS] #3061: "Export vector data as multi-features" leads to crash
GRASS GIS
trac at osgeo.org
Sun Jun 12 14:57:20 PDT 2016
#3061: "Export vector data as multi-features" leads to crash
---------------------+--------------------------------------
Reporter: neo | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.5
Component: Vector | Version: unspecified
Resolution: | Keywords: v.out.ogr, multifeatures
CPU: x86-64 | Platform: MSWindows 7
---------------------+--------------------------------------
Comment (by mmetz):
Replying to [comment:3 neteler]:
> In the first place I have some doubts that you can automatically fix
these severe topological errors in the map (with the digitizer, yes). See
attached screenshot.
>
> Anyway, I checked with the debugger:
>
> {{{
> gdb v.out.ogr
> (gdb) r -s -m input=tempB output=~/tmp format=ESRI_Shapefile
> Exporting 3999 areas (may take some time)...
> 0%
> Program received signal SIGSEGV, Segmentation fault.
> 0x00007ffff79538f7 in Vect_get_area_points (Map=0x7fffffffcce0,
area=-1979, BPoints=0xb76460) at area.c:54
> 54 G_debug(3, " n_lines = %d", Area->n_lines);
> (gdb)
>
>
> (gdb) bt full
> #0 0x00007ffff79538f7 in Vect_get_area_points (Map=0x7fffffffcce0,
area=-1979, BPoints=0xb76460) at area.c:54
> Plus = 0x7fffffffccf0
> Area = 0x7bc00000879
> #1 0x000000000040445a in create_polygon (In=0x7fffffffcce0, area=-1979,
Points=0xb76460) at export_areas.c:294
> }}}
Area ID is negative: more than one centroid in this area. With negative
area ID, Vect_get_area_points() will fail with segfault. The fix is to add
a check to v.out.ogr for such cases. That avoids the segfault.
The main problem, however, is that cleaning did not succeed. Apparently, a
last step with v.clean tool=rmdac is needed. After each run of v.clean,
the output messages should be read carefully in order to decide if the
output vector is sufficiently clean.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3061#comment:4>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list