[GRASS-dev] v.digit startup segfault - improbable fix

Wolf Bergenheim wolf+grass at bergenheim.net
Thu May 4 16:51:22 EDT 2006


Cedric,

YOU ARE MY HERO!

Thanks. Now it works, and just in the nick of time. (I'm supposed to start 
digitizing some maps this weekend).

Thanks again!

Oh I'm using tcl 8.4, on a Debian sid computer:

GRASS 6.1.cvs > ldd /opt/gis/grass-6.1.cvs/bin/v.digit
[SNIP irrelevant libs]
         libtk8.4.so.0 => /usr/lib/libtk8.4.so.0 (0xa7897000)
         libtcl8.4.so.0 => /usr/lib/libtcl8.4.so.0 (0xa77c1000)
[SNIP irrelevant libs]

--Wolf

On Thu, 4 May 2006, Cedric Shock wrote:

> Hi,
>
> I carefully picked over the v.digit segfault exemplar from Ivan Marchesini.
>
> If you are experiencing a v.digit segfault on startup please try the new patch
> I just kicked into CVS.
>
> Hints for future debugging: set DEBUG to at least 5.
> Report what tcl/tk version v.digit is being LINKED against.
>
> I changed argument count on Tk_Main from 0 to argc. Reasoning:
> Tcl_ExternalToUtfDString is used very few places in the tcl and tk sources. A
> good chunk of them are in the handling of argc and argv in Tcl_Main and
> Tk_MainEx, so I'm inclined to believe the backtrace that says it's happening
> here. The code doesn't look like it was written to ever expect 0 argc. This
> section of code has been entirely rewritten between tcl 8.3 and 8.4. The 8.4
> code looks like it's happy with 0.
>
> Counter reasoning: It's been 0 since forever. This had to be working for some
> developer using tcl 8.3 at some time.
>
> Counter counter reasoning: whether or not Tcl_ExternalToUtfDString calls
> strlen is dependent upon the source encoding, but here I think it's all the
> same (coming from the command line).
>
> --Cedric
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>

-- 

<:3 )---- Wolf Bergenheim ----( 8:>




More information about the grass-dev mailing list