I have an arduino Uno, and it used to work well and upload all my sketches, it would use COM8. Now when I plug it into the computer, the computer will recognize it, then quickly make the "device disconnected sound" and the lights on the board turn off, COM8 is gone and I can't upload anything to the board. I have no idea what the issue is, or if its even the computer or the board?
Disconnect any external wires.
Connect Reset to Gnd, try the Loopback test.
Can happen if USB and external power are used together and Java heap complaining.
If any external power fed to board though the 2.1-mm power socket or 5V in on the header, the USB port will do what you describe. Also try closing and reopening the IDE