[PD] variable receive objects?

Claude Heiland-Allen claude at goto10.org
Fri May 18 13:08:15 CEST 2012


On 14/05/12 19:43, Jonathan Wilkes wrote:
>> From: IOhannes m zmoelnig<zmoelnig at iem.at>
>> On 2012-05-14 05:02, John Harrison wrote:
>>>   I've used those 2 objects a lot and thought they seemed pretty
>>>   stable...
>>
>> that's because the "trivial" case (where receiving data and
>> changing
>> the receive label are completely independent of each other
>> (stackwise)) won't create much of a problem.
>
>How do I manifest the bug?

See attached.  Uses iem_r, though it should make no difference which 
settable-receive you use.

WARNING: clicking the "boom" message makes Pd segfault :WARNING

To understand this you need to know that pd stores a receiver in the 
symbol table.  When there is only one receiver, it's just a pointer to 
the object, but when there's more than one there's a proxy object that 
contains a list.  When you change a receiver it can end up deleting the 
proxy object if the receiver count for a symbol drops from 2 to 1. 
Deleting an object while code is executing in its context -> boom.


Claude
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: settable-receive-crash.pd
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120518/da13d8f6/attachment.asc>


More information about the Pd-list mailing list