[GRASS-dev] NVIZ now broken?

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.

--
Bob

(attachments)

map_obj_diff (783 Bytes)

Hi Bob,

great job! I could see the error now and identify it!

The tcl error is:

Index: panel_site.tcl

RCS file: /grassrepository/grass6/visualization/nviz/scripts/panel_site.tcl,v
retrieving revision 2.6
diff -u -r2.6 panel_site.tcl
--- panel_site.tcl 13 Nov 2006 16:33:33 -0000 2.6
+++ panel_site.tcl 16 Nov 2006 17:05:59 -0000
@@ -125,7 +125,7 @@
                -command "change_color site $row1.color"]
     bind $ptcolor <Expose> "$row1.color configure -bg \[get_curr_sv_color site\]"

- set markertype [ComboBox $row1.marker -label " marker type " -width 8 \
+ set markertype [ComboBox $row1.marker -width 8 \
        -textvariable Nv_(siteshape) -modifycmd change_marker \
        -values {"x" "sphere" "diamond" "cube" "box" "gyro" "aster" "histogram"}]

-label doesn't work here.

Whan I use your proposed changes and above fix, I see NVIZ again...

I'll leave it to you/Michael to submit changes.

Thanks,
Markus

On Thu, Nov 16, 2006 at 12:29:59PM -0400, 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.

--
Bob

--- map_obj.c 2006-11-16 12:22:16.000000000 -0400
+++ map_obj.c_bak 2006-11-16 12:21:56.000000000 -0400
@@ -437,6 +437,7 @@
     char const_string = "constant";
     char zero_string = "0";
     int new_id;
+ int mode;
     int *surf_list, num_surfs, i;
     Nv_clientData *new_data;
     int file_used = 0;
@@ -560,6 +561,7 @@
         return (TCL_ERROR);
     }
     new_id = GVL_new_vol();
+ mode = 0;

     /* See if there is a default file name specified */
     if ((argc >= 3) && (strncmp(argv[2], "name=", 5))) {
@@ -570,6 +572,9 @@
             return (TCL_ERROR);
     }
     file_used = 1;
+ mode |= DM_GOURAUD;
+ GVL_isosurf_set_drawmode(new_id, mode);
+ GVL_slice_set_drawmode(new_id, mode);
     }

     sprintf(id, "Nvol%d", new_id);

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

--
Markus Neteler <neteler itc it> http://mpa.itc.it/markus/
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

This is real weird.

The offending ComboxBox is a BWidgets widget. I used this for the express
reason of NOT breaking any older TclTk installations. The -label option is
also in other places such as the vector panel in the GIS Manager. No one
has reported a problem there.

BWidgets is sourced in the nviz startup script that calls the others.

Here's a thought.

$GISBASE/etc/nviz2.2/nviz2.2_script has the following statement at line 29..

package require BWidget

I'm wondering if you have another, more recent, BWidget installation
installed (with a ComboBox where -label doesn't work) and some way
accessible to TclTk without specific sourcing. Try replacing line 29 with
the following...

package require -exact BWidget 1.2.1

This will force nviz to use the BWidget package that comes with GRASS. This
package DOES have the -label option and it works.

I'm going to copy Glynn in case he has some insight.

Michael
__________________________________________
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

From: Markus Neteler <neteler@itc.it>
Date: Thu, 16 Nov 2006 18:08:01 +0100
To: Bob Covill <bcovill@tekmap.ns.ca>
Cc: Michael Barton <michael.barton@asu.edu>, GRASS developers list
<grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] NVIZ now broken?

Hi Bob,

great job! I could see the error now and identify it!

The tcl error is:

Index: panel_site.tcl

RCS file: /grassrepository/grass6/visualization/nviz/scripts/panel_site.tcl,v
retrieving revision 2.6
diff -u -r2.6 panel_site.tcl
--- panel_site.tcl 13 Nov 2006 16:33:33 -0000 2.6
+++ panel_site.tcl 16 Nov 2006 17:05:59 -0000
@@ -125,7 +125,7 @@
                -command "change_color site $row1.color"]
     bind $ptcolor <Expose> "$row1.color configure -bg \[get_curr_sv_color
