[GRASS5] GRASS 5.3 new bug in s.in.ascii

Glynn Clements glynn.clements at virgin.net
Mon Mar 22 16:39:03 EST 2004


Michael Barton wrote:

> I have hit a bug in GRASS 5.3--the first I've run into in a couple 
> months of pretty solid work with this version.
> 
> When trying to import a simple text file into the sites format, I get 
> an error if the file contains non-numeric strings. Here is the file I 
> was trying to import
> 
> 501175.0877193,3836254.44444444,1968,room
> 502782.10526316,3839709.53216374,1915,room
> 502621.40350877,3842789.64912281,1889,room
> 503183.85964912,3844798.42105263,1874,room
> 501175.0877193,3842602.16374269,1894,roomblock
> 506505.02923977,3837566.84210526,1941,roomblock
> 
> s.in.ascii sites=clearcreek_sites input=clearcreek_sites.txt fs=,
> 
> It doesn't matter whether or not I put quotes around the character 
> strings. The error I get is:
> 
> *** malloc[14292]: error for object 0x357b: Pointer being reallocated 
> was not allocated
> ERROR: G_realloc: out of memory
> 
> If I get rid of the string fields (i.e., 'room' and 'roomblock'), it 
> imports just fine.
> 
> I'd SWEAR this was working just fine in a previous version of 
> s.in.ascii I was using last November. I didn't notice anything had been 
> changed in the CVS for s.in.ascii in the past few months so I don't 
> understand why this WAS working but isn't now.

One possibility is changes to src/libes/gis/sites.c.

Another possibility is that the bug has always been present, but you
haven't been bitten by it before; bugs relating to malloc()ed memory
are often like that.

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list