Arduino MEGA 2560 Serial port 'COMx' already in use. Try quiting any programs..

About two month ago I bought a Arduino MEGA2560 for my 3D printer construction.
Driver installation from Arduino 0022 was the easiest thing I've ever done and everything worked very well!! After about a month of regular working to calibrate my new 3D printer with many successful uploads, my Arduino MEGA 2560 is suddenly stopped working without having done anything on my computer. If I try to upload any sketch, the error is always

processing.app.SerialException: Serial port 'COM3' already in use. Try quiting any programs that may be using it.

EVERYTHING WORKED PERFECTLY UNTIL NOW when I have almost finished the hardware of my 3D printer.
From now it is started the mess that I have not yet solved, and is blocking the development of my project . I already tried all other releases of Arduino IDE /drivers without success.
I also tried a W7 recovery point at the date before first Arduino installation repeating the same steps taken the first time installation but the problem will remains.
My computer runs Win 7 64bit but the problem is the same connecting the MEGA2560 board on another W7 64bit computer.
Detail: at power on Arduino AREF led flashing one time than still on. The ON led is lit.
The USB to Serial chipset is ATMEL
I want to buy another MEGA2560....but is it an hardware fault?
Please can someone help me?
Thanks in advance

Hi, welcome to the forum.

This doesn't seem to be a problem that I have read before.

Could you remove Arduino IDE (but not your projects folder), and remove Java. You could use JavaRa to be sure that Java is removed. Download the zip file of Arduino IDE 1.5.8 BETA and unzip it somewhere in a folder in your home folder. I use a folder "my Programs" or "my Apps" for that. Run the Arduino from that folder. Remove everything from the Mega board and connect it to the computer. Select the Mega board, and see which COM ports are available. Can you tell what happens then ?

Arduino IDE 1.5.8 will run on 64-bit Windows 7 without installing any extra Java. Perhaps that other computer did have some Java installed as well ?

Did you buy an official Arduino Mega 2560 ? If not, you might have an old bootloader, and you should burn the new bootloader into it.

It is very well possible that the usb-serial part of the Mega board is broken, but I'm not yet sure of that. It happens quite often that some little error/problem didn't cause a problem in the past and suddenly would cause trouble.

Thanks for your prompt response Peter
I will try your suggestions but I wonder why Arduino suddenly no longer communicated with the computer (I was operating the engines of the 3D printer when suddenly no longer responded)
What negative role can have Java so suddenly? I did many uploads and many settings on my 3D printer without errors before....
My Mega2560 is a clone that I bought on eBay within the Ramps 1.4 shield.. I found later that it is a clone.
I have already tried the Arduino IDE 1.5.8 without success .... anyway I tried again... but I need Java for some other web applications....
However I have already bought at the Arduino store a new and genuine Arduino MEGA 2560 !!
I hope this works!
Thanks

Well
Connected Arduino to the computer (yesterday was failed)
Today Device Manager -> Arduino Mega2560 (COM6) -> Device Status -> This device is working properly. Boh!!!

Open IDE 1.5.8., load Marlin fw compilation is OK
Launch upload................

error code:

Arduino: 1.5.8 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Sketch uses 96,666 bytes (38%) of program storage space. Maximum is 253,952 bytes.Global variables use 4,401 bytes (53%) of dynamic memory, leaving 3,791 bytes for local variables. Maximum is 8,192 bytes.avrdude: ser_open(): can't set com-state for "\.\COM6"
avrdude: ser_drain(): read error: The handle is invalid.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

Removed existing Mega 2560 drivers (from previous failed attemps)

Reinstalled Mega2560 pointing to the drivers from Arduino 1.5.8 folder /drivers

Error Windows Encountered a problem installing the driver software for your device
Windows found driver software but encountered an error while attempting to install it.
Arduino Mega 2560
This device cannot start (code 10)

Disconnected and reconnected Arduino's USB

Device Manager -> Arduino Mega2560 (COM6) -> Device Status -> This device is working properly.

No warning all OK......

Re-Open IDE 1.5.8., load Marlin fw compilation is OK without errors (verbose mode)

Launch upload................

After a successfull compilation, the error code as following

avrdude: Version 6.0.1, compiled on Apr 3 2014 at 23:12:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Users\John\Desktop\my_folder\arduino-1.5.8/hardware/tools/avr/etc/avrdude.conf"

Using Port : COM6
Using Programmer : wiring
Overriding Baud Rate : 115200
avrdude: ser_open(): can't set com-state for "\.\COM6"
avrdude: wiring_open(): releasing DTR/RTS
avrdude: wiring_open(): asserting DTR/RTS
avrdude: ser_drain(): read error: The handle is invalid.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

Today it is not the day of Serial port 'COMx' already in use. Try quiting any programs.........
I have to bring to church for a blessing this Arduino board!

Any suggestion is welcome!
Best Regards

If you need Java, remove at least every Java rx_tx module.
I still prefer that you remove every Java part that you can find. You can install it later.

That driver folder in the zip file contains an executable, it will install all the drivers for the Arduino boards in one go. You can try that, run it without any Arduino board connected.

Which Mega board do you have ? One with the CH340G usb-serial ? That driver is not included in the Arduino drivers.

At this moment, it is best to try another board, or try your board with Linux (on another computer with another usb cable).

With such COM port problems, it is more and more likely that your Mega board is broken.
Perhaps your harddisk has a failure ? Or did you use a usb hub or usb cable that can't supply enough power to the Arduino board ?

Hi Peter

My Mega2560 is a clone that I bought on eBay within the Ramps 1.4 shield.. I had discovered later that it is a clone... with usb-serial (the only chip nearest the USB) ATMEL chipset.
However I have already bought at the Arduino store a new and genuine Arduino MEGA 2560 !!
It will arrive in few days....I hope this works!
You are right, it is more and more likely that my Mega board is broken....it is impossible that for a SW issue the board suddenly stopped to work.
The first time I connect this card on my PC W7 64bit with Arduino 0022, i had configured and working card in a half a minute.
It is impossible that now I cannot have it..... even after a system restore at a date before the first configuration.
The only dubt i have is..... why when i connect on MAC it work? it was a dream?
Tomorrow I will try another connection on MAC of my reference Fablab and I will try intensive uploads from it.
I will keep you informed.
THX

Hi all
yesterday I try to connect this Arduino on a MAC with Arduino 1.0.5 SW.
Loaded blink and uploaded successfully!

After .....

Same error also on MAC without any possibility of recovery.

Arduino MEGA 2560 Serial port 'COMx' already in use. Try quiting any programs..
Avrdude timeout....

...with the wonder of the MAC owner who is an high skill technician on Arduino !

Than, on the same port I have connected an Arduino 1 board and this work without problems.

At this point the card is definitely defective. :smiley-sad-blue

Last update
Today is arrived the new Arduino Genuine card MEGA2560 coming from Arduino site.
Connected to the PC
Configured in 0 minutes
Working with my new Prusa i3 Rework in about a minute.

Problem Solved

The old Arduino clone is ready on the MOON launching pad!

Avoid in the future to buy Arduino clones on e-bay.......less money.....less music!!!