4

Every time I open the Tools menu, the IDE freezes for a few seconds. Why is that? It happens on both of my computers, and nothing I do makes a difference in how long it takes. I've tried restarting the IDE, unplugging my Uno, and many other things, but nothing helps.

I'm on windows, running IDE version 1.0.2.

  • Which OS are you running on? – Peter Bloomfield Feb 26 '14 at 14:23
  • @PeterR.Bloomfield Windows – The Guy with The Hat Feb 26 '14 at 14:28
  • This is one part of the IDE that I haven't seen as slow in either Mac or Windows version. – Cybergibbons Feb 26 '14 at 18:04
7

It's an RXTX issue. RXTX is the native serial library used to make the IDE talk to the boards.

On some Windows installation, with some Bluetooth things (both dongles or integrated), when enumerating serial devices, these dongles scan the air for remote serial devices. Hence, the IDE stays stuck, waiting for RXTX serial device enumeration to end. This issue has been acknowledged a lot of times, see for example #1375, #532, #200 and #143

As far as I understand, this issue does not affect linux or mac because of the different way the scan occurs. On linux it's a plain filtered file listing of /dev. Similarly it's on mac. On windows, it uses native API calls.

Some fixes are available in the 1.5 series but I suggest switching to the latest 1.5.6 release as RXTX was replaced by JSSC, a more modern and simpler library.

  • Could you elaborate? What is the issue? If it is known, then is there a bug report? Whats going wrong? Why is it happening only on Windows and not Linux/Mac? – asheeshr Feb 26 '14 at 15:15
  • @AsheeshR elaborated – Federico Fissore Feb 26 '14 at 15:48
  • FYI, in the past I have been successful, in using a different version of RXTX library file. basically copying it over from other sources. Where I do recommend going forward with 1.5.+. Being natively fixed. – mpflaga Feb 26 '14 at 17:49
  • FYI: latest nightly, soon to become 1.6.2, speeds up tools menu a lot – Federico Fissore Mar 25 '15 at 13:51
7

Frederico Fissore already pointed out that this delay is due to the serial libraries. From a functional perspective: The Arduino IDE tries to enumerate all available COM ports which simply takes some time.

Quote from the official troubleshooting guide:

Why does do the Arduino software and the Tools menu take a long time to open (on Windows)?

If the Arduino software takes a long time to start up and appears to freeze when you try to open the Tools menu, there by a conflict with another device on your system. The Arduino software, on startup and when you open the Tools menu, tries to get a list of all the COM ports on your computer. It's possible that a COM port created by one of the devices on your computer slows down this process. Take a look in the Device Manager. Try disabling the devices that provide COM ports (e.g. Bluetooth devices).

  • 1
    As sofware engineer I should add that it is a bug obviously. Devices should be enumerated in background, before any kind of menu is opened. To keep internal state correct, a system hook should be set. The problem is that software is written in Java, and such low-level programming in Java is very hard as it's positioned as cross-platform language and makes it hard to depend on system features. (This time it's a design problem.) – polkovnikov.ph Feb 27 '14 at 11:52
2

I was having the same problem under Windows 7 x64 and had already removed all com ports and unknown devices as suggested above. For me, the solution was to rename "ListComPorts.exe" in the hardware\tools subfolder to "ListComPorts.exe.xxx" - this prevents the Arduino IDE from using this file and appearently it reverts to using the internal COM port detection mechanism (using DEVICE_ARRIVAL/DEVICE_REMOVAL messages??) . The tool menu now opens immediately every time.

0

I had the same issue on my laptop (win 7, 64). Renaming file ListComPorts.exe to ListComPorts.exe.xxx as mentioned above worked. I also had to switch to a standard USB port (not 2.0) for sketch to load properly.

  • 1
    Welcome to Arduino Stack Exchange! As it stands, this answer does not help answer the question any more than the answers above. If you have more information about this particular way of fixing the tools menu bug, please edit your answer to add that information. – The Guy with The Hat Mar 25 '15 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.