[PD] packing anything in .33 can be dangerous

Miller Puckette mpuckett at man104-1.ucsd.edu
Wed Jun 20 20:52:24 CEST 2001


Oops.. It looks like I'd better patch this one up... I'll try to turn it
around tonight...  

cheers
Miller

On Wed, Jun 20, 2001 at 11:27:21AM +0200, Krzysztof Czaja wrote:
> Hi all,
> 
> after bugfixing of pd_defaultlist() in Pd.33 this little snippet:
> 
> #X msg 100 50 foo bar;
> #X obj 100 100 pack s;
> #X obj 100 150 print;
> #X connect 0 0 1 0;
> #X connect 1 0 2 0;
> 
> loops forever (or rather, until it eats up all the memory...) due
> to the cycling defaultlist/anymethod invocations.  In Pd.32 this
> resulted in "symbol foo" printout.
> 
> Indeed, such a pack usage is strange (it is probably meant to be
> unpack really) but is it illegal?  Max pack allows this.  The Max
> printout gives simply "foo".
> 
> Perhaps the pack class should have a listmethod?  Or pack_anything()
> should check if (x->x_n > 1)?  Or single argument packs should be
> banned altogether?
> 
> Btw. the behaviour of abs, sin and other unary operators is also
> affected, but without such a deadly consequences.  These objects
> now simply refuse to operate on lists, while their previous
> behaviour (compatible with Max) was to take the first list element,
> as if preceded in a patch with an implicit $1 message.
> 
> Krzysztof



More information about the Pd-list mailing list