#902: nviz (tcl) fails on wingrass
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: NVIZ | Version: svn-trunk
Resolution: | Keywords:
Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):
Replying to [comment:18 hamish]:
> > This doesn't allow the nviz binary to be used to run arbitrary
> > scripts, but I'm not so sure that works anyhow.
>
> do you mean nvwish running arbitrary Tcl scripts (no loss) or the
ability to use the script= option (which is used by d.nviz to set up the
'flight path' for animations).
I meant "nviz -f <script>", but I think I got that working with r40879. I
discovered that nviz2.2_script uses "exec nviz -f ..." in several places
(it's relying upon the "#!nviz" to which I don't expect to work).
If `argv[1]` is "-f", main() skips the G_parser() stuff and calls
Tk_Main() with the unmodified argument list. IOW, nviz behaves like wish.
If `argv[1]` isn't "-f", main() calls G_parser() on the original command
line. If G_parser() returns successfully (--help etc all cause G_parser()
to call exit()), it then calls Tk_Main() with a fabricated command line:
"nviz -f .../nviz2.2_script" with no further arguments. IOW, nviz behaves
like a GRASS module; all command-line processing is done by G_parser()
before Tcl/Tk gets involved.
#902: nviz (tcl) fails on wingrass
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: NVIZ | Version: svn-trunk
Resolution: | Keywords:
Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):
Replying to [comment:19 hamish]:
> With the latest nightly WinGrass 6.4.0svn build (r40876), I get this
error message if 'nviz --ui' is called from the msys command line,
elev=elevation.dem@PERM, and the '-v' verbose flag is ticked (one -, not
two).
> the popup window error is:
{{{
unknown or ambiguous visual name "elevation=elevation@PERMANENT":
}}}
Tk uses -v itself (it's an abbreviation for -visual). This specific issue
can be worked around by using "--" in the nviz script, i.e.
{{{
-exec "$GISBASE/etc/nviz2.2/nviz" -f
"$GISBASE/etc/nviz2.2/scripts/nviz2.2_script" ${1+"$@"}
+exec "$GISBASE/etc/nviz2.2/nviz" -f
"$GISBASE/etc/nviz2.2/scripts/nviz2.2_script" -- ${1+"$@"}
}}}
But I'm more inclined to suggest back-porting r40879. I think that's bound
to be the most robust solution.
#902: nviz (tcl) fails on wingrass
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: NVIZ | Version: svn-trunk
Resolution: | Keywords:
Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by hamish):
Following the conservative path of least change I've committed the "--"
solution to the 6.4 branch. For wider testing I'd like to backported
r40879 to the 6.5 branch, but I got stuck in the merge conflicts. I had to
comment out Vars.make as it doesn't exist and getCat.c was failing because
it couldn't find V2_area_att() and V2_line_att(). I'm not sure where those
are supposed to come from.
#902: nviz (tcl) fails on wingrass
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: NVIZ | Version: svn-trunk
Resolution: | Keywords:
Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by glynn):
Replying to [comment:22 hamish]:
> Following the conservative path of least change I've committed the "--"
solution to the 6.4 branch. For wider testing I'd like to backported
r40879 to the 6.5 branch, but I got stuck in the merge conflicts. I had to
comment out Vars.make as it doesn't exist and getCat.c was failing because
it couldn't find V2_area_att() and V2_line_att(). I'm not sure where those
are supposed to come from.
r40879 doesn't touch those files.
I've found using "svn merge" between branches is more trouble than it's
worth. It's easier to use e.g.:
{{{
cd /path/to/7.0.svn
svn diff -c 40879 > nviz.patch
cd ../6.5
patch -p0 < ../7.0.svn/nviz.patch
}}}
This still produces some failures, but it doesn't try to merge unrelated
changes.
I'm test-compiling a manual back-port at the moment; I'll attach the patch
one I've verified that it compiles.
#902: nviz (tcl) fails on wingrass
-----------------------+----------------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: critical | Milestone: 6.4.0
Component: NVIZ | Version: svn-trunk
Resolution: | Keywords:
Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Comment (by hellik):
Replying to [comment:24 glynn]:
> Replying to [comment:23 glynn]:
>
> > I'm test-compiling a manual back-port at the moment; I'll attach the
patch one I've verified that it compiles.
>
> Verified, attached.
still valid this report? I've tested nviz by self-compiled latest grass64-
and grass65-svn in the osgeo4w-stack on WinVista, nviz is starting and
working.
closing report as everything is pretty much working now. Purposefully
ignoring any remaining single-dash -v flag issues, if they still exist, as
corner cases.