site\]"

- set markertype [ComboBox $row1.marker -label " marker type " -width 8 \
+ set markertype [ComboBox $row1.marker -width 8 \
        -textvariable Nv_(siteshape) -modifycmd change_marker \
        -values {"x" "sphere" "diamond" "cube" "box" "gyro" "aster"
"histogram"}]

-label doesn't work here.

Whan I use your proposed changes and above fix, I see NVIZ again...

I'll leave it to you/Michael to submit changes.

Thanks,
Markus

On Thu, Nov 16, 2006 at 12:29:59PM -0400, 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.

--
Bob

--- map_obj.c 2006-11-16 12:22:16.000000000 -0400
+++ map_obj.c_bak 2006-11-16 12:21:56.000000000 -0400
@@ -437,6 +437,7 @@
     char const_string = "constant";
     char zero_string = "0";
     int new_id;
+ int mode;
     int *surf_list, num_surfs, i;
     Nv_clientData *new_data;
     int file_used = 0;
@@ -560,6 +561,7 @@
         return (TCL_ERROR);
     }
     new_id = GVL_new_vol();
+ mode = 0;

     /* See if there is a default file name specified */
     if ((argc >= 3) && (strncmp(argv[2], "name=", 5))) {
@@ -570,6 +572,9 @@
             return (TCL_ERROR);
}
file_used = 1;
+ mode |= DM_GOURAUD;
+ GVL_isosurf_set_drawmode(new_id, mode);
+ GVL_slice_set_drawmode(new_id, mode);
     }

     sprintf(id, "Nvol%d", new_id);

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

--
Markus Neteler <neteler itc it> http://mpa.itc.it/markus/
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

Hello Michael

On Thu, 16 Nov 2006, Michael Barton wrote:

This is real weird.

I can confirm the same problem as Markus, using ActiveState Tcl 8.4.13 on Windows. Markus' fix also worked for me. I didn't realise Nviz worked on native Windows actually until Yann Chemin's message yesterday. This is rather good. Need to use --with-opengl=windows in the configure script.

The offending ComboxBox is a BWidgets widget. I used this for the express
reason of NOT breaking any older TclTk installations. The -label option is
also in other places such as the vector panel in the GIS Manager. No one
has reported a problem there.

BWidgets is sourced in the nviz startup script that calls the others.

Here's a thought.

$GISBASE/etc/nviz2.2/nviz2.2_script has the following statement at line 29..

package require BWidget

I'm wondering if you have another, more recent, BWidget installation
installed (with a ComboBox where -label doesn't work) and some way
accessible to TclTk without specific sourcing. Try replacing line 29 with
the following...

package require -exact BWidget 1.2.1

Tried that change and made no difference.

Paul

This will force nviz to use the BWidget package that comes with GRASS. This
package DOES have the -label option and it works.

I'm going to copy Glynn in case he has some insight.

Michael
__________________________________________
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

From: Markus Neteler <neteler@itc.it>
Date: Thu, 16 Nov 2006 18:08:01 +0100
To: Bob Covill <bcovill@tekmap.ns.ca>
Cc: Michael Barton <michael.barton@asu.edu>, GRASS developers list
<grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] NVIZ now broken?

Hi Bob,

great job! I could see the error now and identify it!

The tcl error is:

Index: panel_site.tcl

RCS file: /grassrepository/grass6/visualization/nviz/scripts/panel_site.tcl,v
retrieving revision 2.6
diff -u -r2.6 panel_site.tcl
--- panel_site.tcl 13 Nov 2006 16:33:33 -0000 2.6
+++ panel_site.tcl 16 Nov 2006 17:05:59 -0000
@@ -125,7 +125,7 @@
                -command "change_color site $row1.color"]
     bind $ptcolor <Expose> "$row1.color configure -bg \[get_curr_sv_color
site\]"

