I am using a leonardo and for some reason I can only upload sometimes to it. I've noticed it happens usually only when I have serial communication happening, I am assuming its because leonardo continues to read serial even when window is closed.

I am on OSX and have tried two things:1. adding delay in setup of 5seconds so I could try a reboot and upload right after its been rebooted.2. this suggestion http://www.baldengineer.com/blog/2012/10/08/arduino-fixing-serial-port-in-use/

not sure what else it could be. any ideas on fixing this? It only happens with leonardo.