I use an Arduino UNO as ISP for burning the bootloader on a custom 32u4 device, and while it eventually works and I've done several hundred this way, I'm constantly plagued by this message:
Using Port : COM12
Using Programmer : stk500v1
Overriding Baud Rate : 19200
avrdude: ser_open(): can't set com-state for "\.\COM12"
Sometimes unplugging the UNO will fix it, but usually I have to restart the IDE. It often works for one or two boards, and then I get this message again. Any suggestions?