[GRASS-dev] [bug #4725] NVIZ now broken?

Hamish hamish_nospam at yahoo.com
Mon Nov 20 00:18:20 EST 2006


Bob Covill wrote:
> Hello,
> 
> I have been looking into why nviz fails when loading a volume from the
> command line (i.e. nviz vol=precip3d.500z50). This is the bug reported
> in 
> http://intevation.de/rt/webrt?serial_num=4725
> 
> It appears that the volume drawmode is not initialized which causes
> the GUI to hang when loading the volume panel. The attached patch for
> map_obj.c in nviz/src should fix this. 


Hi,

still some problems for me :-/

debian/stable, tcltk 8.3, 32bit Pentium 4. Working with 6.2.0 source.
This doesn't add the complication of new & untested tcl code (so
Markus's patch isn't needed), and is the version needed for immediate
testing of 6.2.1.


trying the map_obj.c test with 6.2.0 source code and vox50 example:
  http://grass.gdf-hannover.de/wiki/Help_with_3D#Examples

In nviz/script/nviz2.2_script line 18 I changed DEBUG to 1.


__ without patch: __

[G> nviz vol=vox50] it stalls on "Nv_mkPanelMenu 2 2  Vector Points"
NVIZ window all white with only "File" and "Help" menus, "Please
wait..." window is there too. windows are locked but % prompt in the
terminal is responsive.

[G> nviz -q, then Panel->Raster volumes]  it all works.
 (after puting lots of debug msgs in lib/ogsf/, now it breaks on [Add]?)


__ with map_obj.c patch: __

(and Soeren's "geovol_file *vf = NULL;" patch from the bug report)

[G> nviz vol=vox50] starts ok. 

But then it segfaults as soon as I try and add an isosurface.
Sometimes have to wait until second isosurface is added for the
segfault, other times it works.

with "nviz -q" I get the same segfault (sometimes).
switching between "nviz -q" and "nviz vol=vox50" makes it break pretty
reliably.


I can trace it here:

The READ defined at the top of gvld.c:
  #define READ() gvl_read_char(pos[i]++, gvl->isosurf[i]->data)
(there is also another slightly different READ in gvl_calc.c)

called by:
lib/ogsf/gvld.c   gvld_isosurf()
...
		    /* read cube index */
		    if (nz[i] != 0) {
			nz[i]--;
			continue;
		    }
		    else {
printf("in gvld_iso  i=%d pos=%d\n", i, pos[i]++);
printf("in gvld_iso  data=%x\n", gvl->isosurf[i]->data);
			c_ndx = READ();
...
from those printf's I get:
  in gvld_iso  i=0 pos=0
  in gvld_iso  data=0

and immediately in READ() [gvl_read_char()] I get

lib/ogsf/gvl_calc.c  gvl_read_char()
  pos=1073790160
  data=4000bcd0


?
Hamish




More information about the grass-dev mailing list