Processing + OSC + Arduino: Application Freezes When Controlling Fan

Hi There, I was wondering if anyone could help me. I am trying to drive a fan/motor using an OSC command. It’s running well through via an arduino to a potentiometer controller on the fan. I have used OSC as the button push which triggers the fan also needs to trigger other actions. It sometimes works well, but sometimes the application ‘hangs’. This can be after a couple of hours of running or sometimes after 5 minutes of running.

I generally have to power cycle the arduino and computer to get the processing application to function correctly again.