Arduino IDE Troubleshooting


Errors running a sketch

Windows* Related

Mac OS X* Related



Errors Running a Sketch


Why doesn't my sketch start after I restart my Intel® Galileo board?


Intel® Galileo Board forgets sketch after powering down. Intel® Galileo Board is required to boot from the SD card in order to resume the sketch after power down.

These steps help you setup your SD card, and boot the Intel® Galileo Board from the SD card.

  1. Connect the Intel® Galileo Board and update the firmware.

  2. Download LINUX IMAGE FOR SD for Intel Galileo from Software Downloads - Drivers.

  3. Format the SD card to FAT32.

  4. Unzip the zip file to the SD card.

     The content of the SD should have the following files/folders at the root directory:






  1. Insert the SD card into the SD slot on the Intel Galileo Board.

  2. Connect the power supply and micro USB to the Intel Galileo Board.

     Note: Intel® Galileo takes about 1-2 minutes to boot Linux before the computer can detect it.

To format


Intel Galileo Board should now be booting from the SD card. The easiest way to verify, is to upload the Blink example, and reboot the Intel Galileo Board. If the Blink example continues to run after booting, then you are booting from the SD card.



Why I can't upload my programs to the Intel® Galileo board?


There are many pieces involved in getting a program onto your Arduino board, and if any of them aren't right, the upload can fail. They include: the drivers for the board, the board and serial port selections in the Arduino software, access to the serial port, the physical connection to the board, the firmware on the Galileo and more. The first step to always try is a complete reboot of the Galileo board and your computer. When rebooting the Galileo it is advised to unplug the power instead of using the "reboot" button on the board. If a full reboot does not solve your issues here are some specific suggestions for troubleshooting each of the pieces.


Arduino Software








Access to the Serial Port







Physical Connection









If it still doesn't work, you can ask for help in the forum. Please include the following information:

Error: Retry 0: Got TIMEOUT when trying to connect?


Getting Permission Denied when trying to upload a sketch?


This error is usually assosiated with a sketch that is running on your board interfering with uploading new sketches. To solve this problem follow these steps:


Windows* Related

Why does the Arduino software freeze when I try to upload a program? (on Windows)?

This might be caused by a conflict with the Logitech process 'LVPrcSrv.exe'. Open the Task Manager and see if this program is running, and if so, kill it before attempting the upload. more information

What should I do if I get an error when launching arduino.exe (on Windows)?

If you get an error when double-clicking the arduino.exe executable on Windows, for example:

Arduino has encountered a problem and needs to close.

you'll need to launch Arduino using the run.bat file. Please be patient, the Arduino environment may take some time to open.

What can I do about cygwin conflicts (on Windows)?

If you already have cygwin installed on your machine, you might get an error like this when you try to compile a sketch in Arduino:

6 [main] ? (3512) C:\Dev\arduino-0006\tools\avr\bin\avr-gcc.exe: *** fatal error - C:\Dev\arduino-0006\tools\avr\bin\avr-gcc.exe: *** system shared memory version mismatch detected - 0x75BE0084/0x75BE009C.

This problem is probably due to using incompatible versions of the cygwin DLL.

Search for cygwin1.dll using the Windows Start->Find/Search facility and delete all but the most recent version. The most recent version *should* reside in x:\cygwin\bin, where 'x' is the drive on which you have installed the cygwin distribution. Rebooting is also suggested if you are unable to find another cygwin DLL.

If so, first make sure that you don't have cygwin running when you use Arduino. If that doesn't help, you can try deleting cygwin1.dll from the Arduino directory and replacing it with the cygwin1.dll from your existing cygwin install (probably in c:\cygwin\bin).

Thanks to karlcswanson for the suggestion.

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).  

Mac OS X* Related

Why do I get "Build folder disappeared or could not be written" (on Mac OS X)?

Did you drag the out of the disk image (and into, say, your Applications folder)? If not, you won't be able to upload the examples.

Why doesn't the Arduino software run after I updated the Java (on Mac OS X)?

The latest Java update from Apple attempts to use 64-bit version of native libraries, but the Arduino application comes with a 32 bit version of the RXTX library. If you launch Arduino, you'll get an error like:

Uncaught exception in main method: java.lang.UnsatisfiedLinkError: /Applications/arduino-0016/Arduino no suitable image found. Did find: /Applications/arduino-0016/Arduino no matching architecture in universal wrapper

