Hi,
in the recent restructuring of NVIZ the volume
was apparently not tested:
Dataset (9.3MB):
http://mpa.itc.it/grasstutor/data7/slovakia3d.tar.gz
grass63 ~/grassdata/slovakia3d/PERMANENT/
nviz el=dem500 vol=precip3d.500z50
Loading Data
Update elev null mask
Loading Data
translating colors from fp
recalculating normals...
Error in startup script: Internal Error: unknown shade style returned in get_drawmode
while executing
"Nvol$curr slice get_drawmode"
It would be good to get that fixed,
Markus
For the interface restructuring, I extensively tested the volume module and
have used it a number of times since I updated.
I've hit this error before in different contexts. The most recent setting
was launching nviz with 2 elevation maps specified. There was no problem
when launching nviz with 1 elevation map and subsequently opening another
after nviz launched. I was about to report this, but it appeared fixed after
a cvs update a few weeks back.
It is some other kind of bug, but I don't know what is setting it off. Have
there been any recent changes to nviz code in the past 3-4 weeks? (I haven't
done any).
Michael
On 2/21/07 4:20 AM, "Markus Neteler" <neteler@itc.it> wrote:
Hi,
in the recent restructuring of NVIZ the volume
was apparently not tested:
Dataset (9.3MB):
http://mpa.itc.it/grasstutor/data7/slovakia3d.tar.gz
grass63 ~/grassdata/slovakia3d/PERMANENT/
nviz el=dem500 vol=precip3d.500z50
Loading Data
Update elev null mask
Loading Data
translating colors from fp
recalculating normals...
Error in startup script: Internal Error: unknown shade style returned in
get_drawmode
while executing
"Nvol$curr slice get_drawmode"
It would be good to get that fixed,
Markus
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
Markus Neteler wrote on 02/21/2007 12:20 PM:
Hi,
in the recent restructuring of NVIZ the volume
was apparently not tested:
Dataset (9.3MB):
http://mpa.itc.it/grasstutor/data7/slovakia3d.tar.gz
grass63 ~/grassdata/slovakia3d/PERMANENT/
nviz el=dem500 vol=precip3d.500z50
Loading Data
Update elev null mask
Loading Data
translating colors from fp
recalculating normals...
Error in startup script: Internal Error: unknown shade style returned in get_drawmode
while executing
"Nvol$curr slice get_drawmode"
The problem is in
visualization/nviz/src/map_obj.c
line 833 etc read like this (G_debug() I have added for me only):
/* Parse mode returned for shade style and surface style */
G_debug(0,"mode: %d",mode);
if (mode & DM_GOURAUD)
strcpy(shade, "gouraud");
else if (mode & DM_FLAT)
strcpy(shade, "flat");
else {
Tcl_SetResult(interp,
"Internal Error: unknown shade style returned in
get_drawmode",
TCL_VOLATILE);
return (TCL_ERROR);
}
Result is:
D0/0: mode: 2308
Error in startup script: Internal Error: unknown shade style returned in
get_drawmode
while executing
"Nvol$curr slice get_drawmode"
In
include/gsurf.h
are definitions for:
/* surface display modes */
#define DM_GOURAUD 0x00000100
#define DM_FLAT 0x00000200 /* defined for symmetry */
#define DM_FRINGE 0x00000010
#define DM_WIRE 0x00000001
#define DM_COL_WIRE 0x00000002
#define DM_POLY 0x00000004
#define DM_WIRE_POLY 0x00000008
#define DM_GRID_WIRE 0x00000400
#define DM_GRID_SURF 0x00000800
Not sure what mode = 2308 means...
Markus
Markus Neteler wrote:
> in the recent restructuring of NVIZ the volume
> was apparently not tested:
>
> Dataset (9.3MB):
> http://mpa.itc.it/grasstutor/data7/slovakia3d.tar.gz
>
> grass63 ~/grassdata/slovakia3d/PERMANENT/
> nviz el=dem500 vol=precip3d.500z50
> Loading Data
> Update elev null mask
> Loading Data
> translating colors from fp
> recalculating normals...
> Error in startup script: Internal Error: unknown shade style returned in get_drawmode
> while executing
> "Nvol$curr slice get_drawmode"
>
The problem is in
visualization/nviz/src/map_obj.c
line 833 etc read like this (G_debug() I have added for me only):
/* Parse mode returned for shade style and surface style */
G_debug(0,"mode: %d",mode);
if (mode & DM_GOURAUD)
strcpy(shade, "gouraud");
else if (mode & DM_FLAT)
strcpy(shade, "flat");
else {
Tcl_SetResult(interp,
"Internal Error: unknown shade style returned in get_drawmode",
TCL_VOLATILE);
return (TCL_ERROR);
}
Result is:
D0/0: mode: 2308
Error in startup script: Internal Error: unknown shade style returned in
get_drawmode
while executing
"Nvol$curr slice get_drawmode"
In
include/gsurf.h
are definitions for:
/* surface display modes */
#define DM_GOURAUD 0x00000100
#define DM_FLAT 0x00000200 /* defined for symmetry */
#define DM_FRINGE 0x00000010
#define DM_WIRE 0x00000001
#define DM_COL_WIRE 0x00000002
#define DM_POLY 0x00000004
#define DM_WIRE_POLY 0x00000008
#define DM_GRID_WIRE 0x00000400
#define DM_GRID_SURF 0x00000800
Not sure what mode = 2308 means...
2308 decimal == 0x904 == DM_GRID_SURF|DM_GOURAUD|DM_POLY
IOW, I have no clue what's going on here.
--
Glynn Clements <glynn@gclements.plus.com>
This is a question for Bob I think.
Michael
On 2/23/07 8:23 AM, "Markus Neteler" <neteler@itc.it> wrote:
Markus Neteler wrote on 02/21/2007 12:20 PM:
Hi,
in the recent restructuring of NVIZ the volume
was apparently not tested:
Dataset (9.3MB):
http://mpa.itc.it/grasstutor/data7/slovakia3d.tar.gz
grass63 ~/grassdata/slovakia3d/PERMANENT/
nviz el=dem500 vol=precip3d.500z50
Loading Data
Update elev null mask
Loading Data
translating colors from fp
recalculating normals...
Error in startup script: Internal Error: unknown shade style returned in
get_drawmode
while executing
"Nvol$curr slice get_drawmode"
The problem is in
visualization/nviz/src/map_obj.c
line 833 etc read like this (G_debug() I have added for me only):
/* Parse mode returned for shade style and surface style */
G_debug(0,"mode: %d",mode);
if (mode & DM_GOURAUD)
strcpy(shade, "gouraud");
else if (mode & DM_FLAT)
strcpy(shade, "flat");
else {
Tcl_SetResult(interp,
"Internal Error: unknown shade style returned in
get_drawmode",
TCL_VOLATILE);
return (TCL_ERROR);
}
Result is:
D0/0: mode: 2308
Error in startup script: Internal Error: unknown shade style returned in
get_drawmode
while executing
"Nvol$curr slice get_drawmode"
In
include/gsurf.h
are definitions for:
/* surface display modes */
#define DM_GOURAUD 0x00000100
#define DM_FLAT 0x00000200 /* defined for symmetry */
#define DM_FRINGE 0x00000010
#define DM_WIRE 0x00000001
#define DM_COL_WIRE 0x00000002
#define DM_POLY 0x00000004
#define DM_WIRE_POLY 0x00000008
#define DM_GRID_WIRE 0x00000400
#define DM_GRID_SURF 0x00000800
Not sure what mode = 2308 means...
Markus
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
Hi all,
Bob was so kind to fix the NVIZ volume problem in CVS.
Please test it, too.
thanks, Bob!
Markus
On Tue, Apr 03, 2007 at 02:17:42PM -0300, Bob Covill wrote:
Hi Markus,
I have submitted the fix to CVS. I have tested it by loading both from
the command line and the GUI, and it seems to work. If you could also
test to make sure this does not break anything else.
--
Bob
On Tue, 2007-04-03 at 17:36 +0200, Markus Neteler wrote:
> Hi Bob,
>
> On Tue, Apr 03, 2007 at 12:01:45PM -0300, Bob Covill wrote:
> > Hi Markus,
> >
> > This does seem to be a mystery. I tried "g.region -dp" and it still
> > worked?
>
> I am on a 64bit box, may this be the difference? Or Redhat,
> or the gcc version or...
>
> > I then traced the error messages from below. I looked at how volumes are
> > loaded from the command line it appears that none of the attributes are
> > set (which is why it is complaining). When loaded from inside nviz there
> > is a call to Nnew_map_obj (to load the file) and then set_att to set the
> > attributes.
> >
> > I have attached a test version of map_obj.c from nviz/src for you to
> > try. Essentially I set some default atts when a volume is loaded. So
> > when you run
> > nviz el=dem500 vol=precip3d.500z50
> > you should see
> > Loading Data
> > Update elev null mask
> > Loading Data
> > translating colors from fp
> > VOL DEBUG: set vol atts for 81721
> > VOL DEBUG: done setting vol pars
> > recalculating normals...
> >
> > If this still crashes then there is something else going on, but we can
> > eliminate the above. If this does fix it then we should try and clean up
> > how volumes are loaded.
> >
> > I will keep my fingers crossed!
>
> Great job!! It works!!
> I don't manage to crash it any more... please submit it
> to CVS.
>
> thanks a million,
>
> Markus