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

Jachym Cepicky jachym.cepicky at centrum.cz
Thu May 4 16:37:30 EDT 2006


Hallo,

On Thu, May 04, 2006 at 12:52:51PM -0700, 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.

It seems to work, thanks!

> 
> 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.
> 

OK, I use Tcl/Tk 8.4

> 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


Jachym
-- 
Jachym Cepicky
e-mail: jachym.cepicky at centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky-gpg_public_key.asc
-----------------------------------------   
OFFICE:                                     
GDF-Hannover
Mengendamm 16d
30177 Hannover
Germany
e-mail: cepicky at gdf-hannover.de
URL:    http://gdf-hannover.de
Tel.:   +49 511-39088507
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20060504/7ca50630/attachment.bin


More information about the grass-dev mailing list