Hello all,
I have found a bug in r.digit, r.in.poly, r.mask commands in grass5.0beta
release.
On large grids, during a writing phase there are warnings:
WARNING: Calling G_set_window() in the middle of writing map temp
and then empty grid is created.
In r.mask, there is another error:
ERROR: G_calloc: out of memory
But there is enough memory and also swap space (64 + 128 MB).
These errors were encountered on Linux and SGI/Irix machines.
Do any of you have fixed this problem?
Thanks in advance,
WBR,
Jaro Hofierka
GeoModel,s.r.o.
Bardejov
Slovakia
hofierka@netlab.sk
Hello Jaro
On Feb 25, 1:16pm, Jaro Hofierka wrote:
Subject: r.digit, r.in.poly, r.mask bug report for grass5.0beta
In r.mask, there is another error:
> ERROR: G_calloc: out of memory
For this bug you may want to look at the file
$GIS/src/raster/r.reclass/inter/maketable.c
This file is used by r.mask and around line 28 you should find the line
char_table = (char **) G_calloc((max-min+1) * sizeof(char *));
The arguments to this function are wrong. G_calloc is supposed to take the
number of elements as its first argument followed by the element size for its
second argument. The above line only contains one argument.
To fix this, either change the arguments to the G_calloc call or change the
call to G_malloc which takes the single argument provided to the above G_calloc
call.
I orginally posted this when I found it and someone fixed the code for Grass
4.2 at the time, but apparently, Baylor developers missed it since it is still
in the Grass 5.0beta code. Which means I have to change my own version as well

Hope this helps.
--
Sincerely,
Jazzman (a.k.a. Justin Hickey) e-mail: jhickey@hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand
People who think they know everything are very irritating to those
of us who do. ---Anonymous
Jazz and Trek Rule!!!