udpsend problem in max; windows 64bit

    Sep 23 2013 | 2:18 am
    * 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.

    • Sep 23 2013 | 2:49 am
      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.
      HTH, Ádám
    • Sep 23 2013 | 2:37 pm
      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.
    • Sep 23 2013 | 2:38 pm
      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.
    • Sep 23 2013 | 2:40 pm
      reminder: it fails on my windows 64bit. max becomes very slugish.
    • Sep 23 2013 | 3:50 pm
      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.
      HTH, Ádám
    • Sep 23 2013 | 7:40 pm
      thanks Adam. : )
      even without the (pipe) max has a problem in 64bit win7.
    • Sep 24 2013 | 11:44 pm
      I finally managed to have this simple patch work in XP 64bit.
      Just win7 64bit seems to have trouble. (on my PC).
    • Sep 25 2013 | 1:44 am
      Maybe Windows 7 and up doesn't like setting ports fast.
      Does it have to be dynamic?
    • Sep 25 2013 | 5:44 pm
      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.
    • Sep 25 2013 | 6:44 pm
      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.
    • Sep 25 2013 | 8:04 pm
      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.