[GRASS-dev] [GRASS GIS] #522: NVIZ fails to start

#522: NVIZ fails to start
-------------------------+--------------------------------------------------
Reporter: ewcgrass | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: unspecified
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
NVIZ fails to start in any of the four GRASS versions on my computer.
Running Fedora 10, kernel 2.6.27.12-170.2.5.fc10.i686. I have GRASS-6.2.0
(compiled by me), GRASS-6.2.3 (compiled by me), GRASS-6.4.0-RC3 (compiled
by me) and GRASS-6.3.0-6.fc10 (installed from repository). All were
compiled/installed on 29 January 2009 with the OS updated as at that date,
using defaults for compiling. NVIZ in GRASS-6.0.2, GRASS-6.2.3 and
GRASS-6.4.0-RC1 ran fine in Fedora Core 5 back in December 2008 and/or
early January 2009. I upgraded from FC-5 to Fedora 10 (clean OS install)
on 26 January 2009. NVIZ failure to start noticed today, with all
available updates and bug fixes as at 3:00 pm Atlantic Time on 03 March
2009.

When running GRASS-6.2.0 and GRASS-6.2.3 by clicking the icon on the
display window, NVIZ stops at the tiny grey NVIZ screen plus tiny black
screen with red "please wait" (both stay up until I close the tiny
windows). Running NVIZ from the command line I get the following messages
for GRASS-6.2.0 and GRASS-6.2.3 respectively:

--snip--
Loading data
translating colors from fp
Update elev null mask
Loading data
--snip--

and

--snip--
ading data
Update elev null mask
Loading data
translating colors from fp
--snip--

When running NVIZ from GRASS-6.3.0-6.fc10 or from GRASS-6.4.0-RC3 by
clicking the display icons, the tiny NVIZ windows quickly flash on and
off.

When trying to run NVIZ from the pull-down menu in GRASS-6.3.0 I get this
error:

--snip--
nviz elevation=Site_plan_elevation3@Ocean_Links
Loading Data

translating colors from fp

Update elev null mask
Loading Data

Error in startup script: could not create rendering context
     while executing
"togl .middle.draw.canvas -rgba true -double true -depth true"
     (procedure "Nv_makeGUI" line 56)
     invoked from within
"Nv_makeGUI .top"
     (file "/usr/lib/grass-6.3.0/etc/nviz2.2/scripts/nviz2.2_script" line
1045)
--snip--

When trying to run NVIZ from the pull-down menu in GRASS-6.4.0-RC3 (either
from tcltk or the wxpython GUI) I get this error:

--snip--
nviz elevation=Site_plan_elevation3@Ocean_Links
Loading raster map <Site_plan_elevation3@Ocean_Links>...

Translating colors from raster map <Site_plan_elevation3@Ocean_Links>...

Loading raster map <Site_plan_elevation3@Ocean_Links>...

Error in startup script: could not create rendering context
     while executing
"togl $Nv_(TOP).canvas -rgba true -double true -depth true"
     (procedure "Nv_makeGUI" line 56)
     invoked from within
"Nv_makeGUI $Nv_(AREA)"
     (file "/usr/local/grass-6.4.0RC3/etc/nviz2.2/scripts/nviz2.2_script"
line 1052)
--snip--

I have also run NVIZ in earlier versions of GRASS on Fedora Core 5 and
FC-2 machines, as well as as on Red Hat 7 and 9 machines, all with
success. The error messages above seem to suggest script issues (??),
unless there is a call somewhere that is Fedora 10 specific? One of the
bug upgrades applied via Fedora repository today was to tk libraries.
Can't tell whether this is the cause of the problem, however, as I have
not run NVIZ since upgrading to Fedora 10 in January.

Hope this information is useful. Beyond this, I'm at a loss, and cannot
think of anything else to add.

Regards,
Rick

P.S. Grass Team, you have done and continue to do a wonderful job :slight_smile:

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

