[GRASS-dev] [bug #5037] (grass) GRASS 6.3: d.graph segfault

Glynn Clements glynn at gclements.plus.com
Wed Aug 23 13:44:05 EDT 2006


Request Tracker wrote:

> this bug's URL: http://intevation.de/rt/webrt?serial_num=5037
> -------------------------------------------------------------------------
> 
> Subject: GRASS 6.3: d.graph segfault
> 
> d.graph segfaults on startup. (GRASS 6.3-cvs only)
> 
> in lib/raster/com_proto.c  R_RGB_color()
> 
> 
> e.g.
> 
> G63> d.mon x0
> G63> echo "draw 50 50" | d.graph
> Segmentation fault
> 
> It breaks due to bad translation of the color=black default option.

Incorrect. It segfaults because trans is NULL, because R_RGB_color()
is called before R_open_driver().

R_open_driver() or R__open_quiet() must be called before almost any
other R_* functions are called. The only exceptions are:

	R_parse_monitorcap
	R_set_update_function
	R_call_update_function
	R_has_update_function
	R_set_cancel
	R_get_cancel
	R_pad_freelist
	R_pad_perror

The old library would silently ignore any operations performed while
not connected to a driver.

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




More information about the grass-dev mailing list