- set markertype [ComboBox $row1.marker -label " marker type " -width 8 \
+ set markertype [ComboBox $row1.marker -width 8 \
        -textvariable Nv_(siteshape) -modifycmd change_marker \
        -values {"x" "sphere" "diamond" "cube" "box" "gyro" "aster"
"histogram"}]

-label doesn't work here.

Whan I use your proposed changes and above fix, I see NVIZ again...

I'll leave it to you/Michael to submit changes.

Thanks,
Markus

On Thu, Nov 16, 2006 at 12:29:59PM -0400, 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.

--
Bob

--- map_obj.c 2006-11-16 12:22:16.000000000 -0400
+++ map_obj.c_bak 2006-11-16 12:21:56.000000000 -0400
@@ -437,6 +437,7 @@
     char const_string = "constant";
     char zero_string = "0";
     int new_id;
+ int mode;
     int *surf_list, num_surfs, i;
     Nv_clientData *new_data;
     int file_used = 0;
@@ -560,6 +561,7 @@
         return (TCL_ERROR);
     }
     new_id = GVL_new_vol();
+ mode = 0;

     /* See if there is a default file name specified */
     if ((argc >= 3) && (strncmp(argv[2], "name=", 5))) {
@@ -570,6 +572,9 @@
             return (TCL_ERROR);
}
file_used = 1;
+ mode |= DM_GOURAUD;
+ GVL_isosurf_set_drawmode(new_id, mode);
+ GVL_slice_set_drawmode(new_id, mode);
     }

     sprintf(id, "Nvol%d", new_id);

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

--
Markus Neteler <neteler itc it> http://mpa.itc.it/markus/
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Markus:

>> The tcl error is:
>>
>> Index: panel_site.tcl
>> ===================================================================
>> RCS file:
>/grassrepository/grass6/visualization/nviz/scripts/panel_site.tcl,v >
>retrieving revision 2.6 > diff -u -r2.6 panel_site.tcl
>> --- panel_site.tcl 13 Nov 2006 16:33:33 -0000 2.6
>> +++ panel_site.tcl 16 Nov 2006 17:05:59 -0000
>> @@ -125,7 +125,7 @@
>> -command "change_color site $row1.color"]
>> bind $ptcolor <Expose> "$row1.color configure -bg
>\[get_curr_sv_color > site\]"
>>
>> - set markertype [ComboBox $row1.marker -label " marker type "
>-width 8 \ > + set markertype [ComboBox $row1.marker -width 8 \
>> -textvariable Nv_(siteshape) -modifycmd change_marker \
>> -values {"x" "sphere" "diamond" "cube" "box" "gyro" "aster"
>> "histogram"}]
>>
>> -label doesn't work here.

Michael:

> The offending ComboxBox is a BWidgets widget. I used this for the
> express reason of NOT breaking any older TclTk installations. The
> -label option is also in other places such as the vector panel in
> the GIS Manager. No one has reported a problem there.

Paul Kelly wrote:

I can confirm the same problem as Markus, using ActiveState Tcl 8.4.13
on Windows. Markus' fix also worked for me. I didn't realise Nviz
worked on native Windows actually until Yann Chemin's message
yesterday. This is rather good. Need to use --with-opengl=windows in
the configure script.

dumb guess: what if you strip away the spaces in

  -label " marker type "
to
  -label "marker type"
or
  -label "marker_type"

?
Hamish

On Sun, 19 Nov 2006, Hamish wrote:

Markus:

The tcl error is:

Index: panel_site.tcl

RCS file:

/grassrepository/grass6/visualization/nviz/scripts/panel_site.tcl,v >
retrieving revision 2.6 > diff -u -r2.6 panel_site.tcl

--- panel_site.tcl 13 Nov 2006 16:33:33 -0000 2.6
+++ panel_site.tcl 16 Nov 2006 17:05:59 -0000
@@ -125,7 +125,7 @@
                -command "change_color site $row1.color"]
     bind $ptcolor <Expose> "$row1.color configure -bg

\[get_curr_sv_color > site\]"