To fix this, click on the Arduino application (e.g. Arduino in the Finder, and select Get Info from the File menu. In the info panel, click the Open in 32 Bit Mode checkbox. You should then be able to launch Arduino normally.

Why won't Arduino run on old versions of Mac OS X?

If you get an error like this:

Link (dyld) error: 

dyld: /Applications/arduino-0004/Arduino Undefined symbols: 
/Applications/arduino-0004/librxtxSerial.jnilib undefined reference to _printf$LDBL128 expected to be defined in /usr/lib/libSystem.B.dylib 

you probably need to upgrade to Max OS X 10.3.9 or later. Older versions have incompatible versions of some system libraries.

Thanks to Gabe462 for the report.

What if I get a when uploading code or using the serial monitor (on Mac OS X)?

Error inside Serial.<init>() Unknown Application 

This probably means that the port is actually in use by another application. Please make sure that you're not running other programs that access serial or USB ports, like PDA sync application, bluetooth device managers, certain firewalls, etc. Also, note that some programs (e.g. Max/MSP) keep the serial port open even when not using it - you may to need to close any patches that use the serial port or quit the application entirely.

If you get this error with Arduino 0004 or earlier, or with Processing, you'll need to run the macosx_setup.command, and then restart your computer. Arduino 0004 includes a modified version of this script that all users need to run (even those who ran the one that came with Arduino 0003). You may also need to delete the contents of the /var/spool/uucp directory.  


Why do I get a java.lang.StackOverflowError when I try to compile my program?

The Arduino environment does some preliminary processing on your sketch by manipulating the code using regular expressions. This sometimes gets confused by certain strings of text. If you see an error like:

at java.util.Vector.addElement(Unknown Source)
at java.util.Stack.push(Unknown Source)
at com.oroinc.text.regex.Perl5Matcher._pushState( 


	at com.oroinc.text.regex.Perl5Matcher._match(
	at com.oroinc.text.regex.Perl5Matcher._match(
	at com.oroinc.text.regex.Perl5Matcher._match(
	at com.oroinc.text.regex.Perl5Matcher._match(
	at com.oroinc.text.regex.Perl5Matcher._match(
	at com.oroinc.text.regex.Perl5Matcher._match(
	at com.oroinc.text.regex.Perl5Matcher._match( 

this is what's happening. Look for unusual sequences involving "double-quotes", "single-quotes", \backslashes, comments, etc. For example, missing quotes can cause problems and so can the sequence '\"' (use '"' instead).

What if my board doesn't turn on (the green power LED doesn't light up)?

Make sure that you are powering your board correctly according to the "Tools > Getting Started" guide in the Arduino IDE menu.


What do I do if I get an UnsatisfiedLinkError error (about native library librxtxSerial.jnilib) when launching Arduino?

If you get an error like this when launching Arduino:

Uncaught exception in main method: java.lang.UnsatisfiedLinkError: Native Library /Users/anu/Desktop/arduino-0002/librxtxSerial.jnilib already loaded in another classloader

you probably have an old version of the communications library lying around. Search for comm.jar or jcl.jar in /System/Library/Frameworks/JavaVM.framework/ or in directories in your CLASSPATH or PATH environment variables. (reported by Anurag Sehgal)

What about the error "Could not find the main class."?

If you get this error when launching Arduino:

Java Virtual Machine Launcher: Could not find the main class. Program will exit.

make sure that you correctly extracted the contents of the Arduino .zip file - in particular that the lib directory is directly inside of the Arduino directory and contains the file pde.jar.

Why does my sketch appear to upload successfully but not do anything? 

Check for a noisy power supply. It's possible this could cause the chip to lose its sketch. If the power LED on the Galileo board is flashing or flickering the system is resetting and cannot run any sketches. If you are using a battery to power the Galileo make sure it is above 7 volts. If you are running off of USB power and have multiple sensors/servos plugged into your board there might not be enough power to run the logic. Unplug the sensors or servos or plug your Galileo into the wall through the barrel jack and try loading the sketch again. 

Why do I get errors about undeclared functions or undeclared types?

The Arduino environment attempts to automatically generate prototypes for your functions, so that you can order them as you like in your sketch. This process, however, isn't perfect, and sometimes leads to obscure error messages.

If you declare a custom type in your code and create a function that accepts or returns a value of that type, you'll get an error when you try to compile the sketch. This is because the automatically-generated prototype for that function will appear above the type definition.

If you declare a function with a two-word return type (e.g. "unsigned int") the environment will not realize it's a function and will not create a prototype for it. That means you need to provide your own, or place the definition of the function above any calls to it.