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

Markus Metz markus.metz.giswork at googlemail.com
Mon May 30 06:46:31 EDT 2011


On Mon, May 30, 2011 at 12:30 PM, Markus Neteler <neteler at osgeo.org> wrote:
> 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.
>
This fix...
> 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.

... is already in GRASS 6.4 as of r46446. I tested (thoroughly) and
submitted to 6.4 because it was a rather serious memory leak.

Markus M


More information about the grass-user mailing list