Max hangs & can't see what's precisely causing it; using UDP, speedLim, mc.receive + mc.send, regular receives
Sep 13 2021 | 4:53 am
I've got an interactive installation that is heavily using Max/MSP (75% of project): Interaction tracking (Max), Graphic Animation response (Processing), 7-channel sound response (Max/MSP). I've got a Max bug where, what I've got works, until the program hangs. I can't quite predict WHEN it will hang. Rarely, it hangs shortly after reboot (1-5 minutes). When I try to manually recreate what I surmise is causing it, I can't replicate the problem. Yet, regardless it seems to hang after some interaction, say anywhere from 20-50 triggers over time. This stretch of time could be a 15 minute to 90 minute period, ballpark. I'm looking for insight/leads on what may be causing this. The Max icon says that it's stuck on an abstraction (channelChecker). Yet, not which use of that abstraction. There are 7 uses of that abstraction (with arguments to make their usage unique). Here's the work flow: 1. Computer 1 sends a (channel) value over UDP to Computer 2. This value changes based off data from the Kinect (ie interactivity). Computers are physically linked via router that is constantly running. 2. Both ends of that communication use the speedlim object on either side, to slow down excessive values. Parameters are 500 (Computer 1 output), 1000 (Computer 2 input before passing elsewhere), 500 (Computer 2 at local points within individual abstraction usages). Initially, this seriously mitigated the of Computer 2 hanging. 3. Computer 2 then sends that value to a particular abstraction that then sends it off to another particular abstraction (there are several instances of this particular abstraction). This particular abstraction - "channelChecker" - checks to see if that particular channel (abstraction arguments) is in use, particularly if that channel is triggered ( via value passed in from UDP interaction from Computer 1 ). For example "Channel 1 is triggered. Is channel 1 currently in use? No? Then play. Yes? Then no information passage." If the audio channel is currently in use, a Gate object is closed and the value cannot pass through it. If the audio channel is not in use, the value can then pass through the gate, onwards to play a sound file.
When Max hangs, it tends to be after so much time or interactions, and the "max not responding" points to this abstraction. Yet, not to the specific one. I'm puzzled as to why it points to hanging here, and not quite consistently. Or, I can't find the consistency just yet.
I'm grateful to any insights.
- perhaps there is a flood of messages between when a channel isn't playing and a file is set to play AND when that file starts playing
What might you think? Where/What in particular is causing Max to hang? PLEASE let me know what you posit. 4. Other info: Computer 1: M1 Mac, Big Sur, running Max 8.1.10 (I believe); Overdrive set to "on" Computer 2: High Sierra, Presonus Firepod, using 7 channel, running Max 8.1.10 (I believe), Overdrive set to "on"
Thank you in advance for your time and consideration. I do appreciate it.