#522: NVIZ fails to start
--------------------------+-------------------------------------------------
  Reporter: ewcgrass | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: unspecified
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by cmbarton):

There have been a lot of bug fixes and improvements to nviz between GRASS
6.2 and 6.4. Could you try nviz with just 6.4 and report what the problems
are? Also, what version of TclTk do you have?

Michael

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

#522: NVIZ fails to start
--------------------------+-------------------------------------------------
  Reporter: ewcgrass | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: unspecified
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by ewcgrass):

I replied to you directly by email and now realize I should have replied
here. I'm pasting that email below.

I'm running linux kernel 2.6.27.12-170.2.5.fc10.i686, tcl-8.5.3-1.fc10,
and tk-8.5.3-5.fc10 (which was upgraded from repo just last week). Using a
small raster file that did open in NVIZ before in an earlier
grass-6.4.0svn and/or RC1 (? sorry, can't remember which) and in earlier
versions of grass, prior to upgrading from FC-5 to Fedora-10.

I have this morning tried the following four things:

1) From grass-6.4.0svn-07-03-2009 (generic file using installer), I get
nothing when clicking on display NVIZ button, and when bringing NVIZ
startup gui from drop-down menu, I get a pop-up window with message "chile
process exited abnormally". When I click OK, a small grey "dialog0" window
opens, but nothing else.

2) Using grass-6.4.0-RC3, when clicking display NVIZ button, a small grey
NVIZ window and a small window with "please wait" in quickly flash, then
nothing. When I bring NVIZ startup gui from drop-down menu, I get the
following message in the output-gis.m window"

--snip--
nviz elevation=Site_plan_elevation3@Ocean_Links
Loading raster map <Site_plan_elevation3@Ocean_Links>...

Loading raster map <Site_plan_elevation3@Ocean_Links>...

Translating colors from raster map <Site_plan_elevation3@Ocean_Links>...

Error in startup script: could not create rendering context
     while executing
"togl $Nv_(TOP).canvas -rgba true -double true -depth true"
     (procedure "Nv_makeGUI" line 56)
     invoked from within
"Nv_makeGUI $Nv_(AREA)"
     (file "/usr/local/grass-6.4.0RC3/etc/nviz2.2/scripts/nviz2.2_script"
line 1052)
--snip--

3) From grass-6.4.0-RC3 using wxpython gui, from nviz startup gui I get
from drop down menu, I get the following error message:

--snip--
Mon Mar 9 10:59:10
2009)
nviz
elevation=Site_plan_elevation3@Ocean_Links
Loading raster map <Site_plan_elevation3@Ocean_Links>...
Loading raster map <Site_plan_elevation3@Ocean_Links>...
Translating colors from raster map
<Site_plan_elevation3@Ocean_Links>...
Error in startup script: could not create rendering context
     while executing
"togl $Nv_(TOP).canvas -rgba true -double true -depth true"
     (procedure "Nv_makeGUI" line 56)
     invoked from within
"Nv_makeGUI $Nv_(AREA)"
     (file "/usr/local/grass-6.4.0RC3/etc/nviz2.2/scripts/nvi
z2.2_script" line 1052)
(Mon Mar 9 10:59:12 2009) Command finished (1 sec)
--snip--

4) From grass-6.4.0snv-07-03-2009 using wxpython gui, from nviz startup
gui I get from drop down menu, I get the following error message:

--snip--
/usr/local/grass6.4.0svn-i686-pc-linux-gnu-07_03_2009/etc/nviz2.2/nviz:
error while loading shared libraries: libtk8.4.so: cannot open shared
object file: No such file or directory
--snip--

It appears that the latest snv is looking for an older tk, and obviously
libtk8.4.so is not present.

One more thing I have noticed since making the upgrade to tk.i386
8.5.3-5.fc10 late last week, is the lower half of the GIS Manager window
redraws much more slowly than before, particularly when selecting a vector
layer. This may be a tk thing related to the NVIZ problem?

