[PD-dev] broken msgs cause Tcl traces, how to debug it?

Mathieu Bouchard matju at artengine.ca
Tue Feb 7 21:37:40 CET 2012


Le 2012-01-23 à 14:00:00, Hans-Christoph Steiner a écrit :

>    if {[string index $cmd_from_pd end] eq "\\"} {
>        ::pd_connect::pd_readsocket $cmd_from_pd
>    }
>    if {[catch {uplevel #0 $cmd_from_pd} errorname]} {

This is very wrong, because pd_readsocket calls itself recursively N 
times, then doesn't return, which causes eval (uplevel) to be run N+1 
times on the same chunk of statements.

This may cause «canvas create» to create very many duplicates of canvas 
items, and such.

Is that right ?

  ______________________________________________________________________
| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC


More information about the Pd-dev mailing list