[GRASS-dev] [bug #4725] (grass) nviz crashed while volume visualisation

Glynn Clements glynn at gclements.plus.com
Wed Aug 2 18:48:12 EDT 2006


Markus Neteler wrote:

> > [ http://intevation.de/rt/webrt?serial_num=4725 ]
> > 
> > I just tested the volume with the Slovakia3D dataset:
> > it works again. Whatever happened, but NVIZ volume
> > visualization seems to be back.
> > 
> > GRASS 6.1.cvs (slovakia3d):~ >  nviz dem500 volume=precip3d.500z50
> > Loading Data
> > Update elev null mask
> > Loading Data
> > translating colors from fp
> > recalculating normals...
> > % [Raster MASK present]
> > GRASS 6.1.cvs (slovakia3d):~ >
> > 
> > Someone please test this with 6.1.0RC1. Enter Panel -> volume
> > -> add -> constant -> 1000 to visualize an isosurface. Or
> > read the README of the dataset.
> 
> Ok, it crashed in a second run.
> 
> I debugged a problem in togl_flythrough.c, line 800:
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1239013664 (LWP 24023)]
> 0xb734e327 in __strtouq_internal () from /lib/tls/libc.so.6
> (gdb) bt full
> #0  0xb734e327 in __strtouq_internal () from /lib/tls/libc.so.6
> No symbol table info available.
> #1  0xb734e0cf in __strtol_internal () from /lib/tls/libc.so.6
> No symbol table info available.
> #2  0xb7a2f2d0 in atoi (__nptr=0x0) at /usr/include/stdlib.h:333
> No locals.
> #3  0x08068d93 in Ndraw_all_together_cmd (data=0x8073f40, interp=0x8079b18, argc=1, argv=0xbf8a89ec)
>     at togl_flythrough.c:800
>         buf_surf = 0x0
>         buf_vect = 0x0
>         buf_site = 0x0
>         buf_vol = 0x0
>         buf_north_arrow = 0x0
>         arrow_x = 0x0
>         buf_label = 0x0
>         buf_legend = 0x0
>         buf_fringe = 0x0
>         buf_is_drawing = 0x0
> #4  0xb76e3c86 in TclInvokeStringCommand () from /usr/lib/libtcl8.4.so
> No symbol table info available.
> #5  0x08073f40 in script_mode ()
> No symbol table info available.
> #6  0x08079b18 in ?? ()
> No symbol table info available.
> 
> 
> Since all the buf_xxx stuff is 0x0, atoi() crashes.
> Not sure if this is related to the recent togl changes.

It might be related to the new version of Togl. Or a different version
of Tcl/Tk, or some other change to NVIZ.

The problem is that the Togl canvas is being redrawn before the
variables have been created. As the canvas can be redrawn at any point
after it has been created (or even during creation), it is necessary
to initialise all of the above variables before creating the canvas.

Whilst creating them later and simply hoping that the canvas won't get
redrawn first might work, it's an extremely fragile "solution".

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list