udpsend problem in max; windows 64bit
* the below patch works on a 32 bit OS. However no max version program on a 64 bit Win7 OS can run this simple patch attached. (you must be connected to a functional network for this issue to arise)
I made a simple patch where the host IP of a (udpsend) is changed quite quickly.
This works fine by itself. (see the left side of the jpeg below)
However, I then take this same design but trigger a message to be sent from the (udpsend) after each host IP change (right side of the jpeg). But when doing this max becomes very slugish indeed, with the metro slowing down to a hellish slow pace.
on windows 32bit with 32 bit max, I can change the host IP of a (udpsend) and send a message extremely fast. But it appears the right side of this patch is not able to run on windows 64bit (win7) even using 32 bit max on 64bit win7 : /
(the jpeg below states you need to be on 32 bit max and 64 bit windows for this error to occur, not so, any max prog on a 64 bit win 7 is causing this error.
----------begin_max5_patcher---------- 1567.3oc6Zs0aaaCE94Tf9efv.CXCvUiWjnj2aECXOsa.ausNTHKQGyVYROJ p5jUz+66PJqTGmHG5DGYarf.YIwqmyGO7b9NT4yu9UWLZp9JQ8HzOf9KzEW7 YnjK7k4J4htBtXzh7qJpxq8MbTgdwBgxNZ75Jshqr9JT5UnUBTsbwxpqQ0BU IJGsPTWmeo.IxKlirxEBjct.0TtDMWWaQxZTw7b0khxaFuJoRTnaT9AMtqzY ZkUkuP3mo2Zj4U2zgYlKm5JFGg6JRV5amd5GdS7jaZ3xbawbo5x2aDE1VkNF m.8BEm45LhPotab3Wzeu4LWK+W+LSnecNTMKjpJg0iJjMQiBck1zN93HZRVF Md789DYy4AFOcisa.w9R+xqek6NbabvqOJwJPuu6xiAFcAhLJ.DcC3iDuK3i lfi37jrIfxv3oQwbBkPc3oCGo38FGock1BE1qWJZmoQiFCW8gVzGMZs197tv EdeApjaJc5kaXAP7FVa9yWUh6EQAngQlPI.hlkEwY.lxfmoQIPuyNjHZenI4 Tw1isKaOdbRDivhIbmsGOhLA.J94jsWen0RibC+qAhU6zKGy6kik1dK9QBPj CsqpoMVqVcepyN85jP85AME2oHaqN2uXem00oPjmmgcA8qVzcoVj0ZxopZ0a f+eRafn5Pnbq.BoestAoDBWv+e9s+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ozj3Ia9zs1dt9KqU9.TNCWcBRavOn1bnkqsAvdDrr yDXdaAsG0getnNIAoNwCuYS3BFYXErv1nwFdDicfrLONBl6a3LzKkAEAflM7 HlSvnOjfQNB1X3frwHCtfQCxsbL4LwsbXpy19HOYv4iv5eZX9XXmpRFdv89Q 4AIXoCOhETDVJ+TVvF3kR1IJ4e+IwF.jM77KoA4GKa38jcm4rOQCeDDMbX9x RNRh1CSYZ3MzHImrVZA4NibDVLCKggmVr70GgT9xkeRXpWOzsxznE4enkDHe b66RU66sGO0Hi3SxttvZKJ2TLWZEE1FS6IocUFeDTieBge9O.gbMef. -----------end_max5_patcher-----------
remember, UDP is a connectionless protocol. This means that your patch on the left works that fast because it actually doesn’t do anything: when you set the host of udpsend, you just tell the object the address to which it should send the messages when an actual message is fed into the object. Thus, the patch on the left side doesn’t generate any network traffic. Conversely, the patch on the right side does generate network traffic, which might be the reason for being slower.
Unfortunately I can’t test your patch right now, so I can’t say for sure whether the network traffic is the reason for being slow. Actually, a 10Hz UDP-stream is not that dense, so theoretically it should work with the expected speed. Maybe there’s some other weirdness going on.
BTW, why do you need that pipe? AFAIK, setting the host of udpsend is synchronous (a confirmation from C74 would help, though), so you should be fine without the pipe.
The pipe was to show enough time is given after a host change.
Not necessary, but it just shows there is no pressure, nice n easy, so it should work, as it works on a 32 bit OS.
In fact, on a 32 bit system i can make this all happen far quicker, on my main patch I have a metro set at ’10’ & probably could go quicker.
hope you can try out out soon.
Can anyone else try this out, its really easy, just load the patch and click the bang at the top.
You need your LAN card to be connected to a network. for it to fail.
reminder: it fails on my windows 64bit. max becomes very slugish.
regarding the pipe, my point is that without a pipe, the proper message order is ensured as things happen synchronously. Since the pipe puts your message flow from the main thread to the scheduler thread, it can break synchronicity if you have Overdrive on (at least, theoretically — since processing the host message shouldn’t take as much as 50 msecs, practically there is no chance to break the message ordering with this solution).
Unfortunately I don’t have Windows, so I can’t really give it a try.
thanks Adam. : )
even without the (pipe) max has a problem in 64bit win7.
I finally managed to have this simple patch work in XP 64bit.
Just win7 64bit seems to have trouble. (on my PC).
Maybe Windows 7 and up doesn’t like setting ports fast.
Does it have to be dynamic?
seems that way regards win7. I tried different network cards. so yep, it was the OS.
the speed at which host changes is important for my patch. there is a work around but would require too much effort. windows xp 64bit seems to be o.k.
The port call is asynchronous, it’s up to the OS to deliver it. So there’s nothing that can be done. I don’t see why you can’t just have N different instances of udpsend.
The IP’s i need to communicate with change over time,as computers connect & disconnect, I have a patch that gathers these ip’s and updates and stores these addresses in a list. Then when i need to send a message to all, i fire through the list with host change and send a message to all. nice simple little patch when host works fast. windows7 was freezing max when I used the host update.
Forums > MaxMSP