I could try to undo the upgrade, if that does not cause too many
dependency problems, and if the upgraded tk version is not planned to be a
permanent one for Fedora and/or other linux distros. Please advise.

Regards,
Rick

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

#522: NVIZ fails to start
--------------------------+-------------------------------------------------
  Reporter: ewcgrass | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: unspecified
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by marisn):

First - if You upgraded Tcl/Tk, You also need to recompile GRASS (nviz).

Second - as Tcl/Tk UI development has stopped, it's not up to date with
new 8.5 features/changes. Some things may not work as expected or not work
at all. I strongly suggest to stick with 8.4 Tcl/Tk releases, as they got
most of testing and bugfixing.

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

#522: NVIZ fails to start
--------------------------+-------------------------------------------------
  Reporter: ewcgrass | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: unspecified
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by mmetz):

Replying to [comment:3 marisn]:

> as Tcl/Tk UI development has stopped, it's not up to date with new 8.5
features/changes. Some things may not work as expected or not work at all.
I strongly suggest to stick with 8.4 Tcl/Tk releases, as they got most of
testing and bugfixing.

It works fine for me, using Fedora 10 with tcl/tk 8.5.3. After such an
upgrade (FC5 to Fedora 10), pretty much all programs you compiled yourself
need to be newly configured and compiled (make distclean, configure, make,
optionally make install).

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

#522: NVIZ fails to start
--------------------------+-------------------------------------------------
  Reporter: ewcgrass | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: unspecified
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by cmbarton):

Please test nviz on a GRASS standard dataset, like Spearfish or North
Carolina. That way we can tell if it is the program or how your data
interacts with the program.

BTW, I'm using TclTk 8.5 with no problem.

Michael

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

#522: NVIZ fails to start
--------------------------+-------------------------------------------------
  Reporter: ewcgrass | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: unspecified
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by ewcgrass):

All current versions of grass were compiled and installed after doing a
clean upgrade from FC5 to Fedora-10 (i.e. drive partition with grass
installation directories were reformatted). I'm thinking that if it's
tcl/tk related, then the relative change in redraw time for the lower part
of the GIS-manager that I noticed after the tk upgrade leads me to believe
the bug-fix upgrade from tk-8.5.3-4 to tk-8.5.3-5 may have broken things
... might this be so? The trouble is, I don't recall needing to run NVIZ
after upgrading to Fedora 10 but before tk-8.5.3-5, so I have nothing to
compare to other than what I'm used to running FC-5.

I just now reinstalled grass-6.3.0 using yum and ran my files and also
spearfish elevation.dem, both with same disappointing results.

The following is the error message I get when trying to run NVIZ from gui
from drop-down menu in grass-6.4.0-RC3 and spearfish elevation.dem.

--snip--
Loading raster map <elevation.dem@PERMANENT>...

Loading raster map <elevation.dem@PERMANENT>...

Translating colors from raster map <elevation.dem@PERMANENT>...

Error in startup script: could not create rendering context
     while executing
"togl $Nv_(TOP).canvas -rgba true -double true -depth true"
     (procedure "Nv_makeGUI" line 56)
     invoked from within
"Nv_makeGUI $Nv_(AREA)"
     (file "/usr/local/grass-6.4.0RC3/etc/nviz2.2/scripts/nviz2.2_script"
line 1052)
--snip--

I don't expect that I should have to recompile grass 6.2.0, 6.2.3 and
6.4.0-RC3 after doing a minor upgrade from tk-8.5.3-4 to tk-8.5.3-5, but I
guess one never knows for sure without trying. I need to leave for a
couple of hours but when I return (and checking here first), I will
remove, compile, and reinstall all versions of grass and report my
findings using both my files and spearfish.

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

#522: NVIZ fails to start
--------------------------+-------------------------------------------------
  Reporter: ewcgrass | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: unspecified
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by ewcgrass):

Here's the latest:

I recompiled and ran grass-6.4.0-RC3 using tk-8.5.3-5 ... same problem and
same error message as before. Thinking it best to look forward, I did not
bother recompiling earlier versions of grass.

