Hi,
I was getting this same error today, but on a Windows 7 setup. I found that if I uploaded the code to the board and then opened a serial monitor window things would work. However, if I used the selection to upload and open a monitor at the same time the error would almost always appear.
Robert