Glynn Clements wrote:
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. ��������������������u����Č
������u����Č) in other cases I get none before the seg fault.
I get these results on Fedora 6 and 7 installs from scratch. I know of
others having the same problem (using Fedora 6) that they use a g.copy
version from 6.2 as a workaround. I had a look at the diffs but didn't
find anything I would put the blame on.
Any help is appreciated,
thanks,
Volker
By the way, trying to display the copied/corrupted map I get the
following errors:
WARNING: Can't open header file for [EMAIL PROTECTED] in PERMANENT]
WARNING: category support for [EMAIL PROTECTED] in mapset [PERMANENT]
missing
WARNING: can't get history information for [EMAIL PROTECTED] in mapset
[PERMANENT]
WARNING: can't read range file for [EMAIL PROTECTED] in PERMANENT]
ERROR: Unable to read range file
... but I have to remove the map before each new debug attempt as g.copy
states the map is already in existence
Maybe this is an issue of file permission?
If you don't have the necessary permissions, the open() call will
fail; read() and write() can't fail due to permissions.
_______________________________________________
grass-dev mailing list
[email protected]
http://grass.itc.it/mailman/listinfo/grass-dev