[GRASS-dev] d.mon crashes in current 6.3 CVS

Glynn Clements glynn at gclements.plus.com
Thu Apr 26 18:44:49 EDT 2007


Maciej Sieczka wrote:

> On 2 32bit and 1 64bit different machines (but all Ubuntu Dapper) d.mon
> segfaults for me as follows:
> 
> $ d.mon x0
> using default visual which is TrueColor
> ncolors: 16777216
> Segmentation fault
> Segmentation fault
> Problem selecting x0. Will try once more
> Segmentation fault
> 
> Monitor pops up for a short while and dissapears.
> 
> I can't get obtain a backtrace. Gdb only says: "Program exited with
> code 01."
> 
> Can anybody reproduce?

Yes:

#1  0xb7efdccb in _get_make_sock_path () at unix_socks.c:101
101	    len = strlen(prefix) + strlen(user) + strlen(GRASS_VERSION_MAJOR) + strlen(GRASS_VERSION_MINOR) + strlen(lock) + 3;

Fixed in CVS:

--- lib/gis/unix_socks.c	10 Apr 2007 19:00:39 -0000	1.12
+++ lib/gis/unix_socks.c	26 Apr 2007 22:43:30 -0000
@@ -98,7 +98,7 @@
     if ( (lock = getenv ( "GIS_LOCK" )) == NULL )
 	G_fatal_error ("Cannot get GIS_LOCK enviroment variable value");
 
-    len = strlen(prefix) + strlen(user) + strlen(GRASS_VERSION_MAJOR) + strlen(GRASS_VERSION_MINOR) + strlen(lock) + 3;
+    len = strlen(prefix) + strlen(user) + strlen(lock) + 3;
     path = G_malloc (len);
     
     sprintf (path, "%s-%s-%s", prefix, user, lock);

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list