View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] ::xotcl::object autoname crashes in Tcl 8.5

From: Mark Janssen <>
Date: Mon, 18 Sep 2006 23:26:52 +0200

After having some of list discussion with Gustaf Neumann [GN] a solution has
been found which will be part of the 1.5.1 release. Below a summary of the


I have had the same problem witch Tcl 8.5a4 so I don't think it is specific
to a5. I have downloaded 8.5a5 from CVS.
It does seem to be a windows only problem.

I have done some more investigation and tried to compile XOTcl for myself.
Linking fails on TclIncrObjVar2 that is being used by AutonameIncr.
TclIncrObjVar2 is part of the private Tcl API and therefore not included in
the stubs dll.
Same goes for TclIncrVar2 for the <8.5 builds

This means that AutonameIncr will call a function that is not enabled in the
stubs table and that is probably why it crashes with 8.5a4/5.
Using the code below, I can compile XOTcl on windows against Tcl85a5 and
autoname seems to work as it should.

#ifdef PRE85
  valueObject = TclIncrVar2(in, XOTclGlobalObjects[XOTE_AUTONAMES], name, 1,
  valueObject = Tcl_ObjGetVar2(in, XOTclGlobalObjects[XOTE_AUTONAMES],name,
  if (valueObject != NULL ) {
    Tcl_GetLongFromObj(in, valueObject,&autoname_counter);
    if (Tcl_IsShared(valueObject)) {
      valueObject = Tcl_DuplicateObj(valueObject);


many thanks! looks good ... i've as well removed the PRE85 case, use
this code always...


On 9/18/06, Gustaf Neumann <> wrote:
> Dear Mark,
> where did you get tcl 8.5a5 from? From CVS? The website
> lists still 8.5a4.
> i have tested 8.5a4 with Mac Os X and Linux without these problems.
> Can you determine from the debugger, where the crash happens?
> -gustaf neumann