I manually replaced tk-8.5.3-5 files with tk-8.5.3-4 files (the default
files on the original Fedora 10 distro DVD) and ran all versions of grass
(6.2.0, 6.2.3, 6.3.0, 6.4.0-RC3) ... same problem and same error messages
as before. So tk-8.5.3-5 alone does not appear to be the culprit. That
officially puts me at a loss.

Curious: Michael, what version of tk are you running?

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

#522: NVIZ fails to start
--------------------------+-------------------------------------------------
  Reporter: ewcgrass | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: unspecified
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by mmetz):

Replying to [comment:6 ewcgrass]:
> I don't expect that I should have to recompile grass 6.2.0, 6.2.3 and
6.4.0-RC3 after doing a minor upgrade from tk-8.5.3-4 to tk-8.5.3-5, but I
guess one never knows for sure without trying. I need to leave for a
couple of hours but when I return (and checking here first), I will
remove, compile, and reinstall all versions of grass and report my
findings using both my files and spearfish.

I agree, at least I didn't have to do that on my Fedora 10 installation.
You said you installed grass-6.3.0 from repository, everything else you
compiled yourself. At the moment I guess that grass-6.4.0RC3 is the
version of choice for production work. Can you remove grass-6.3.0, sudo
ldconfig and try nviz with 6.4 again? The idea is that there may be a
conflict between grass libraries, and that the grass-6.3.0 libraries are
somewhere in a system-wide location. Hopefully this removal doesn't mess
up the gdal installation. This is a wild guess, if this doesn't work, you
must hope for some help from someone knowing nviz and its tcl/tk usage.
All I can say is that it works on my Fedora 10 installation, and that I
don't use grass versions from the repository, instead sandbox versions of
6.4, 6.5 and 7, all work fine.

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

#522: NVIZ fails to start
--------------------------+-------------------------------------------------
  Reporter: ewcgrass | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: unspecified
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by cmbarton):

I've got TclTk 8.5.5 installed with the dependencies from William
Kyngesburye's Mac frameworks. These are very up-to-date. You may have an
openGL issue if NVIZ is not working right.

Michael

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

#522: NVIZ fails to start
--------------------------+-------------------------------------------------
  Reporter: ewcgrass | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: default | Version: unspecified
Resolution: | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment (by ewcgrass):

Thanks Michael, an openGL issue was the cause. I tried a few other
applications that require openGL and found that that the problem appears
to be related to nvidia graphic card drivers after applying recent Fedora
upgrades (within the last week, but I unfortunately did not keep track on
which).

I suggest the following caveat for Fedora 10 users who run nvidia video
card drivers. It appears that a recent Fedora upgrade breaks nvidia
drivers for at least two legacy cards (GeForce4, GeForceFX5xxx are the
ones that I've tested). Applications needing 3D acceleration either don't
work, or cause X to restart! Results for applications that need 3D without
acceleration vary; NVIZ will not run, but IBM's openDX does. A temporary
fix is to remove (rename) the xorg.conf file in /etc/X11 to allow X to
revert to using the default (non-accelerated) video driver (nv in my case
I presume). Now NVIZ runs fine (including redraw rate for lower half of
GIS-manager), but my son will be disappointed to learn that google-earth
and tux racer no longer do. Lets hope Fedora fixes this soon so I can keep
my sanity as a parent!

Thanks again Michael. In light of your greater experience on these
matters, I will let you decide whether this issue should be closed as
resolved and how so. In the mean time, I will post this issue on the
nvidia forum and I will test with nvidia drivers from time to time
following future upgrades to see if Fedora fixes this, and report back (do
so here?) if/when they do.

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

#522: NVIZ fails to start
--------------------------+-------------------------------------------------
  Reporter: ewcgrass | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: default | Version: unspecified
Resolution: invalid | Keywords:
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by cmbarton):

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

Comment:

Glad that you were able to work out the source of the problem. Closing
this ticket.

Michael

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