[GRASS-dev] Vect_read_line -> ERROR: G_calloc
Glynn Clements
glynn at gclements.plus.com
Tue Oct 9 04:40:14 PDT 2012
"ifj. Stefán István" wrote:
> Hello!
>
> I'm trying to open a vector map with the Grass 6 API, but when I try to
> read from the map, I get the following error message:
>
> ERROR: G_calloc: unable to allocate 1861156242 * 4 bytes at
> allocation.c:144
> struct line_pnts line_p;
> struct line_cats line_c;
> Vect_read_line(&Map, &line_p, &line_c,1);
> What am'I doing wrong?
You aren't initialising the structures.
The above lines should be e.g.:
struct line_pnts *Points = Vect_new_line_struct();
struct line_cats *Cats = Vect_new_cats_struct();
Vect_read_line(&Map, line_p, line_c, 1);
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list