[GRASS-dev] [grass-code I][431] g.copy segmentation fault

Glynn Clements glynn at gclements.plus.com
Tue Jul 24 15:56:08 EDT 2007


Volker Wichmann wrote:

> >> Digging a little deeper, I found that the return values of the two 
> >> 'open' commands (variables fd and fd2) are reasonable - but what about 
> >> the return value of the read command (line 146, do_copy.c):
> >> len = read(fd, buf, 1024)
> >> Why is a 0 returned at the first call - my dataset is a valid raster, so 
> >> why an EOF before reading anything?
> >>     
> >
> > Some of the files comprising the map may be empty, e.g. FP maps have
> > an empty "cell" file (the actual data is in the "fcell" file).
> 
> ok, thanks for that hint. I was indeed using a FP map ...
> trying to copy a map of type CELL reads and writes the map until EOF but
> the segmentation fault on return remains. Capturing the return value I
> sometimes get a corrupted output (e.g. $(0!;!;(B$(0!;!;(B$(0!;!;!;!;(B$(0!;!;(B$(0!;!;(B$(0!;!;!;!;(B$(0!;!;(B$(0!;!;(Bu$(0!;!;!;!;(B?-BÈ-A
> $(0!;!;(B$(0!;!;(B$(0!;!;(Bu$(0!;!;!;!;(B?-BÈ) in other cases I get none before the seg fault.-A

You will need to provide more detailed information, i.e. the complete
backtrace at the point of the segfault and the values of any relevant
variables.

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




More information about the grass-dev mailing list