[GRASS-dev] [GRASS GIS] #3247: i.superpixels.slic fails when region larger than 500x500 pix (on Win7)

GRASS GIS trac at osgeo.org
Tue Jan 10 02:58:52 PST 2017


#3247: i.superpixels.slic fails when region larger than 500x500 pix (on Win7)
--------------------------+--------------------------------
  Reporter:  tgrippa      |      Owner:  grass-dev@…
      Type:  defect       |     Status:  new
  Priority:  normal       |  Milestone:  7.0.6
 Component:  Imagery      |    Version:  unspecified
Resolution:               |   Keywords:  i.superpixels.slic
       CPU:  Unspecified  |   Platform:  MSWindows 7
--------------------------+--------------------------------

Comment (by mlennert):

 I can confirm segfault on Linux, but with different number of pixels:


 {{{
 g.region raster=ortho_2001_t792_1m n=220477 s=219456 e=638054 w=637033
 res=1 -p
 projection: 99 (Lambert Conformal Conic)
 zone:       0
 datum:      nad83
 ellipsoid:  a=6378137 es=0.006694380022900787
 north:      220477
 south:      219456
 west:       637033
 east:       638054
 nsres:      1
 ewres:      1
 rows:       1021
 cols:       1021
 cells:      1042441

 i.superpixels.slic --overwrite group=ortho k=500 output=slic_segment
 }}}

 works, but


 {{{
 g.region raster=ortho_2001_t792_1m n=220479 s=219456 e=638056 w=637033
 res=1 -p
 projection: 99 (Lambert Conformal Conic)
 zone:       0
 datum:      nad83
 ellipsoid:  a=6378137 es=0.006694380022900787
 north:      220479
 south:      219456
 west:       637033
 east:       638056
 nsres:      1
 ewres:      1
 rows:       1023
 cols:       1023
 cells:      1046529

 i.superpixels.slic --overwrite group=ortho k=500 output=slic_segment
 }}}

 gives me a segfault. 1022x1022 sometimes does, sometimes doesn't.


 Here's the backtrace I get in gdb, but I guess the addon needs to be
 recompiled with debugging enabled:


 {{{
 #0  0x00007ffff70f9d3e in _IO_vfprintf_internal (s=0x7fffff7ff180,
 format=0x7ffff7790b7b "%4d%%\b\b\b\b\b", ap=0x7fffff801828)
     at vfprintf.c:1267
 #1  0x00007ffff70fcc23 in buffered_vfprintf (s=0x7ffff744c520
 <_IO_2_1_stderr_>, format=<optimized out>, args=<optimized out>)
     at vfprintf.c:2325
 #2  0x00007ffff70f9f15 in _IO_vfprintf_internal (s=0x7ffff744c520
 <_IO_2_1_stderr_>, format=0x7ffff7790b7b "%4d%%\b\b\b\b\b",
     ap=ap at entry=0x7fffff801828) at vfprintf.c:1293
 #3  0x00007ffff7102157 in __fprintf (stream=<optimized out>,
 format=format at entry=0x7ffff7790b7b "%4d%%\b\b\b\b\b")
     at fprintf.c:32
 #4  0x00007ffff7780e4a in G_percent (n=0, d=10, s=<optimized out>) at
 percent.c:83
 #5  0x0000555555555c21 in main (argc=<optimized out>, argv=<optimized
 out>) at main.c:338
 }}}

 Here's the output with g.gisenv set=DEBUG=3:


 {{{
 D1/3: G_find_raster2(): name=ortho_2001_t792_1m mapset=PERMANENT
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/cell/ortho_2001_t792_1m
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/fcell/ortho_2001_t792_1m
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/g3dcell/ortho_2001_t792_1m
 D1/3: G_find_raster2(): name=ortho_2001_t792_1m mapset=PERMANENT
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/cell/ortho_2001_t792_1m
 D1/3: G_find_raster2(): name=ortho_2001_t792_1m mapset=PERMANENT
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/cell/ortho_2001_t792_1m
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/fcell/ortho_2001_t792_1m
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/g3dcell/ortho_2001_t792_1m
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/cell_misc/ortho_2001_t792_1m/gdal
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/cell/ortho_2001_t792_1m
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/cell/ortho_2001_t792_1m
 D3/3: create window mapping (1023 columns)
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/cell_misc/ortho_2001_t792_1m/null
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/cell_misc/ortho_2001_t792_1m/null
 D1/3: G_find_raster(): name=MASK mapset=user1
 D2/3: G_file_name(): path = /data/GRASS/DATA7/nc_spm_08/user1/cell/MASK
 D1/3: G_find_raster2(): name=ortho_2001_t792_1m mapset=PERMANENT
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/cell/ortho_2001_t792_1m
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/fcell/ortho_2001_t792_1m
 D2/3: G_file_name(): path =
 /data/GRASS/DATA7/nc_spm_08/PERMANENT/g3dcell/ortho_2001_t792_1m
 Erreur de segmentation
 }}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3247#comment:1>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list