[GRASS-dev] Re: grass-dev Digest, Vol 1, Issue 2297

Glynn Clements glynn at gclements.plus.com
Sat May 20 09:39:59 EDT 2006


Glynn Clements wrote:

> > > AFAICT, the main obstacles are v.digit and NVIZ. v.digit needs a
> > > decision on a suitable toolkit (probably either Qt or wxWidgets) and a
> > > volunteer. NVIZ requires someone to update Togl to 1.7 and to
> > > conditionalise the GLX-specific code in do_zoom.c.
> > 
> > For someone who doesn't know anything about the relevant coding, this seems
> > like a fairly easy fix for NVIZ.
> 
> I initially suspected that most of it would be down to figuring out
> how GRASS' copy of Togl has deviated from the original and merging any
> necessary fixes into 1.7. AFAICT, the changes are all just adding new
> versions of tkInt*.h, plus one change which replaced calloc/free with
> G_calloc/G_free (which isn't really necessary).
> 
> However, NVIZ compiles fine with Togl 1.7, but segfaults on startup
> due to Ndraw_all trying to read certain Tcl variables before they've
> actually been created. I'm not sure why Ndraw_all is being called
> earlier with the new version of Togl, and I can't easily find out
> until I've had chance to rebuild my Tcl/Tk libraries with debug info.

OK; the Togl display callback call Ndraw_all. The segfault is occuring
within Nv_makeGUI, specifically within Tcl_DoOneEvent(). That suggests
that it's within the update command in that procedure.

Yep; if I disable the call to update, the crash goes away.

I've commited an update using Togl 1.7. This should make native Mac
support one step closer. However, the README.stubs file from the Togl
package says:

	It has been tested on Windows NT/2000 and Linux for several
	Tcl/Tk versions up to 8.4a3. I haven't been able to test the
	Mac port, it propably needs mending but I can't see why it
	shouldn't work in principle.

I'll look at conditionalising the GLX-specific stuff in do_zoom.c
next.

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




More information about the grass-dev mailing list