[GRASS5] g.mapset causing a Bus error on MacOSX

Paul Kelly paul-grass at stjohnspoint.co.uk
Fri Aug 20 04:58:24 EDT 2004

On Fri, 20 Aug 2004, Hamish wrote:

>> G57> g.mapset PERMANENT
>> causes a bus error on MacOSX
> and segfaults in linux too.
> happens on line 74 of general/g.mapset/main.c:
> monitor = G_store ( G__getenv ("MONITOR") );
> ideas?

If G__getenv("MONITOR") returned NULL it caused problems for G_store. But 
it seems you don't need to use G_store anyway as the values returned by 
G__getenv are stored in some kind of static memory structure.

I committed some fixes (well I hope they are fixes) to g.mapset which 
seems to fix this and tidy up some other string handling. And it looked 
like it printed a message to the screen saying it was cleaning the temp 
directory but didn't actually do that---I changed that too.

Please test- I hope I didn't break anything.


More information about the grass-dev mailing list