Any solution for the IDE hang when I hover/click on 'Tools' ?

Arduino IDE invariably hangs for close to a minute whenever I hover over, or try to click on 'Tools', s.a. to select board-type, burn bootloader etc. This is very irritating. Wondering if there is some solution to this problem.

I remember reading a FAQ item somewhere that this is probably due to Arduino scanning all serial ports on the host. That should pretty sub-optimal. Isn't there someway we can tell IDE to stop scanning, and make-do with statically configured serial port settings ??

Isn't there someway we can tell IDE to stop scanning, and make-do with statically configured serial port settings ?

I suppose, if you didn't really want to talk to your Arduino. If you want the IDE to talk to the Arduino on a dynamically defined serial port, you need to let it scan.

There is clearly something wrong with your system, though. The scan shouldn't take more than a second or two.

Which version of the IDE? What OS? What bluetooth devices do you have? What bluetooth drivers?

Can't say I've ever had that problem, even on an atom-based netbook running Ubuntu. Which OS are you using? Do you have a large number of serial ports?

There could be a usb device that is slow to respond. My suggestion is to unplug all usb peripherals (except mouse and/or keyboard, of course -- we assume they're working well) and then try to bring up the tools menu both with and without the arduino plugged in.

HTH

Answering to all the counter-questions in this thread so far --

Q. Version of the IDE:
A. 022

Q. Operating System:
A. Windows 7 Enterprise (on Laptop with quad-core i5 with 4GB RAM) and Windows XP (on a Laptop with Core2Duo with 3GB RAM), so reasonably powerful I'd say.

Q. Bluetooth devices:
A. Bluetooth is turned off on both laptops, and no devices connected. On both the MS driver is used when activated.

Q. Other USB devices:
A. Here's a list --

  1. Wireless Broadband data-card (Huawei CDMA-EVDO card) -- Mostly connected
  2. Secure-identity (ActiveKey) USB dongle -- Sometimes connected
  3. Generic USB bus-powered hub -- Sometimes connected (in fact, procured only a weekback, and problem was seen prior to that as well)
  4. USB thumb-drives / pen-drives -- Sometimes connected
  5. Arduino itself -- Mostly connected
  6. Openbench LogicSniffer (Logic Analyzer / SUMP) -- Sometimes connected

However the problem is seen without any USB devices connected, but severity seems to vary. With no USB devices, the wait is stil about 20seconds, which itself seems too long. Also, I never connect more than 2-3 USB devices in at a time. I've tried both approaches of connecting all devices to laptop motherboard's inbuilt hub (i.e. ports on the laptop itself), and via an external bus-powered hub.

Right now, with no USB devices plugged-in, Arduino still shows a drop-down of 11 COM ports. And still it is a 20-25 sec wait.

That does seem excessive. Does task manager show a lot of CPU usage at the time, or does it show little/none? If it shows little/none, then there could be a timeout wait happening.

Have you tried the 1.0 version of the IDE ?

Also, I'd have a look at what java environment you have installed. Maybe it has to be upgraded, or that particular version doesn't work well with arduino... ?-|

dxw00d:
That does seem excessive. Does task manager show a lot of CPU usage at the time, or does it show little/none? If it shows little/none, then there could be a timeout wait happening.

There very little CPU usage (around 5% aggregate, and each individual CPU), and 40% RAM free.
That timeout wait is more likely thing. As such I am pretty okay with Arduino IDE, just that this aspect is really got pretty irritating.

Right now, with no USB devices plugged-in, Arduino still shows a drop-down of 11 COM ports. And still it is a 20-25 sec wait.

I never see more than 3, and I only see three when I have two Arduinos connected. I wonder what it using all those serial ports.

If you right click on My Computer, and select Manage, then select Device Manager, the right pane contains Ports (COM and LPT). What appears when you expand that listing?

At this moment, under Ports (COM & LPT), I see following COM ports

HUAWEI Mobile Connect - Application Interface (COM12)
HUAWEI Mobile Connect - PC UI Interface (COM10)
USB Serial Port (COM18)

and this is after a machine restart. And also having restarted Arduino, I still see those 11 COM ports seen by Arduino. Is it that Arduino scans and adds COM port to it's list, irrespective of whether or not those COM ports are currently active or not ? If so, that'd explain, because over a period of time, I've added several USB devices which I use as COM port, but not connected currently. Devices like Mobile-Phone Comm suite, Logic Analyzer, USB-Serial converter cable I use with another dev board, USB interface of my MSP430 board etc. In their lifetime, I think Windows goes on and assigns unique COM# for each, and they stay in the registry. Arduino probably scans registry for all known COM port #s... just guessing.

Found this excellent tool called EnumSerialPorts that lists all COM ports on a Windows machine, using a variety of methods and APIs, which reports –

C:\Users\falcon\Desktop>EnumSer.exe
CreateFile method reports
COM3
COM4
COM5
COM6
COM9
COM11
COM12
COM13
COM14
COM15
COM18
Take taken calling CEnumerateSerial::UsingCreateFile, 22324 ms
QueryDosDevice method reports
COM9
COM5
COM6
COM10
COM11
COM12
COM13
COM3
COM14
COM15
COM18
COM4
Take taken calling CEnumerateSerial::UsingQueryDosDevice, 0 ms
GetDefaultCommConfig method reports
COM3
COM10
COM11
COM12
COM18
Take taken calling CEnumerateSerial::UsingGetDefaultCommConfig, 982 ms
Device Manager (SetupAPI - GUID_DEVINTERFACE_COMPORT) reports
COM18 <USB Serial Port>
COM3 <LSI HDA Modem>
COM12 <HUAWEI Mobile Connect - Application Interface>
COM10 <HUAWEI Mobile Connect - PC UI Interface>
Take taken calling CEnumerateSerial::UsingSetupAPI1, 16 ms
Device Manager (SetupAPI - Ports Device information set) reports
COM18 <USB Serial Port>
COM12 <HUAWEI Mobile Connect - Application Interface>
COM10 <HUAWEI Mobile Connect - PC UI Interface>
Take taken calling CEnumerateSerial::UsingSetupAPI2, 62 ms
EnumPorts method reports
COM1
COM2
COM3
COM4
COM5
COM6
COM8
COM9
COM10
COM12
COM13
COM15
COM16
COM17
COM18
COM19
COM20
COM22
COM23
COM25
COM26
COM27
COM29
Take taken calling CEnumerateSerial::UsingEnumPorts, 16 ms
WMI method reports
Take taken calling CEnumerateSerial::UsingWMI, 62 ms
ComDB method reports
COM3
COM4
COM5
COM6
COM7
COM8
COM9
COM10
COM11
COM12
COM13
COM16
COM17
COM18
COM19
COM20
COM21
COM22
COM23
COM24
COM25
COM26
COM27
COM28
COM29
COM30
Take taken calling CEnumerateSerial::UsingComDB, 47 ms
Registry method reports
COM3
COM18
COM11
COM12
COM10
Take taken calling CEnumerateSerial::UsingRegistry, 16 ms

C:\Users\falcon\Desktop>

Clearly, there are several ways of listing COM ports, and only few of them give the currently active ports. Windows 7, permits COM ports # 0 thru 255.

Is it that Arduino scans and adds COM port to it's list, irrespective of whether or not those COM ports are currently active or not ?

No. The Arduino IDE gets the list of COM ports currently active. It's then trying to determine which one, if any, the Arduino is attached to.

Using the tool that you linked, most of the ports remain anonymous. That is, aside from the ones that the Manage function listed, none of the others is ever defined as to source of origin.

Some other software on your PC is creating those extra COM ports.