[PD-dev] [PD] [packOSC] reentrancy problem

IOhannes m zmölnig zmoelnig at iem.at
Fri Nov 20 19:04:23 CET 2015


On 11/19/2015 07:02 PM, Martin Peach wrote:
> Thanks for that. It also works up to a point but it's causing trouble as in
> the attached patch. The original message gets scrambled if its payload is
> not of the same type as the intervening message.
>

afaict this is a problem of [unpackOSC] not allowing reentrancy either.

at least if i replace [unpackOSC] with an abstraction build with
[oscparse] (see attachments) this problem goes away.

> 
> Also I find that bundles don't actually work. If you try to add another
> message to a bundle it fails:

indeed.

> 
> packOSC: According to the type tag (i) I expected more arguments.
> packOSC: Problem writing address.
> packOSC: According to the type tag I expected an argument of a different
> type.
> * Expected s, string now in
> 
> packOSC: According to the type tag I expected an argument of a different
> type.
> * Expected s, string now in
> 
> packOSC: usage error, write-msg failed.
> packOSC: According to the type tag (i) I expected more arguments.
> packOSC: Problem closing bundle.
> 
> 
> I'm not sure this ever worked or if got broken at some point. Bundles with
> one message are fine.

i was pretty sure that i have been able to send bundles with multiple
messages in the past.
but then:
"[, send /bar bar, send /foo foo foo, ]" works fine, wheras if i switch
the messages "[, send /foo foo foo, send /bar bar, ]" it fails.

with the power of git bisect i tried finding out when this behaviour was
introduced, only to find that it has always been there! (that is: since
revision 5629, when "osc" was added to the repository)

mgfasr
IOhannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: packOSCpd.pd
Type: text/x-puredata
Size: 492 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20151120/de9f01aa/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unpackOSCpd.pd
Type: text/x-puredata
Size: 628 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20151120/de9f01aa/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20151120/de9f01aa/attachment.sig>


More information about the Pd-dev mailing list