[GRASS-dev] Profiler updates

Hamish hamish_nospam at yahoo.com
Tue Feb 13 00:30:47 EST 2007


> Michael Barton wrote:
> > I thought of another potential problem but haven¹t found a way to
> > trap it. If you send r.profile any coordinates that extend beyond
> > the current region, it will crash and crash the entire GUI in spite
> > of the fact that the call to r.profile is trapped with a catch
> > statement. The profiler generates correct coordinates for any place
> > on the display, regardless of whether it extends beyond the region
> > boundaries or not. However, r.profile apparently chokes on
> > coordinates outside the region.
> > 
> > I¹m not sure if this can really be called a bug in r.profile, but it
> > should probably fail more gracefully.

Hamish:
> This is a bug in r.profile. Out of region values are not correct.

fixed in 6.2 and 6.3 cvs.

Now it exits with G_fatal_error() if a coordinate is outside of the
current region. (exit code 1)

gis.m still doesn't catch this, and dies with a "child process exited
abnormally" error. But at least it no longer outputs garbage data.


> r.profile out-of-region should report a "NULL" result (to stdout) and
> warning that the endpoint is out of region (G_warning() to stderr).

up for discussion. harder to do.



Hamish




More information about the grass-dev mailing list