[GRASS5] G_get_cat question

Glynn Clements glynn.clements at virgin.net
Mon Aug 13 10:15:25 EDT 2001

Markus Neteler wrote:

> while we are trying to fix all exceptions for d.vect.labels,
> we came across the problem that this new module (and also
> some other like v.area) crash when an entry in
> dig_cats/vectmap
> is missing (unlabeled vector).
> The cats are read through G_get_cats(), however, this function
> seems not to properly return NULL or whatever if the
> requested cat is not existing.
> Somehow it works for v.out.shape, we tried similar with no avail.
> As various modules are affected, we should eventually fix
> the G_get_cats() which segfaults if the requested cat is not present
> in dig_cats/vectmap.
> You could simulate this: just remove a line in a dig_cats/<vectmap>
> file and try v.area (click into the map, then the module crashes).

Not for me.

E.g. if I remove all of the non-NULL categories from
spearfish/PERMANENT/dig_cats/fields, then run "v.area fields", it just
doesn't display any category label.

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list