[GRASS5] [bug #2324] (grass) NVIZ: child process: segmentation violation located

Glynn Clements glynn.clements at virgin.net
Tue Feb 17 03:58:53 EST 2004


Request Tracker wrote:

> I have narrowed down the source of the NVIZ segfault error. The error
> has appeared for me using both 5.0.3 and version 5.3 I picked up from
> CVS today in hopes this would be resolved.

> The offending segmentation fault happens on this line of etc/nviz2.2/scripts/nviz2.2_script:
>     togl $BASE.canvas -rgba true -double true -depth true
> 
> Which appears to be creating some sort of gl object as a canvas element.

Yep. "Togl" is an OpenGL canvas widget for Tcl/Tk.

> I thought that the problem might be in my OpenGL implementation. I am
> using Debian (testing). I got the error when using the xlibmesa3-glu
> and xlibmesa4-gl packages. I switched to the mesag3 package (the
> development package is mesag-dev) and NVIZ now works correctly.
> 
> The short and skinny is:
> 
> NVIZ works correctly (this bug does not exist) with Mesa-3.
> 
> NVIZ does not work with xlibmesa.

Odd. It's quite unusual for crashes to be related to the use of
OpenGL. However, there are a few common linking problems,
specifically:

1. If libGL uses pthreads, it sometimes helps to explicitly pass the
-lpthread switch when linking the application.

2. SGI's libGLU is written in C++, which is never a good thing for
binary compatibility. Mesa's libGLU (which is now considered obsolete
due to the lack of the GLU 1.2 tesselator API) is written in C.

> And a slightly related question: is there a new monitor implementation
> in the works for 5.7 with scrollbars, zoom buttons, etc?

What you are describing isn't a monitor but a GUI. Note that monitors
aren't restricted to just XDRIVER, but also include the PNG and CELL
drivers; GUI components wouldn't be meaningful for those drivers.

On the GUI front, there is already d.dm/d.m (which are part of GRASS),
and also Radim's QGIS (which is separate).

> Is building
> one in tcl/tk appropriate? It appears that NVIZ uses a similar
> mechanism ...

Tcl/Tk has the advantage of portability, but Tcl isn't a particularly
nice language for writing substantial applications, and Tk is fairly
limited compared to other GUI toolkits.

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




More information about the grass-dev mailing list