[GRASS-dev] Re: [bug #4725] "nviz vol=raster3d" lockup

NVIZ 3D raster volume works ok if loaded with:

nviz -q
Panel->Raster volumes
Add, etc.

but locks up NVIZ while setting up the menus (panel->volumes).

I can trace it through the following: the problem seems to be in the
C -> Tcl transition after the C parts have done their thing and try to
return the result. It only seems to fail when result=TCL_ERROR (ie 1),
so maybe a symptom of some other corruption)

[nviz2.2_script]
Nv_mkPanelMenu

[vol.tcl]
mkvolPanel
  create_isosurfs_subpanel
    update_isosurfs_subpanel
      set Nv_(ShadeStyle) [Nvol$curr isosurf get_drawmode]

[visualization/nviz/src/map_obj.c]
  Nmap_obj_cmd()
    isosurf()

[visualization/nviz/src/volume.c]
int isosurf_get_drawmode() {
  [...]
      else {
  Tcl_SetResult(interp,
              "Internal Error: unknown shade style returned in get_drawmode",
              TCL_VOLATILE);
    return (TCL_ERROR);
    }

it locks when Nv_mkPanelMenu() returns a value of 1 to update_isosurfs_subpanel.

[src/map_obj.c MODIFIED]
...
    else if (!strcmp(argv[1], "isosurf"))
{
int val;
val = isosurf(id, type, interp, argc, argv);
printf("==> val= %d\n", val);
fflush(stdout);
    return (val);
}

shows that isosurf() worked ok.

???
Hamish

Hamish wrote:

NVIZ 3D raster volume works ok if loaded with:

nviz -q
Panel->Raster volumes
Add, etc.

but locks up NVIZ while setting up the menus (panel->volumes).

that should be:

but locks up if NVIZ is started from the command line with
  nviz volume=raster_map3d

The freeze happens while setting up the menus (panel->volumes).

Hamish