[GRASS5] [bug #4178] (grass) r.stats segfault

this bug's URL: http://intevation.de/rt/webrt?serial_num=4178
-------------------------------------------------------------------------

Subject: r.stats segfault

Platform: GNU/Linux/x86
grass binary for platform: Compiled from Sources
GRASS Version: grass-6.1.cvs_src_snapshot_2006_01_21

Running the following segfaults, r.stats should exit gracefully with an invalid map list:

r.stats -a input=

r.stats: Segmentation fault

Should be simple to fix :slight_smile:

Cheers,Joel

-------------------------------------------- Managed by Request Tracker

this bug's URL: http://intevation.de/rt/webrt?serial_num=4178
---------------------------------------------------------------------

Subject: r.stats segfault

..

Running the following segfaults, r.stats should exit gracefully with
an invalid map list:

> r.stats -a input=
r.stats: Segmentation fault
>

Should be simple to fix :slight_smile:

Done. More interesting is that this one works:
G> r.series in= out=foo meth=average
100%

(full of nan, but I use gcc -g..)

Maybe a general fix in lib/gis/parser.c is needed for ->answers?

Hamish

this bug's URL: http://intevation.de/rt/webrt?serial_num=4178
---------------------------------------------------------------------

Subject: r.stats segfault

Running the following segfaults, r.stats should exit gracefully with
an invalid map list:

> r.stats -a input=
r.stats: Segmentation fault

These modules should be checked & fixed if needed before closing this bug:

r.buffer
r.cats
r.circle
r.compress
r.contour
r.cost
r.covar
r.cross
r.distance
r.drain
r.fill.dir
r.le
r.los
r.null
r.out.mpeg
r.out.vtk
r.profile
r.quant
r.random.surface
r.report
r.rescale
r.rescale.eq
r.to.rast3
r.transect
r.walk
r.water.outlet
r.what
wildfire/

base/
r3.mkdspf
r3.out.vtk
r3.to.rast

v.build
v.category
v.clean
v.distance
v.extract
v.extrude
v.in.dwg
v.in.ogr
v.label
v.mkgrid
v.net.iso
v.normal
v.overlay
v.patch
v.to.db
v.type
v.what

d.ask
d.barscale
d.geodesic
d.grid
d.legend
d.linegraph
d.nviz
d.rast
d.rhumbline
d.save
d.text
d.text.freetype
d.vect
d.vect.chart
d.what.rast
d.what.vect
d.zoom

g.mapsets
g.pnmcomp
g.region
manage/

if(! option->answer)
  G_fatal_error(..);

doesn't get triggered,

if(option->answers[0] == NULL )
  G_fatal_error(..);

does.

Hamish