ยท Melchior FRANZ <[EMAIL PROTECTED]> wrote:

> * Josh Babcock -- Monday 20 March 2006 04:17:
>> OK, I seem to have made nasal produce an infinite loop. 
> [...]
>> setlistener("sim/current-view", adjustViewTarget);
> [...]
>> Program received signal SIGSEGV, Segmentation fault.
>
> Allowing recursion was intentional, because recursion is *good*.
> But not if it leads to crashes or runaway processes. So I'm now
> blocking listener re-entry per property. (One could allow a
> certain recursion depth if necessary.)

I had the same probleme last week (listener function which changes the
value of the property to which it is attached). I can't think of a
situation (at the moment :)) where one could need this - so maybe we
should check if the listener function is already on the stack before
calling it (i don't know the nasal interpreter, but i think you know
what i mean). i've fixed it with a variable which I check, in my nasal
code, but i think scripting languages should never segfault.

cu markus

-- 
Markus Barenhoff - phone: +49-40-39991368 - cell: +49-173-7215776
Stellinger Chaussee 26c - D-22529 Hamburg - Germany - Earth
url: http://www.alios.org/ -  mail: [EMAIL PROTECTED]
pgpkey: 0xAE7C7759 fp: 79 64 AA D9 B7 16 F5 06  6A 88 5F A9 4D 49 45 BB

Attachment: pgpQDgJv1CMBM.pgp
Description: PGP signature

Reply via email to