This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients PythonInTheGrass, amaury.forgeotdarc, belopolsky, cgohlke, loewis, pitrou, terry.reedy
Date 2011-02-05.15:21:42
SpamBayes Score 2.9676261e-13
Marked as misclassified No
Message-id <>
The "UpdateStringProc should not be invoked for type cmdName" message (as quoted above in the traceback) apparently can mean that there's a mismanagement of Tcl reference counts.


“This crash (actually, a panic) hints at defective Tcl_Obj
handling - possibly in the core, more likely in an extension
if you're using one. It indicates that Tcl_GetString() or
Tcl_GetStringFromObj() has been called on a cmdNameType
Tcl_Obj that has no string representation, a state that
should never occur.”

Intuitively, cmdNameType seems to refer to createcommand() / deletecommand(). Also, the following code in looks a bit suspicious:

    def after(self, ms, func=None, *args):
        """Call function once after given time.

        MS specifies the time in milliseconds. FUNC gives the
        function which shall be called. Additional parameters
        are given as parameters to the function call.  Return
        identifier to cancel scheduling with after_cancel."""
        if not func:
            # I'd rather use time.sleep(ms*0.001)
  'after', ms)
            def callit():
                    except TclError:
            name = self._register(callit)
            return'after', ms, name)

That is, we call deletecommand() while the command is still being executed.
Perhaps that, together with concurrent memory allocation from another thread (Tcl_Alloc() doesn't use Python's "Tcl lock"), might explain why the cmdName or other things sometimes become corrupted ("Tcl_DeleteCommand deletes a command from a command interpreter. Once the call completes, attempts to invoke cmdName in interp will result in errors").
Date User Action Args
2011-02-05 15:21:43pitrousetrecipients: + pitrou, loewis, terry.reedy, amaury.forgeotdarc, belopolsky, cgohlke, PythonInTheGrass
2011-02-05 15:21:43pitrousetmessageid: <>
2011-02-05 15:21:42pitroulinkissue11077 messages
2011-02-05 15:21:42pitroucreate