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

Mathieu Bouchard matju at artengine.ca
Thu Dec 20 22:35:15 CET 2007


On Thu, 20 Dec 2007, Charles Henry wrote:

> The only problem I see with it is a contrast with other programming & 
> development environments.  If you create a problem in your code, you 
> shouldn't be able to crash the development environment.  You halt the 
> process, make changes, and re-compile. And Pd patching is different from 
> this.  I'd say it warrants some consideration whether there is a means 
> to allow Pd to make errors without crashing or becoming unresponsive.

The other programming languages you allude to all have exception handling 
and require some amount of handling to be done in any of their externals. 
Nevertheless, it's still easy to write externals that ignore 
interruptions, as long as the signal-handler only communicates the signal 
to the opcode executer: thus a C function can only be interrupted if it 
calls the interpreter directly or indirectly.

They do it like this because it's still too complicated and unportable to 
handle interruptibility. I'm not sure whether I'd even ever try the best 
tricks that I have in mind, because they still can't be 100% crash proof. 
That said, it's only important to get just a high percentage of success, 
as without such tactics the process would just be dead anyway. It's just 
important for the user to know that there's a chance that a crash-recovery 
trick like that can cause serious malfunction once in a while, and so that 
any bug reports are done only about situations in which the crash-recovery 
was not used.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801, Montréal QC Canada


More information about the Pd-list mailing list