[GRASS-dev] v.digit segfault with tcltk 8.3 -- solution?

Glynn Clements glynn at gclements.plus.com
Thu May 10 08:26:20 EDT 2007

Hamish wrote:

> WRT the "new" v.digit segfaulting on startup (Tcl/Tk 8.3; Debian/Sarge;
> i686), I have traced it to vector/v.digit/driver.c in the get_window()
> fn:
>  Tcl_Eval(Toolbox, "list 0 [winfo height .screen.canvas] 0 [winfo width .screen.canvas]");
> even this breaks it:
>     Tcl_Eval(Toolbox, "list [winfo height .screen.canvas]");
> or just
>     Tcl_Eval(Toolbox, "list [expr 1+1]");
> or
>     Tcl_Eval(Toolbox, "concat [expr 1]");
> while this works:
>     Tcl_Eval(Toolbox, "winfo height .screen.canvas");
> note that a few lines later it calls this, without error:
>     Tcl_Eval(Toolbox, "list 0 [.screen.canvas cget -height] 0 [.screen.canvas cget -width]");
> no idea why nesting [commands] matters, but without [] it works

The only thing which I can think of is that the Tcl interpreter is

Can you provide a backtrace? The fact that it's happening in
get_window() is less interesting than knowing how far through the
initialisation stage it has got.

> & the
> attached patch gets v.digit working again for tcltk 8.3.
> ok for CVS?

No. The patch is a workaround; it doesn't *fix* anything.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list