[PD] What exactly is a "stack overflow" ?

Chris McCormick chris at mccormick.cx
Thu Dec 20 02:58:56 CET 2007

On Wed, Dec 19, 2007 at 02:22:44PM +0000, Andy Farnell wrote:
> On Mon, 17 Dec 2007 22:23:11 +0100 IOhannes m zmoelnig <zmoelnig at iem.at> wrote:
> > but a [bang(--[until] is not meant to loop infinitely.
> > it loops until a certain condition is reached.
> As it stands the behaviour of [until] is correct, but it's a very dangerous
> object unlike almost every other Pd object it's the only one beginners can
> really screw up with.
> An object can tell if it has a connection made to any of its inlets, so 
> perhaps the safety catch for [until] is not to work unless the condition inlet
> is connected? If the condition is never satisfied due to user programming error
> that's another thing but a first line of defence would be helpful.

This sounds to me like a really clean solution. Can anyone think of a
case where you would want to send a bang (or negative number) to [until]
without having the right inlet connected?

Of course, the connected right inlet might not have anything useful
actually happening, but at least it offers some initial protection
so the hairs on yr neck don't have to rise each time you type "until"
in an object box.

The other somewhat dirty solution I thought of but I don't think I
posted here yet is to make [until] artificially use stack space up so
that it does eventually explode when stack is all used, in the same way
as other Pd infinite loops. That's kind of gross but it would work.




More information about the Pd-list mailing list