Personal tools
You are here: Home documentation FAQ for Pd What's a "stack overflow"?
Document Actions

What's a "stack overflow"?

Up to Table of Contents

This FAQ applies to: Any version.

I get the message "error: stack overflow" when I connect two objects together!

A "stack overflow" happens when you have asked Pd to compute a recursive operation, and this operation causes Pd to run out of memory. Often this is the first step before crashing Pd!

A common example of a recursive operation which could cause this error is the classic counter, using [float] and [+ 1]. If the output of [float] is connected to the input of [+ 1], and the output of [+ 1] is connected to the right-most ("cold") inlet of [float], then a "bang" message sent to the left-most ("hot") [float] will output a number which increases by one every time that message is sent.

If, however, the output of [+ 1] is connected to the left-most ("hot") inlet of [float], then sending the message [bang( to the left inlet of [float] will have a different effect. It will ask [float] and [+ 1] to add numbers together as fast as the computer will let them do it.

Because Pd will not stop and ask you "are you sure you want to do this?", this operation will quickly use up all the memory resources which Pd has, and cause a stack overflow.

this FAQ was originally published under the GPL at Pd's FLOSSmanual

by IOhannes m zmoelnig last modified 2008-05-07 10:38 AM

Powered by IEM Powered by Plone Section 508 WCAG Valid XHTML Valid CSS Usable in any browser