"programmer out of sync" but still successfully uploaded

Hi. I am programming an Atmega 328 that already has Arduino boot loader on a breadboard. I do not use an external oscillator. I use the 8MHz internal clock and set the Arduino IDE board to "Atmega328 on a breadboard (8MHz internal clock)".

I am using an FTDI board with a USB cable to my computer to program the chip. I use the DTR pin on the FTDI board through a .1uF capacitor to the reset pin on the Arduino and it is working as expected with a nice charge curve after it gets pulled low by the FTDI chip. The reason I mention this is that this is the most recent thing I have changed. I used to simply pull the reset pin low manually every time I uploaded code to it.

The problem I am having is that occasionally I get this error message when I upload code to the chip:

avrdude: stk500_paged_load(): (a) protocol error, expect=0x10, resp=0xcc
avrdude: stk500_cmd(): programmer is out of sync

It still successfully uploads the new code even though the error pops up. I have verified this by displaying a new message using the serial print.

I am curious as to what is causing this because it might prove problematic later on.

Does someone know what is going on?

Having no idea what your sketch does I would guess it does enough serial output that the PC is still reading your buffered output when it expects to be reading replies from the bootloader. That would be seen as the protocol being Out Of Sync.

Thanks for the reply. My application does do a bit of serial output but not extensively and with a lot of pause in between. I will still try to put a 10 second pause in the setup to eliminate that plausibility.