this bug's URL: http://intevation.de/rt/webrt?serial_num=4244
-------------------------------------------------------------------------
Subject: segmentation library short read()s
Hi,
as many have noticed, sometime after 6.0 was released modules using the
segmentation library started to see read errors. After fixing the reported
error message in pagein.c we see that a short read is happening:
WARNING: segment_pagein: short count during read(), got 4076, expected 4096
WARNING: segment_pagein: short count during read(), got 1004, expected 1024
...
seems to be consistently short 20 bytes.
spearfish60 example:
GRASS 6.1-cvs
G6.1> r.cost in=elevation.10m out=cost_test.61 coordinate=599732,4920952
WARNING: segment_pagein: short count during read(), got 524268, expected
524288
WARNING: segment_pagein: short count during read(), got 524268, expected
524288
[done]
================
GRASS 6.0.2
G6.0.2> r.cost in=elevation.10m out=cost_test.602 coordinate=599732,4920952
Peak cost value: 645941.903859
[done]
Resultant maps differ slightly!!
G61> r.univar -g cost_test61 | grep sum
sum=86555328769.3534545898
G61> r.univar -g cost_test602 | grep sum
sum=86555572145.8440551758
also seen in r.surf.contour, r.watershed, r.walk, ...
two relevant changes to the segment lib since 6.0:
"Roberto Flor (ITC-irst): use lseek"
http://freegis.org/cgi-bin/viewcvs.cgi/grass6/lib/segment/format.c.diff?r1=2.0&r2=2.1
"added missing config.h for off_t (as suggested by Glynn; bug #3974)"
http://freegis.org/cgi-bin/viewcvs.cgi/grass6/lib/segment/seek.c.diff?r1=2.0&r2=2.1
could it be some site_t change somewhere else...?
Hamish
-------------------------------------------- Managed by Request Tracker