Arduino stops uploading for no reason

I built a Folger Tech Kossel 2020 delta printer and I'm using the Marlin firmware. The folgertech arduino mega clone that came with the kit burned out, so I'm on my second board, still a clone but seemed to work...at first.

I plugged it up and powered it on and uploaded the marlin firmware. Seemed fine. Then I plugged all the components into the ramps board. Wouldn't upload. Unplugged everything. Plugged them in one at a time. Started working again and would upload fine. Then I began configuring it and changing numbers. Saved it to where I had downloaded it to my mac. Got an error saying there was a problem uploading. Redownloaded the software and uploaded it everything seemed fine. Changed two configuration numbers and DID NOT save. Everything was fine. Changed another number. DID NOT save. Got the same error.

Sketch uses 101,174 bytes (39%) of program storage space. Maximum is 253,952 bytes.
Global variables use 4,531 bytes (55%) of dynamic memory, leaving 3,661 bytes for local variables. Maximum is 8,192 bytes.
avrdude: ser_open(): can't open device "/dev/cu.usbmodem1411": Resource busy
ioctl("TIOCMGET"): Inappropriate ioctl for device
ioctl("TIOCMGET"): Inappropriate ioctl for device
avrdude: ser_send(): write error: Bad file descriptor
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions

I've been trying to get this working for months and it just seems to arbitrarily stop.

Please help if anyone else is having issues with this.

That error ("resource busy") indicates that another program on your computer is using the serial port you have selected.

Close that program, or reboot/unplug-replug/etc if you can't figure out what's doing it.

At least on Windows, it's possible for programs to not cleanly let go of the serial port, requiring a reboot before it works again - particularly when the hardware is unplugged while the serial connection is open. On whatever you're using, since it's unix/linux/mac (why you thought it was a good idea to post a question about driver problems without mentioning your OS is beyond me), you might be able to track down the zombie process with lsof and kill it...