[GRASS-dev] [GRASS GIS] #1515: nviz fails to launch from the command line

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.2
Component: Python | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------
Hi,

something wrong with the module GUI magic in lib/python/task.py or
gui/wxpython/gui_modules/menuform.py in 6.4svn:

{{{
GRASS64svn> g.gisenv GRASS_GUI
text

GRASS64svn> nviz
}}}
(popup window)
{{{
Unable to fetch interface description for command 'nviz2.2_script'.
Details: [Errno 2] No such file or directory
Try to set up GRASS_ADDON_PATH variable.
}}}

workaround: use the tcl/tk module gui, which works ok:
{{{
   g.gui tcltk -u -n
   nviz
}}}

`nviz --ui` also fails in 6.4svn.

`nviz --interface-description` works as expected, including module
description.

in devbr6 the module GUI launches, with or without `--ui`.

in trunk `nviz --ui` works to bring up the module GUI.

thanks,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1515&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.2
Component: Python | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by hamish):

d.rast3d in devbr6 has the same problem.
  wxGUI layer manager -> add various raster -> Add 3D raster map

(I thought there was a tooltip to say that only did something in 3D view
(wxNviz) mode? right now it just quietly renders nothing in 2D view mode
AFAICT)

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1515#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.2
Component: Python | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by martinl):

Replying to [ticket:1515 hamish]:
> something wrong with the module GUI magic in lib/python/task.py or
gui/wxpython/gui_modules/menuform.py in 6.4svn:

no, the root of the problem is GRASS parser, not any GUI magic.

To get wxGUI dialog the executable need to be in PATH, see
[source:grass/branches/releasebranch_6_4/lib/gis/parser.c#L2016 parser.c].

In this case `$GISBASE//etc/nviz2.2/scripts` is not in the PATH.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1515#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.2
Component: Python | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by martinl):

Replying to [comment:1 hamish]:
> d.rast3d in devbr6 has the same problem.
> wxGUI layer manager -> add various raster -> Add 3D raster map

fixed in r49877

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1515#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.2
Component: Python | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by hamish):

Replying to [comment:2 martinl]:
> Replying to [ticket:1515 hamish]:
> > something wrong with the module GUI magic in lib/python/task.py or
gui/wxpython/gui_modules/menuform.py in 6.4svn:
>
> no, the root of the problem is GRASS parser, not any GUI magic.
>
> To get wxGUI dialog the executable need to be in PATH, see
[source:grass/branches/releasebranch_6_4/lib/gis/parser.c#L2016 parser.c].
>
> In this case `$GISBASE//etc/nviz2.2/scripts` is not in the PATH.

it launches fine with GRASS_GUI=tcltk, so how does G_gui_tcltk() make it
work?

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1515#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.2
Component: Python | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by glynn):

Replying to [comment:4 hamish]:
> it launches fine with GRASS_GUI=tcltk, so how does G_gui_tcltk() make it
work?
G_gui_tcltk() doesn't require the module to be in the path. Instead, it
executes "wish", and writes !Tcl/Tk code (based upon the module's options)
to its stdin.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1515#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.2
Component: Python | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by martinl):

Replying to [comment:4 hamish]:
> Replying to [comment:2 martinl]:
> > Replying to [ticket:1515 hamish]:
> > > something wrong with the module GUI magic in lib/python/task.py or
gui/wxpython/gui_modules/menuform.py in 6.4svn:
> >
> > no, the root of the problem is GRASS parser, not any GUI magic.
> >
> > To get wxGUI dialog the executable need to be in PATH, see
[source:grass/branches/releasebranch_6_4/lib/gis/parser.c#L2016 parser.c].
> >
> > In this case `$GISBASE//etc/nviz2.2/scripts` is not in the PATH.

It works in G65 because `bin/nviz` is a binary, but in G64 it's just a
bash script which calls `nviz2.2_script`.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1515#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.2
Component: Python | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by martinl):

Replying to [comment:6 martinl]:

> > > In this case `$GISBASE//etc/nviz2.2/scripts` is not in the PATH.
>
> It works in G65 because `bin/nviz` is a binary, but in G64 it's just a
bash script which calls `nviz2.2_script`.

I don't know why nviz is so different in `devbr6` compared to `relbr64`.
It should be checked by someone who knows Nviz, otherwise I would hesitate
to mark this bug as `blocker`.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1515#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.2
Component: wxGUI | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------
Changes (by martinl):

  * component: Python => wxGUI

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1515#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.2
Component: wxGUI | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by hamish):

(I'll look into the script vs binary a little more, but it might a few
days)

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1515#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.2
Component: wxGUI | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by glynn):

Replying to [comment:9 hamish]:
> (I'll look into the script vs binary a little more, but it might a few
days)
See bug #902 for the history.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1515#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------
Changes (by hamish):

  * milestone: 6.4.2 => 6.4.3

Comment:

Replying to [comment:10 glynn]:
> See bug #902 for the history.

thanks for the reminder.

since the nviz binary has been in devbr6 for a long time I assume that all
is good with it, but since the patch is non-trivial I suggest to not apply
it just before release, and so put this one off until 6.4.3.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1515#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by marisn):

I introduced a small workaround in r50495. Please test especially in non-
typical usage scenarios (running scripts etc.).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1515#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by neteler):

This now all works in 6.4.svn:

{{{
GRASS64svn> g.gisenv GRASS_GUI
text

GRASS64svn> nviz
(popup window)

GRASS64svn> nviz --ui
(popup window)
}}}

Any need to keep this open?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1515#comment:13&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
---------------------+------------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Keywords: nviz | Platform: Linux
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by hamish):

Replying to [comment:13 neteler]:
> Any need to keep this open?

yes, as it is still relying on Maris's save-the-day last minute fix. The
plan was to backport the full fix from devbr6 after the stable release
went out. So far that hasn't happened, but still should.

best,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1515#comment:14&gt;
GRASS GIS <http://grass.osgeo.org>

#1515: nviz fails to launch from the command line
----------------------+-----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: blocker | Milestone: 6.4.3
Component: wxGUI | Version: svn-releasebranch64
Resolution: fixed | Keywords: nviz
  Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Changes (by marisn):

  * status: new => closed
  * resolution: => fixed

Comment:

Replying to [comment:13 neteler]:
> This now all works in 6.4.svn:
>
> {{{
> GRASS64svn> g.gisenv GRASS_GUI
> text
>
> GRASS64svn> nviz
> (popup window)
>
> GRASS64svn> nviz --ui
> (popup window)
> }}}
>
> Any need to keep this open?

IMHO this can be closed as nviz starts just fine.
To backport or not 6.5 nviz startup is another question and isn't blocking
this bug.

Still I more worry about provided "works for me" example -> if GUI=text
why there's a pop-up window at all?!? Still it's a separate bug.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1515#comment:15&gt;
GRASS GIS <http://grass.osgeo.org>