[GRASS-user] v.in.ogr G_realloc error

Markus Neteler neteler at osgeo.org
Mon May 30 06:30:18 EDT 2011


On Wed, May 11, 2011 at 4:19 PM, spiderplant0 <spiderplant0 at gmail.com> wrote:
> Hi, when I try to import a shapefile into GRASS I get this error message:
> G_realloc: unable to allocate 18440000 bytes at struct_alloc.c:133
>
> Command used:
> v.in.ogr -o dsn=E:/temp/MSOA_AUG_2004_EW_BGC.shp output=eng_wales_osgb
>
> If I use the '-c' option (dont clean polygons) I dont get the error but this
> is no use as it results in some of the polygons going missing.
> The shapefile is big but not that big and I can load the shapefile into
> Quantum GIS and GMapCreator with no problems so I dont think there is
> anything wrong with the shapefiles.
> I have tried this with other shapefiles and projections and get a similar
> error.
> It also seems to be taking a very long time to import - literally hours.
> I don't get the error with small shapfiles.
> I'm using Windows7 64-bit, GRASS 6.4.0
> Output log is pasted below.
>
> Do you think this is an bug or is this not the correct way to import
> shapefiles (I'm a GRASS complete beginner)?
> Thanks.

The other day Markus Metz has fixed a severe memory leak:
http://trac.osgeo.org/grass/changeset/46444 (GRASS 7)
http://trac.osgeo.org/grass/changeset/46445 (GRASS 6.5)

This has impact on polygons imported with v.in.ogr, so the updated version
may solve your problem. After some testing the fix should go into 6.4, too.

winGRASS binaries with the fix included are available here by *tomorrow*:
http://wingrass.fsv.cvut.cz/grass65/
http://wingrass.fsv.cvut.cz/grass70/

Markus


More information about the grass-user mailing list