[GRASS-dev] Re: [GRASS GIS] #902: nviz (tcl) fails on wingrass

GRASS GIS trac at osgeo.org
Fri Feb 5 15:14:03 EST 2010


#902: nviz (tcl) fails on wingrass
-----------------------+----------------------------------------------------
  Reporter:  hamish    |       Owner:  grass-dev at 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:8 hamish]:

 > > One solution is to simply force `argv[0]` to "nviz" unless
 > > script_mode is set.
 >
 > ( source:grass/trunk/visualization/nviz/src/nviz_init.c, r40784)
 >
 > I tried with DEBUG=2 but it dies before getting to the `G_debug(2,
 "nviz_init:arg*` lines in nviz_init.c.
 >
 > It dies in the same way on trunk + linux too.

 Oops; moving `argv[0]` to a separate argument also needs this:
 {{{
 -    if ((strstr(argv[0], "nviz") != NULL) && (!demo->answer)) {
 +    if ((strstr(argv0, "nviz") != NULL) && (!demo->answer)) {
 }}}

 > what does ~/.nvizrc do? it is just ~/.nvwishrc by another name?

 Yes. It's the setting for tcl_rcFilename.

 > to be honest nviz's startup method is (and always has been) about as
 confusing to me as the custom osgeo4w grass64.bat startup method is.

 The documentation for embedding Tcl/Tk assumes that you want to write a
 custom tclsh/wish, with the normal argument processing (i.e. -f), which
 gets in the way of G_parser(). Apart from the lack of documentation on
 doing otherwise, some of the NVIZ scripts require it to work that way
 (i.e. scripts/script_* starting with "#!nviz -f").

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/902#comment:9>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list