- set markertype [ComboBox $row1.marker -label " marker type "

-width 8 \ > + set markertype [ComboBox $row1.marker -width 8 \

        -textvariable Nv_(siteshape) -modifycmd change_marker \
        -values {"x" "sphere" "diamond" "cube" "box" "gyro" "aster"
"histogram"}]

-label doesn't work here.

[...]

dumb guess: what if you strip away the spaces in

-label " marker type "
to
-label "marker type"
or
-label "marker_type"

?

Just tried that with various combinations of spaces and no spaces, with and without quotes. Nothing seems to work apart from deleting the -label parameter entirely...

Paul

Paul,

Thanks much for the update. This is easy to fix in nviz. The widget label
can be provided by a separate label widget instead of using the ComboBox
-label option.

However, I'm much more concerned about the larger issue of the version of
bwidgets that GRASS depends on not working correctly. This same ComboBox
widget with -label option is used in a number of other places in the GUI
(such as the GIS Manager vector layer panel).

If it is failing in one place (nviz) it should be failing in all places if
this is a general problem. If it is only failing in nviz, there is some
other more fundamental problem that needs to be solved or I will have no
idea of what kinds of GUI options work and which do not.

I just tried the new nviz GUI updates on our FC4 system. I still have to
find out which version of TclTk it is running, but nviz works
fine--including the ComboBox with -label option. Given Paul's message, it
doesn't sound like it is limited to a particular version of TclTk or OS. So
something else is broken.

Michael

__________________________________________
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

From: Paul Kelly <paul-grass@stjohnspoint.co.uk>
Date: Sat, 18 Nov 2006 16:43:27 +0000 (GMT)
To: Hamish <hamish_nospam@yahoo.com>
Cc: <michael.barton@asu.edu>, <neteler@itc.it>, <bcovill@tekmap.ns.ca>,
<grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] NVIZ now broken?

On Sun, 19 Nov 2006, Hamish wrote:

Markus:

The tcl error is:

Index: panel_site.tcl

RCS file:

/grassrepository/grass6/visualization/nviz/scripts/panel_site.tcl,v >
retrieving revision 2.6 > diff -u -r2.6 panel_site.tcl

--- panel_site.tcl 13 Nov 2006 16:33:33 -0000 2.6
+++ panel_site.tcl 16 Nov 2006 17:05:59 -0000
@@ -125,7 +125,7 @@
                -command "change_color site $row1.color"]
     bind $ptcolor <Expose> "$row1.color configure -bg

\[get_curr_sv_color > site\]"

