[GRASS-dev] [GRASS GIS] #801: r.le.patch crashes with -c flag

GRASS GIS trac at osgeo.org
Wed Nov 4 13:17:52 EST 2009


#801: r.le.patch crashes with -c flag
--------------------------------+-------------------------------------------
 Reporter:  wilsonadam          |       Owner:  grass-dev at lists.osgeo.org
     Type:  defect              |      Status:  new                      
 Priority:  normal              |   Milestone:  6.4.0                    
Component:  default             |     Version:  6.4.0 RCs                
 Keywords:  segmentation fault  |    Platform:  Linux                    
      Cpu:  x86-64              |  
--------------------------------+-------------------------------------------
 I am trying to run r.le.patch to create a map of separate 'patches' using
 the -c flag to drop the edges and only keep core areas of a certain size.

 To recreate this:

 {{{

 g.region n=1 s=0 e=1 w=0 res=.01 ## Make some region
 r.random.surface output=surface  ## create a raster to use as input
 r.random input=surface n=10 raster_output=points ## create some random
 points
 r.grow input=points radius=10 output=patch ## grow them to make 'patches'
 r.le.patch -n map=patch sam=w co1=2 co2=c1 ## run r.le.patch with -n flag
 to identify the patches by number - it works fine
 r.le.patch -c map=patch sam=w co1=2 co2=c1 ## run r.le.patch with -c flag
 to identify only 'core areas' - it crashes!
 }}}


 It segfaults with the error shown below.  I am running the GRASS6.4.0RC5
 checked out and compiled this morning on Fedora 11 2.6.30.9-90.fc11.x86_64

 Any ideas?  Am I doing something wrong or is this a bug?  I've tried
 several settings for the co1 and c02 and it crashes with every combination
 I have tried.

 Thanks for any help.

 ###########################################################


 {{{
 GRASS 6.4.0RC5 (CFR):/media/Data > r.le.patch -c map=patch sam=w co1=2
 co2=c1

 PARAMETER CHOICES:
     MAP:      patch
     SAMPLE:      whole map        TRACING:  8 neighbor
     OUTPUT MAPS:
           interior
     CORE MEASURES:
           mean core size

 R.LE.PATCH IS WORKING....;

 *** glibc detected *** r.le.patch: double free or corruption (out):
 0x0000000001c92be0 ***
 ======= Backtrace: =========
 /lib64/libc.so.6[0x39e5e75a96]
 r.le.patch(cell_clip+0x8fa)[0x417cea]
 r.le.patch(cell_clip_drv+0x18c)[0x4180dc]
 r.le.patch(patch_fore+0x98)[0x40c2d8]
 r.le.patch(main+0x4fe)[0x40e61e]
 /lib64/libc.so.6(__libc_start_main+0xfd)[0x39e5e1ea2d]
 r.le.patch[0x403109]
 ======= Memory map: ========
 00400000-0041d000 r-xp 00000000 fd:00 341102
 /usr/local/grass-6.4.0RC5/bin/r.le.patch
 0061d000-0061e000 rw-p 0001d000 fd:00 341102
 /usr/local/grass-6.4.0RC5/bin/r.le.patch
 01c4c000-01caf000 rw-p 00000000 00:00 0
 [heap]
 39e5a00000-39e5a1f000 r-xp 00000000 fd:00 45132
 /lib64/ld-2.10.1.so
 39e5c1e000-39e5c1f000 r--p 0001e000 fd:00 45132
 /lib64/ld-2.10.1.so
 39e5c1f000-39e5c20000 rw-p 0001f000 fd:00 45132
 /lib64/ld-2.10.1.so
 39e5e00000-39e5f64000 r-xp 00000000 fd:00 45133
 /lib64/libc-2.10.1.so
 39e5f64000-39e6164000 ---p 00164000 fd:00 45133
 /lib64/libc-2.10.1.so
 39e6164000-39e6168000 r--p 00164000 fd:00 45133
 /lib64/libc-2.10.1.so
 39e6168000-39e6169000 rw-p 00168000 fd:00 45133
 /lib64/libc-2.10.1.so
 39e6169000-39e616e000 rw-p 00000000 00:00 0
 39e6200000-39e6282000 r-xp 00000000 fd:00 54274
 /lib64/libm-2.10.1.so
 39e6282000-39e6482000 ---p 00082000 fd:00 54274
 /lib64/libm-2.10.1.so
 39e6482000-39e6483000 r--p 00082000 fd:00 54274
 /lib64/libm-2.10.1.so
 39e6483000-39e6484000 rw-p 00083000 fd:00 54274
 /lib64/libm-2.10.1.so
 39e6600000-39e6602000 r-xp 00000000 fd:00 56013
 /lib64/libdl-2.10.1.so
 39e6602000-39e6802000 ---p 00002000 fd:00 56013
 /lib64/libdl-2.10.1.so
 39e6802000-39e6803000 r--p 00002000 fd:00 56013
 /lib64/libdl-2.10.1.so
 39e6803000-39e6804000 rw-p 00003000 fd:00 56013
 /lib64/libdl-2.10.1.so
 39e6a00000-39e6a15000 r-xp 00000000 fd:00 56006
 /lib64/libz.so.1.2.3
 39e6a15000-39e6c14000 ---p 00015000 fd:00 56006
 /lib64/libz.so.1.2.3
 39e6c14000-39e6c15000 rw-p 00014000 fd:00 56006
 /lib64/libz.so.1.2.3
 39f0400000-39f0419000 r-xp 00000000 fd:00 116332
 /lib64/libgcc_s-4.4.1-20090729.so.1
 39f0419000-39f0619000 ---p 00019000 fd:00 116332
 /lib64/libgcc_s-4.4.1-20090729.so.1
 39f0619000-39f061a000 rw-p 00019000 fd:00 116332
 /lib64/libgcc_s-4.4.1-20090729.so.1
 7f308a2da000-7f308f3ad000 r--p 00000000 fd:00 56067
 /usr/lib/locale/locale-archive
 7f308f3ad000-7f308f3b0000 rw-p 00000000 00:00 0
 7f308f3d2000-7f308f3da000 r-xp 00000000 fd:00 358068
 /usr/local/grass-6.4.0RC5/lib/libgrass_datetime.6.4.0RC5.so
 7f308f3da000-7f308f5d9000 ---p 00008000 fd:00 358068
 /usr/local/grass-6.4.0RC5/lib/libgrass_datetime.6.4.0RC5.so
 7f308f5d9000-7f308f5da000 rw-p 00007000 fd:00 358068
 /usr/local/grass-6.4.0RC5/lib/libgrass_datetime.6.4.0RC5.so
 7f308f5da000-7f308f5db000 rw-p 00000000 00:00 0
 7f308f5db000-7f308f62c000 r-xp 00000000 fd:00 358108
 /usr/local/grass-6.4.0RC5/lib/libgrass_gis.6.4.0RC5.so
 7f308f62c000-7f308f82c000 ---p 00051000 fd:00 358108
 /usr/local/grass-6.4.0RC5/lib/libgrass_gis.6.4.0RC5.so
 7f308f82c000-7f308f82e000 rw-p 00051000 fd:00 358108
 /usr/local/grass-6.4.0RC5/lib/libgrass_gis.6.4.0RC5.so
 7f308f82e000-7f308f838000 rw-p 00000000 00:00 0
 7fffcf185000-7fffcf19a000 rw-p 00000000 00:00 0
 [stack]
 7fffcf1ee000-7fffcf1ef000 r-xp 0000000Aborted
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/801>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list