Ok, I have been able to isolate it and create a test patch. The bug is triggered when, immediately after connecting (i.e. triggered by the 1 output by netsend), you send MANY messages through netsend. The first X messages are lost, where X is not necessarily an integer. I guess it is an overflow in some buffer.
Note that if you send the very same amount of messages at any other moment, not immediately after connecting, they are sent correctly. I attach the test patch. I will file it to the bug tracker - I post it here just because it answer the question I previously posted 2008/2/11, matteo sisti sette <[EMAIL PROTECTED]>: > Hi, > > I use netsend and netreceive to send messages across 2 instances of pd > on the same machine (localhost). > > I use the outlet of netsend to detect when netsend is connected, and > when it is ([select 1]) I immediately send out some data through it. > > IN SOME CASES (no consistent behaviour detected), these data that are > sent just after the connection is established, are simply LOST, i.e. > they are not received at the other end, and netsend does NOT give the > error "netsend: not connected". > > I cannot provide a test patch, since in any simple test this does not > happen, but when I put the very very exact same thing into a bigger > patch, this happens. > > > Even a [delay 0] between detecting the active connection and sending > the data does not fix the problem, while a [delay 500] for example > does. > > In summary the problem is: > Messages sent to a [netsend] immediately after the connection is > established (after netsend has output a 1) may be lost, without > issuing an error message. > > Has anyone experienced it? > > Any suggestion on how to systematically trigger it so as to produce a > test patch to post to the bug tracker? > > The bug may even be in netreceive, not necessarily netsend. > > -- > Matteo Sisti Sette > [EMAIL PROTECTED] > http://www.matteosistisette.com > -- Matteo Sisti Sette [EMAIL PROTECTED] http://www.matteosistisette.com
#N canvas 158 146 1048 517 12; #X obj 181 140 netsend; #X msg 134 63 connect localhost 5000; #X obj 181 170 select 1; #X msg 195 99 disconnect; #X obj 180 229 t b b; #X msg 241 255 0; #X obj 179 292 until; #X obj 175 332 f; #X obj 214 331 + 1; #X msg 17 219 send bla bla \$1; #X obj 739 156 print CONNECTED; #X obj 624 202 print DATA; #X obj 624 121 netreceive 5000; #X msg 178 264 1000; #X obj 271 171 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X connect 0 0 2 0; #X connect 1 0 0 0; #X connect 2 0 4 0; #X connect 3 0 0 0; #X connect 4 0 13 0; #X connect 4 1 5 0; #X connect 5 0 7 1; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 7 0 9 0; #X connect 8 0 7 1; #X connect 9 0 0 0; #X connect 12 0 11 0; #X connect 12 1 10 0; #X connect 13 0 6 0; #X connect 14 0 4 0;
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