- set markertype [ComboBox $row1.marker -label " marker type "

-width 8 \ > + set markertype [ComboBox $row1.marker -width 8 \

        -textvariable Nv_(siteshape) -modifycmd change_marker \
        -values {"x" "sphere" "diamond" "cube" "box" "gyro" "aster"
"histogram"}]

-label doesn't work here.

[...]

dumb guess: what if you strip away the spaces in

-label " marker type "
to
-label "marker type"
or
-label "marker_type"

?

Just tried that with various combinations of spaces and no spaces, with
and without quotes. Nothing seems to work apart from deleting the -label
parameter entirely...

Paul

On Nov 18, 2006, at 7:39 AM, Paul Kelly wrote:

I can confirm the same problem as Markus, using ActiveState Tcl 8.4.13 on Windows. Markus' fix also worked for me. I didn't realise Nviz worked on native Windows actually until Yann Chemin's message yesterday. This is rather good. Need to use --with-opengl=windows in the configure script.

It didn't occur to me that it might matter until Paul mentioned NVIZ working on native Windows TclTk.

NVIZ in TclTk Aqua now works! This is in connection with bug #4768:

http://intevation.de/rt/webrt?serial_num=4768

Starting with today's snapshot (last time I checked and failed was Oct 23), I added Bob's map_obj.c patch and removed -label from panel_site.tcl, and configured and built for opengl=aqua. Can others test to verify? I only tested with those patches (not without), and on OS 10.4.8/Xcode 2.4.1 + ActiveTcl 8.4.13, so far.

-----
William Kyngesburye <kyngchaos@kyngchaos.com>
http://www.kyngchaos.com/

Theory of the Universe

There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened.

-Hitchhiker's Guide to the Galaxy 2nd season intro

Michael,

as far as I see the ComboBox is used in a different way:

mapprint.tcl: ComboBox $row.c -label "" -width 20 -textvariable psprint::paper_preset \
vector.tcl: ComboBox $row.b -label [G_msg "label part to align with vector point"] \
vector.tcl: ComboBox $row.c -label [G_msg " justification"] \

-> note G_msg in vector.tcl

while it was in NVIZ:
set markertype [ComboBox $row1.marker -label " marker type " -width 8 \

?
Markus

On Sat, Nov 18, 2006 at 10:40:03AM -0700, Michael Barton wrote:

Paul,

Thanks much for the update. This is easy to fix in nviz. The widget label
can be provided by a separate label widget instead of using the ComboBox
-label option.

However, I'm much more concerned about the larger issue of the version of
bwidgets that GRASS depends on not working correctly. This same ComboBox
widget with -label option is used in a number of other places in the GUI
(such as the GIS Manager vector layer panel).

If it is failing in one place (nviz) it should be failing in all places if
this is a general problem. If it is only failing in nviz, there is some
other more fundamental problem that needs to be solved or I will have no
idea of what kinds of GUI options work and which do not.

I just tried the new nviz GUI updates on our FC4 system. I still have to
find out which version of TclTk it is running, but nviz works
fine--including the ComboBox with -label option. Given Paul's message, it
doesn't sound like it is limited to a particular version of TclTk or OS. So
something else is broken.

Michael

__________________________________________
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

> From: Paul Kelly <paul-grass@stjohnspoint.co.uk>
> Date: Sat, 18 Nov 2006 16:43:27 +0000 (GMT)
> To: Hamish <hamish_nospam@yahoo.com>
> Cc: <michael.barton@asu.edu>, <neteler@itc.it>, <bcovill@tekmap.ns.ca>,
> <grass-dev@grass.itc.it>
> Subject: Re: [GRASS-dev] NVIZ now broken?
>
>
>
> On Sun, 19 Nov 2006, Hamish wrote:
>
>> Markus:
>>>>> The tcl error is:
>>>>>
>>>>> Index: panel_site.tcl
>>>>> ===================================================================
>>>>> RCS file:
>>>> /grassrepository/grass6/visualization/nviz/scripts/panel_site.tcl,v >
>>>> retrieving revision 2.6 > diff -u -r2.6 panel_site.tcl
>>>>> --- panel_site.tcl 13 Nov 2006 16:33:33 -0000 2.6
>>>>> +++ panel_site.tcl 16 Nov 2006 17:05:59 -0000
>>>>> @@ -125,7 +125,7 @@
>>>>> -command "change_color site $row1.color"]
>>>>> bind $ptcolor <Expose> "$row1.color configure -bg
>>>> \[get_curr_sv_color > site\]"
>>>>>
>>>>> - set markertype [ComboBox $row1.marker -label " marker type "
>>>> -width 8 \ > + set markertype [ComboBox $row1.marker -width 8 \
>>>>> -textvariable Nv_(siteshape) -modifycmd change_marker \
>>>>> -values {"x" "sphere" "diamond" "cube" "box" "gyro" "aster"
>>>>> "histogram"}]
>>>>>
>>>>> -label doesn't work here.
> [...]
>> dumb guess: what if you strip away the spaces in
>>
>> -label " marker type "
>> to
>> -label "marker type"
>> or
>> -label "marker_type"
>>
>> ?
>
> Just tried that with various combinations of spaces and no spaces, with
> and without quotes. Nothing seems to work apart from deleting the -label
> parameter entirely...
>
> Paul
>

--
Markus Neteler <neteler itc it> http://mpa.itc.it/markus/
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

Thanks Markus. I'm taking this to also indicate that you have no problem
with ComboBox and its labels in the vector panel.

The [G_msg "text..."] clause simply means to get the label from running the
G_msg on some text. I think that the G_msg procedure is for helping with
internationalization. It should probably be implemented throughout NVIZ
(where it is not used at all).

It *should not* make any difference to the operation of ComboBox. If
anything, ComboBox statements using a [G_msg] clause are more likely to fail
simply because it's calling an external procedure.

That said, I'll commit a version of panel_site.tcl using [G_msg] to test
tomorrow if I can. Then we can see if this is a fix. If so, it's still a
bandaid, but at least one that is consistent with the rest of the GUI code.
My bets are on it not working.

As it is, ComboBox -label works on my Mac and on our FC4 system. It doesn't
work on your box or on at least one Windows system reported, but only in
NVIZ AFAIK.

Michael
__________________________________________
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

From: Markus Neteler <neteler@itc.it>
Date: Sat, 18 Nov 2006 22:05:08 +0100
To: <grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] NVIZ now broken?

Michael,

as far as I see the ComboBox is used in a different way:

mapprint.tcl: ComboBox $row.c -label "" -width 20 -textvariable
psprint::paper_preset \
vector.tcl: ComboBox $row.b -label [G_msg "label part to align with vector
point"] \
vector.tcl: ComboBox $row.c -label [G_msg " justification"] \

-> note G_msg in vector.tcl

while it was in NVIZ:
set markertype [ComboBox $row1.marker -label " marker type " -width 8 \

?
Markus

On Sat, Nov 18, 2006 at 10:40:03AM -0700, Michael Barton wrote:

Paul,

Thanks much for the update. This is easy to fix in nviz. The widget label
can be provided by a separate label widget instead of using the ComboBox
-label option.

However, I'm much more concerned about the larger issue of the version of
bwidgets that GRASS depends on not working correctly. This same ComboBox
widget with -label option is used in a number of other places in the GUI
(such as the GIS Manager vector layer panel).

If it is failing in one place (nviz) it should be failing in all places if
this is a general problem. If it is only failing in nviz, there is some
other more fundamental problem that needs to be solved or I will have no
idea of what kinds of GUI options work and which do not.

I just tried the new nviz GUI updates on our FC4 system. I still have to
find out which version of TclTk it is running, but nviz works
fine--including the ComboBox with -label option. Given Paul's message, it
doesn't sound like it is limited to a particular version of TclTk or OS. So
something else is broken.

Michael

__________________________________________
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

From: Paul Kelly <paul-grass@stjohnspoint.co.uk>
Date: Sat, 18 Nov 2006 16:43:27 +0000 (GMT)
To: Hamish <hamish_nospam@yahoo.com>
Cc: <michael.barton@asu.edu>, <neteler@itc.it>, <bcovill@tekmap.ns.ca>,
<grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] NVIZ now broken?

On Sun, 19 Nov 2006, Hamish wrote:

Markus:

The tcl error is:

Index: panel_site.tcl

RCS file:

/grassrepository/grass6/visualization/nviz/scripts/panel_site.tcl,v >
retrieving revision 2.6 > diff -u -r2.6 panel_site.tcl

--- panel_site.tcl 13 Nov 2006 16:33:33 -0000 2.6
+++ panel_site.tcl 16 Nov 2006 17:05:59 -0000
@@ -125,7 +125,7 @@
                -command "change_color site $row1.color"]
     bind $ptcolor <Expose> "$row1.color configure -bg

\[get_curr_sv_color > site\]"

- set markertype [ComboBox $row1.marker -label " marker type "

-width 8 \ > + set markertype [ComboBox $row1.marker -width 8 \

        -textvariable Nv_(siteshape) -modifycmd change_marker \
        -values {"x" "sphere" "diamond" "cube" "box" "gyro" "aster"
"histogram"}]

-label doesn't work here.

[...]

dumb guess: what if you strip away the spaces in

-label " marker type "
to
-label "marker type"
or
-label "marker_type"

?

Just tried that with various combinations of spaces and no spaces, with
and without quotes. Nothing seems to work apart from deleting the -label
parameter entirely...

Paul

--
Markus Neteler <neteler itc it> http://mpa.itc.it/markus/
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy

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