[GRASS5] Re: [GRASSLIST:1246] a problem in NVIZ

Glynn Clements glynn.clements at virgin.net
Tue Sep 16 13:43:24 EDT 2003


Hamish wrote:

> I've currently got my integer-map bug tracked down to this line on
> src/libes/ogsf/GS2.c:  (line 1445)
>    filename = G_fully_qualified_name(filename, mapset);
> 
> Next is to follow G_fully_qualified_name() in src/libes/gis/nme_in_mps.c.
> Hopefully this leads somewhere.

It leads to:

	char *
	G_fully_qualified_name (name, mapset)
	    char *name;
	    char *mapset;
	{
	    char fullname[1024];
	    char *G_store();
	
	    if(strchr(name, '@'))
	    	sprintf (fullname, "%s", name);
	    else
	    	sprintf (fullname, "%s@%s", name, mapset);
	
	    return G_store(fullname);
	}

My guess is that the heap has previously been corrupted, causing a
subsequent call to malloc() (in G_store()) to segfault. If so, then
debugging from the point that SIGSEGV is received won't help any; you
would need to either use memory debugging tools such as Electric Fence
or try to manually discover the source of the overrun.

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




More information about the grass-dev mailing list