[GRASSLIST:9865] Re: r.mapcalc causing segmentation violation

Glynn Clements glynn at gclements.plus.com
Tue Jan 17 01:45:20 EST 2006


Ralf Gerlich wrote:

> I have dug a little deeper and realised that it's not the NULL_ROWS, but 
> the fd that is wrong.
> 
> > #1  0xb7f5cd7d in get_null_value_row (fd=0, flags=0x80851f0 "\001\001\001",
> >     row=1, with_mask=1) at get_row.c:1021
> > #2  0xb7f5d35a in get_map_row (fd=0, rast=0x805f360, row=1, data_type=1,
> >     null_is_zero=0, with_mask=1) at get_row.c:1067
> > #3  0x08055b9d in read_row (fd=0, buf=0x805f360 "", row=1, dummy=0)
> >     at map.c:227
> 
> All these have fd=0, which seems odd, as the fd in the source map 
> structure is originally !=0.
> 
> Digging further I found that this happened in column_shift due to 
> missing breaks in the col<0 part. Adding the breaks fixed the crash.

FWIW, this bug appears to have been introduced when column_shift() was
removed from map.c and map3.c and placed into a separate file
(column_shift.c) on 2006/01/02.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list