[GRASS-dev] [bug #5037] (grass) GRASS 6.3: d.graph
Hamish
hamish_nospam at yahoo.com
Wed Sep 13 09:37:14 EDT 2006
> > 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)
..
Glynn:
> 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.
There's another problem, G_str_to_color() [lib/gis/color_str.c] returns
an error if a color is given as a R:G:B triplet.
It seems to work fine with triplets from other modules (d.vect).
e.g.:
G63> echo "symbol basic/box 16 50 50 green 50:50:50" | d.graph
WARNING: [50:50:50]: No such color
sscanf() fills red,green,blue with garbage? [which fails >255 test]
ret = sscanf (buf, "%d%[,:; ]%d%[,:; ]%d", red, temp, green, temp, blue);
I'm having no luck debugging this. R,G,B getting cast to another type
somehwhere????
?
thanks,
Hamish
More information about the grass-dev
mailing list