[GRASS5] [bug #4366] (grass) core dump in r.to.vect

Hamish hamish_nospam at yahoo.com
Mon May 1 00:16:54 EDT 2006


> this bug's URL: http://intevation.de/rt/webrt?serial_num=4366
> ---------------------------------------------------------------------
> 
> Subject: core dump in r.to.vect
> 
> Platform: GNU/Linux/x86
> grass obtained from: CVS
> grass binary for platform: Compiled from Sources
> GRASS Version: GRASS 6.1.cvs checkout 4/27/06
> 
> There is a core dump in r.to.vect when run over DCELL rasters. 
> Segfault originates at this line:
> 
> #0  extract_areas () at areas.c:283
> 283           v_list[col]->node = h_ptr->node = 1;
> 
> I think that in r.to.vect there should be an error message on trying
> to run it on a raster other than of CELL type.  


confirmed,

#spearfish
r.mapcalc tmp_fields='double(fields)'
r.to.vect in=tmp_fields out=tmp_fields fea=area

gdb shows the segfault in the same place for this example as above.


while it segfaults if either v_list[col]->node = 1; or h_ptr->node = 1;
is run first on its own,

printf("v_list =[%p]  h_ptr=[%p]\n", v_list, h_ptr);
 shows
v_list =[0x806bae8]  h_ptr=[(nil)]

, but in the CELL case h_ptr has value.


Hamish




More information about the grass-dev mailing list