[PD] Pd GUI freeze with error message(Tcl)

Jonathan Wilkes jancsika at yahoo.com
Wed Jan 29 20:20:03 CET 2014


On 01/29/2014 01:08 PM, Ivica Ico Bukvic wrote:
> I've seen these also happen when something tries to address a non-existent
> widget (e.g. when it is being closed or something similar).

There are a few things:
1) Weird treatment of the tk error window in OSX.  It looks like 
sometimes it causes an infinite loop, but I can't predictably generate 
the error.
2) If I understand it correctly, the tk event loop can run into the same 
problem the Pd audio dsp scheduler runs into with when you have too many 
calculations per dsp tick.  But it's worse with tk because it isn't 
optimized for doing timely graphics updates in the first place.  If you 
are sending a constant stream of just enough data to the gui that tk no 
longer has any idle time to update graphics, then you may get yourself 
into a situation where tk never updates and you see a freeze.

Moreover, tk seems not to use its idle time very efficiently.  I built a 
recursive loop for the search plugin specifically to let the user 
interact, cancel operations while building a search index.  But you can 
see how inefficient its drawing routine is.  (Maybe this has to do with 
X11 as well, but I think the sluggish redrawing happens on OSX too.)

This all is particularly problematic when combined with Pd's 
architecture, because it's often sending a barrage of messages to the 
gui.  For example:

* an error message to the console.  The console is fairly snappy when 
dealing with an email's worth of text, not so snappy when dealing with 
100 error messages being sent every 10ms.
* moving a large number of objects in Pd-extended or Vanilla
* moving an array in Pd-ext or Vanilla
* resizing an array where each element of the array is an svg tiger

-Jonathan

>   There is an easy
> way to prevent this from ever stopping GUI from working by encapsulating all
> commands streaming from pd->gui with a simple catch{<command>}. This is what
> in part pd-l2ork does and I cannot remember when was the last time I had a
> problem like this.
>
>> -----Original Message-----
>> From: pd-list-bounces at iem.at [mailto:pd-list-bounces at iem.at] On Behalf Of
>> Miller Puckette
>> Sent: Wednesday, January 29, 2014 12:29 AM
>> To: Jonghyun Kim
>> Cc: pd-list at iem.at
>> Subject: Re: [PD] Pd GUI freeze with error message(Tcl)
>>
>> Hi Jong -
>>
>> I think the "*(Tcl) INVALID COMMAND NAME' stuff isn't related to Pd
> freezing,
>> but I'd like to find out how it happens and fix it.
>>
>> The GUI can freeze if Pd is overloaded with audio computation on Mcintosh
>> compuers - the only thing I can suggest is reduce the amount of audio
>> computation (I know - nobody would ever want to do that :)
>>
>> cheers
>> Miller
>>
>> On Wed, Jan 29, 2014 at 04:03:17AM +0100, Jonghyun Kim wrote:
>>> Hi list,
>>>
>>> I don't know why this cause, but sometimes it appears and GUI freeze,
> but
>>> still Audio alive. Only GUI die...
>>>
>>> Number Box, Vu meter, Sliders, and so on, these GUIs  all stop, and
> don't
>>> show the actual numbers...
>>>
>>> Anyone knows this issue?
>>>
>>> ----------------------
>>> *(Tcl) INVALID COMMAND NAME: invalid command name ".x4de9a0.c"*
>>> *while executing*
>>> *"$tkcanvas itemconfig $tag -text $text"*
>>> *(procedure "pdtk_text_set" line 2)*
>>> *invoked from within*
>>> *"pdtk_text_set .x4de9a0.c .x4de9a0.t395fcb0{98.13}"*
>>> *("uplevel" body line 19)*
>>> *invoked from within*
>>> *"uplevel #0 $docmds"*
>>> ----------------------
>>>
>>> Pd-0.45-4 (32bit)
>>> Mac OS X Mavericks
>>>
>>> Screenshot attached.
>>>
>>> Thanks,
>>> Jong
>>
>>> _______________________________________________
>>> Pd-list at iem.at mailing list
>>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
>>
>>
>> _______________________________________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management ->
>> http://lists.puredata.info/listinfo/pd-list
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>
>




More information about the Pd-list mailing list