Forcably disconnecting a TCP connection causes the program to wait for
a response, which feels like a crash. Its not just Pd, it'll happen
with any TCP networking that does not have a thread for each
connection. Martin Peach's tcpserver object handles this stuff much
better, or for netsend/netreceice, you can use UDP and you shouldn't
have these hang ups since there is no connected state in UDP.
.hc
On Nov 18, 2009, at 2:08 PM, matthem5@vt.edu wrote:
We have discovered an issue with the netsend and/or netreceive
objects. If a patch which is sending of receiving network data is closed with the
connection still open and transmitting/receiving data at a high rate, it seems
that the connection is sometimes not closed properly. If the same patch is
reopened without closing PD sometimes the connection claims to be valid, as
in it gives the error "error: netsend_connect: already connected", but data will
not transmit and closing the patch crashes PD. What could be causing
the patch to close improperly?If you would like to try to recreate the error, I have included the
text version of our test patch. After opening the patch, connect the netsend
object and the toggle the metro on to send data. Without doing anything else to
the patch, simply close it with the X in the top right corner. Then reopen the
patch, without quitting PD and trying to connect the netsend object again.
When we did this, it sometimes gave us an error and closing the patch killed
PD. Sometimes it took a few times closing and reopening the patch for
this to occur. Could this be a race condition when freeing objects in a
patch?Any help would be greatly appreciated, thank you.
Our test patch:
#N canvas 568 250 450 300 10; #X obj 105 179 netsend 1; #X obj 237 113 + 1; #X msg 237 91 1; #X floatatom 268 161 5 0 0 0 - - -; #X obj 300 19 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 147 144 prepend send; #X obj 101 207 netreceive 9997 1; #X obj 100 234 prepend set; #X msg 103 264 7101; #X obj 282 55 metro 10; #X msg 110 36 connect localhost 9997; #X connect 1 0 3 0; #X connect 1 0 5 0; #X connect 2 0 1 0; #X connect 3 0 1 1; #X connect 4 0 9 0; #X connect 5 0 0 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 9 0 2 0; #X connect 10 0 0 0;
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I have the audacity to believe that peoples everywhere can have three
meals a day for their bodies, education and culture for their minds,
and dignity, equality and freedom for their spirits. - Martin
Luther King, Jr.