[GRASS-dev] Re: [bug #4725] (grass) nviz crashed while volume
visualisation
Glynn Clements
glynn at gclements.plus.com
Sun Jul 9 17:00:45 EDT 2006
Soeren Gebbert wrote:
> > and then *gvl to gvl_get_vol() in lib/ogsf/gvl.c, but then I get lost.
>
> > uninit'd variable?
> > Hamish
>
> Looks like.
> If nviz is called with -q and a volume + isosurfaces are added -> nviz segfaults.
> I have corrected the uninitialized variable:
>
> cvs server: Diffing .
> Index: gvl_calc.c
> ===================================================================
> RCS file: /home/grass/grassrepository/grass6/lib/ogsf/gvl_calc.c,v
> retrieving revision 1.3
> diff -u -r1.3 gvl_calc.c
> --- gvl_calc.c 9 Feb 2006 03:08:57 -0000 1.3
> +++ gvl_calc.c 9 Jul 2006 13:48:54 -0000
> @@ -444,7 +444,7 @@
> {
> int x, y, z;
> int i, a, read;
> - geovol_file *vf;
> + geovol_file *vf = NULL;
> geovol_isosurf *isosurf;
>
> data_buffer *dbuff;
>
>
> and it works for me now. But i am not sure if this realy fixed the
> problem.
I don't think so. In that function (gvl_isosurf_calc), "vf" is only
read if the variable "read" is non-zero. But the only places which set
"read" also set "vf":
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list