[GRASS5] Re: [GRASSLIST:1246] a problem in NVIZ

I will appreciate if anyone explains reason of this problem concerning
NVIZ.

I'm working on it..........

(grass5.0 runs in slackware9.0)

[that's the second hit for this bug with Slackware 9.0, for anyone
keeping score. What gcc, glibc, tcl versions is that please?]

[GRASS:~ > nviz ...]
Nv_(panels)
toplevel made
child killed: segmentation violation

hmmmm.. that's in a different place to where it was breaking for me.
(Debian/Testing)

Is it a floating point or integer based map?
If it is an integer based map, try converting it to a FP with r.mapcalc,
  (r.mapcalc fpmap=origmap*1.0)
and see if that works. (doubtful)

Try compiling with -DDEBUG_MSG and see if that fixes it.
   (CFLAGS=-DDEBUG_MSG ./configure ...)
[that worked here, I have no idea why]

Try compiling with gcc ~2.95 if you can & see if that fixes it.
[that works here]

Which version of Tcl are you using? Does using 8.3 help?

please let me know if any of this works, or doesn't.

I've currently got my integer-map bug tracked down to this line on
src/libes/ogsf/GS2.c: (line 1445)
   filename = G_fully_qualified_name(filename, mapset);

Next is to follow G_fully_qualified_name() in src/libes/gis/nme_in_mps.c.
Hopefully this leads somewhere.

You're getting past that into etc/nviz2.2/scripts/nviz2.2_script though.
tcl8.4?? Maybe try adding -lpthreads to the end of XTRA_LDFLAGS in
src.contrib/GMSL/NVIZ2.2/src/Gmakefile
and see what that does?

also of note, we have both:
/src.contrib/GMSL/NVIZ2.2/scripts/nviz2.2_script
and
/src.contrib/GMSL/NVIZ2.2/nviz2.2/scripts/nviz2.2

Which are almost the same thing. The first one is the real one.

oh, what fun,
Hamish

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/grass5/etc/nviz2.2/scripts
Nv_(panels)
toplevel made
child killed: segmentation violation
    while executing
"exec /usr/local/grass5/etc/nviz2.2/NVWISH2.2 -f
/usr/local/grass5/etc/nviz2.2/scripts/nviz2.2_script
-name NVIZ >&@stdout"
    ("eval" body line 1)
    invoked from within
"eval exec $env(GISBASE)/etc/nviz2.2/NVWISH2.2 -f
$env(GISBASE)/etc/nviz2.2/scripts/nviz2.2_script -name
NVIZ >&@stdout"
    invoked from within
"if {$argv == ""} {
#no arguments
eval exec $env(GISBASE)/etc/nviz2.2/NVWISH2.2 -f
$env(GISBASE)/etc/nviz2.2/scripts/nviz2.2_script -name
NVIZ >&@stdo..."
    (file "/usr/local/grass5/bin/nviz" line 16)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hamish wrote:

I've currently got my integer-map bug tracked down to this line on
src/libes/ogsf/GS2.c: (line 1445)
   filename = G_fully_qualified_name(filename, mapset);

Next is to follow G_fully_qualified_name() in src/libes/gis/nme_in_mps.c.
Hopefully this leads somewhere.

It leads to:

  char *
  G_fully_qualified_name (name, mapset)
      char *name;
      char *mapset;
  {
      char fullname[1024];
      char *G_store();
  
      if(strchr(name, '@'))
        sprintf (fullname, "%s", name);
      else
        sprintf (fullname, "%s@%s", name, mapset);
  
      return G_store(fullname);
  }

My guess is that the heap has previously been corrupted, causing a
subsequent call to malloc() (in G_store()) to segfault. If so, then
debugging from the point that SIGSEGV is received won't help any; you
would need to either use memory debugging tools such as Electric Fence
or try to manually discover the source of the overrun.

--
Glynn Clements <glynn.clements@virgin.net>

Hamish wrote:

I am using binary version of grass (5.0).
   
5.0.3 will be out soon, you might just wait for that & then for a new
binary to be posted a few days later.

( could you possibly tell me how I can compile grass from source code
with NVIZ and postgresql ? )
   
Not specifically for slackware, as I don't have it, but generally--

Get the source code from:
http://grass.ibiblio.org/download.html

as 5.0.2 has the bug, you might want 5.0.3rc3, from here:
http://mpa.itc.it/markus/grass50/

then follow the instructions in the INSTALL file.

generally, you need to satisfy & install any build requirements (see
REQUIREMENTS.html), which is often the most confusing part as it is
slightly different for everybody.

The run 'configure' with the options you need, for example:
./configure \
  --with-tcltk-includes=/usr/include/tcl8.4 \
  --with-postgres-includes=/usr/include/postgresql \
  --with-motif --with-motif-includes=/usr/X11R6/include \
  --with-glw

(change or omit directory names as needed, see './configure --help')

If that is sucessful, run "make" followed by "make install"

That's it!

Hamish

hello

I am afraid I am not clear on:

--with-motif-includes=/usr/X11R6/include \ # there is not such a directory.
necessary include files may be in /usr/X11R6/GL directory ?
Are motif files necessary ? What are their function ?

--with-glw: this usage is ok. no need to define any include or library directories ?

I could not see REQUIREMENTS.html file in the web page.

I will appreciate if you explains

--

Ahmet Temiz
General Directory of Disaster Affairs
Ankara TURKEY

______________________________________
Inflex - installed on mailserver for domain @deprem.gov.tr
Queries to: postmaster@deprem.gov.tr

______________________________________
The views and opinions expressed in this e-mail message are the sender's own
and do not necessarily represent the views and the opinions of Earthquake Research Dept.
of General Directorate of Disaster Affairs.

Bu e-postadaki fikir ve gorusler gonderenin sahsina ait olup, yasal olarak T.C.
B.I.B. Afet Isleri Gn.Mud. Deprem Arastirma Dairesi'ni baglayici nitelikte degildir.

temiz wrote:

I am afraid I am not clear on:

--with-motif-includes=/usr/X11R6/include \ # there is not such a directory.
necessary include files may be in /usr/X11R6/GL directory ?
Are motif files necessary ? What are their function ?

--with-glw: this usage is ok. no need to define any include or library directories ?

NVIZ doesn't require either Motif or GLw. Motif is only required by
xganim and r3.showdspf.openGL; GLw is only required by
r3.showdspf.openGL. Unless you need these programs, I suggest using:

  --without-glw --without-opengl

NVIZ does require both OpenGL and Tcl/Tk. Both of these are normally
found without needing any --with-*-includes= or --with-*-libs=
switches.

I could not see REQUIREMENTS.html file in the web page.

It is in the top-level directory of the GRASS source tree.

--
Glynn Clements <glynn.clements@virgin.net>