That is kind of what I understood recursion to mean; mine's not infinite, but apparently gets pretty deep. Thanks for finding this. I haven't found Google to be very useful for Pd stuff; actually for more and more other stuff too.
-Chuckk
The Magic of Google:
http://www.devx.com/tips/Tip/14276
Understanding Stack Overflow The stack is a region of memory on which local automatic variables are created and function arguments are passed. The implementation allocates a default stack size per process. On modern operating systems, a typical stack has at least 1 megabyte, which is sufficient for most purposes. Under anomalous conditions, the program exceeds its stack limit. This causes a stack overflow. The two most common causes for a stack overflow is an infinite recursion, as in:
int f(){ g(); } int g() { f(); }
f() calls g(), which in turn calls f() and so on. If your program crashes due to a stack overflow, check for infinite recursion or too large local objects.
Hope that helps!
David
On 3/23/06, Tim Blechmann TimBlechmann@gmx.net wrote:
I don't understand. I've understood recursive to mean a function that calls itself within itself. The output from my patch retriggers the patch, but to my understanding it should all be determinate; if Pd uses depth-first message passing, it should finish with one thread before calling the next. The abstraction is only retriggered from its left outlet, so nothing should happen during the 10 ms delay.
I'm also not sure how [until] will help. Pd doesn't know how many scalars the score has, or how many are of any one structure.
I'm still not clear on what "the stack" is or what makes it overflow. Thanks.
in pd every outlet call is a recursive function call ... if an message goes back to the message signal flow, you have an iteration ...
i've attached a simple patch with a counter counting to 100 ... this might show you the difference ...
hth ... tim
-- TimBlechmann@gmx.de ICQ: 96771783 http://www.mokabar.tk
Every word is like an unnecessary stain on silence and nothingness Samuel Beckett
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQBEIulDNDZZF/Yk3sURAqUWAKCU5ykxTxdSyouzICj4zqobpNoP+wCfUVPu pj3x4x6zYloo+8TcpPRsa7w= =vknI -----END PGP SIGNATURE-----
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Message: 8 Date: Thu, 23 Mar 2006 19:57:48 +0000 From: Georg Holzmann grhPD@gmx.at Subject: Re: [PD] readanysf & minor pb To: august august@develop.ment.org Cc: pd-list@iem.at, vincent rioux vincent.rioux@no-log.org, 'Pat Pagano' bigswift@ufl.edu Message-ID: 4422FDBC.9070200@gmx.at Content-Type: text/plain; charset=us-ascii; format=flowed
Hallo!
yes, please do.
okay, I checked it in ...
anyway, it did not fix the bug vincent mentioned ...
LG Georg
Message: 9 Date: Thu, 23 Mar 2006 15:43:41 -0500 From: "Chuckk Hubbard" badmuthahubbard@gmail.com Subject: Re: [Pd] Stack Overflow To: "Tim Blechmann" TimBlechmann@gmx.net Cc: Pure Data List pd-list@iem.at Message-ID: 8200bab70603231243k1a5e3e32p59e065776eef66e9@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1
OH. Basically you are saying my patch has to finish the last calculation before it's finished with the first one- so it's one really deep string of messages instead of a lot of short ones?
It all makes perfect sense now. I've just become a slightly better programmer. Thanks!
I guess my next question would be whether that will slow down the sequencer, having each scalar accessed at a different logical time, but I suppose in real time there won't be any difference. I'm going to revamp this and see how it works. Thanks again.
-Chuckk
On 3/23/06, Tim Blechmann TimBlechmann@gmx.net wrote:
I don't understand. I've understood recursive to mean a function that calls itself within itself. The output from my patch retriggers the patch, but to my understanding it should all be determinate; if Pd uses depth-first message passing, it should finish with one thread before calling the next. The abstraction is only retriggered from its left outlet, so nothing should happen during the 10 ms delay.
I'm also not sure how [until] will help. Pd doesn't know how many scalars the score has, or how many are of any one structure.
I'm still not clear on what "the stack" is or what makes it overflow. Thanks.
in pd every outlet call is a recursive function call ... if an message goes back to the message signal flow, you have an iteration ...
i've attached a simple patch with a counter counting to 100 ... this might show you the difference ...
hth ... tim
-- TimBlechmann@gmx.de ICQ: 96771783 http://www.mokabar.tk
Every word is like an unnecessary stain on silence and nothingness Samuel Beckett
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQBEIulDNDZZF/Yk3sURAqUWAKCU5ykxTxdSyouzICj4zqobpNoP+wCfUVPu pj3x4x6zYloo+8TcpPRsa7w= =vknI -----END PGP SIGNATURE-----
-- "It is not when truth is dirty, but when it is shallow, that the lover of knowledge is reluctant to step into its waters." -Friedrich Nietzsche, "Thus Spoke Zarathustra"
PD-list mailing list PD-list@iem.at to manage your subscription (including un-subscription) see http://lists.puredata.info/listinfo/pd-list
End of PD-list Digest, Vol 12, Issue 88
-- "It is not when truth is dirty, but when it is shallow, that the lover of knowledge is reluctant to step into its waters." -Friedrich Nietzsche, "Thus Spoke Zarathustra"