[PD] Tcl Invalid Command Name Error, using iostream

Jonathan Wilkes jancsika at yahoo.com
Fri Jan 17 19:45:07 CET 2014

I don't know the particulars, but it's quite  possible you are injecting junk into the middle of a stream of data heading for the gui.  I'd guess there is an unterminated message in a sys_vgui call-- i.e., one with a "\\\n", possibly in a loop-- and a matching sys_gui or vgui call with a terminating "\n" at the end.  If you put a message to the gui between the two you'll probably screw up that command.  If you insert a message with a linebreak in it, then tcl will take the word immediately following the linebreak-- like a "1000" or a "1"-- as a command.  Those aren't tcl commands, so it complains.


On Friday, January 17, 2014 12:38 PM, "Esler,Robert Wadhams" <robert at urbanstew.org> wrote:

  I've notice quite a bit of discussion about this error, though none in relation to my current discovery.

  I have a custom external that works great w/o errors in Pd-0.45-4 and Pd-extended-42.5, but throws the following error when trying to create it in Pd-extended-43.4.  Sometimes GUI hangs on its creation (never completes the drawing of the object), yet Pd can still function normally with other objects.

(Tcl) INVALID COMMAND NAME: invalid command name "1"
    while executing
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 $cmds_from_pd"(Tcl) INVALID COMMAND NAME: invalid command name "1000"
    while executing
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 $cmds_from_pd"

If I try to open a patch with the custom external sometimes Pd hangs and I have to Quit, but not always.  

I've tracked it down to functions that are calling std::cout via a C++ class.  Sometimes I forget to comment these out during debugging.  This error doesn't throw on the versions I mentioned above except pd-extended-43.4.  I'm still investigating the GUI hang issue, it might be thread related b/c I was using C++11 threading library during testing, though none of those functions are ever called in the pd instance.  

By the way, I'm using Max OS X 10.8.5.  

Not sure if this is helpful to anyone, or why this would be the case.  But definitely in the future I will remember to not use the C++ <iostream> in my Pd objects.  

Thanks everyone.

Pd-list at iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20140117/2bbf6607/attachment-0001.htm>

More information about the Pd-list mailing list