Arduino-0010 Locks up compiling example

Hi there,

I’ve just received my Arduino Diecimila and plugged it into my PC with a USB cable.
I see the flashing ‘L’ LED on the board and the FTDI part was detected succesfully.

I downloaded and ran up the IDE, then followed the help to load the Sketchbook
‘Blinker’

So far so good… but when I try to compile the IDE locks up. The DOS box is
showing:

Stable Library

Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7

In file included from D:\Projects\arduino-0010\hardware\cores\arduino/WProgram.h
:6,
from Stepper.cpp:48:
d:/projects/arduino-0010/hardware/tools/avr/bin/…/avr/include/avr/signal.h:36:2
: warning: #warning “This header file is obsolete. Use <avr/interrupt.h>.”
In file included from D:\Projects\arduino-0010\hardware\cores\arduino/WProgram.h
:8,
from Stepper.cpp:48:
D:\Projects\arduino-0010\hardware\cores\arduino/wiring.h:60:1: warning: “abs” re
defined
In file included from D:\Projects\arduino-0010\hardware\cores\arduino/WProgram.h
:1,
from Stepper.cpp:48:
d:/projects/arduino-0010/hardware/tools/avr/bin/…/avr/include/stdlib.h:118:1: w
arning: this is the location of the previous definition
In file included from D:\Projects\arduino-0010\hardware\cores\arduino/WProgram.h
:6,
from Stepper.cpp:48:
d:/projects/arduino-0010/hardware/tools/avr/bin/…/avr/include/avr/signal.h:36:2
: warning: #warning “This header file is obsolete. Use <avr/interrupt.h>.”
In file included from D:\Projects\arduino-0010\hardware\cores\arduino/WProgram.h
:8,
from Stepper.cpp:48:
D:\Projects\arduino-0010\hardware\cores\arduino/wiring.h:60:1: warning: “abs” re
defined
In file included from D:\Projects\arduino-0010\hardware\cores\arduino/WProgram.h
:1,
from Stepper.cpp:48:
d:/projects/arduino-0010/hardware/tools/avr/bin/…/avr/include/stdlib.h:118:1: w
arning: this is the location of the previous definition

Does anybody have any ideas what’s going wrong here?

Thanks!

Alex Lennon
Dynamic Devices Ltd

Hmm, those messages are normal warnings that occur when some of the included libraries are compiled for the first time.

If you relaunch Arduino, do you see the same messages? Can you open and edit programs? Is any new output produced when you press compile?

Hi Mellis,

Yes it happens every time, whether I run the .exe directly or start it from the batch file.

After it locks I can't do anything at all. There's just a grey pane where the IDE should be
as it isn't handling repainting.

I then have to kill the process using the task manager.

btw. I'm running XP Pro patched up to date.

When does it lock? Right when you launch the program? Or can you open files, enter text, etc. first? It the latter, what causes it to crash?

Hi Mellis,

I can load a sketch and edit it fine. It is when I try to compile that it locks up.

I was reading some of the documentation which seemed to indicate that old
Cygwin DLLs might cause problems. I have Cygwin installed for other projects
and so renamed the Cygwin directory.

However the IDE still locks when I try to compile unfortunately...

Hmm, do you have any other programs that use cygwin running?

If you look in the sub-directories of the hardware/libraries/ sub-directory of the Arduino application directory, do you see .o files? What happens if you change the selected item in the Tools > Board menu? It would be weird if your libraries would compile but not a sketch, so that might help track down the problem.

I've just spotted I've posted this in the wrong section! My apologies.

The board is set to Arduino Deicimila which is correct. When I try
changing the board setting the IDE locks up.

Looking at the XP taskmanager I can see that when the IDE is locked
up the AVR tool avr-g++.exe runs, and then seems to spawn as.exe,
which I assume is an assembler.

It appears I'm having the problem with AS.exe as when I kill this
process using the task manager the IDE starts working again.

My guess is that this is still some DLL dependency problem but when
I run as.exe from the command line it works....

Hmm, do you have any versions of the cygwin DLL's anywhere in your path or any Windows system directories?

What if you run as.exe from within the main Arduino application directory on the command line? That is:

cd D:\Projects\arduino-0010

followed by:

hardware\tools\avr\bin\as.exe

? The cygwin DLL's are in the main Arduino application directory, so it's possible you might avoid a conflict if the working directory for as.exe is something else.

Hi,

I tried that. It isn't ~\avr\bin\as.exe as the as.exe is in another avr subdirectory - ~\avr\avr\bin\as.exe

With no arguments as.exe just runs up and I see nothing. When I press return as.exe exits and it returns
to the command line.

That's the odd thing as the as.exe seems to run ok from the command line from the IDE working directory
and yet when the IDE runs it something is blocking...

I am having the same problem - exactly (XP Pro, arduino-0010, Freeze on compile, Freeze on changing board used, killing as.exe in task manager unfreezes it etc).

I couple of extra bits of info I gathered:

  • arduino-0010 used to work fine for me. I haven’t used it for maybe 1 month. Now always freezes.
  • I tried unzipping a fresh copy into a shorter folder path (C:\program files). Still freezes.
  • I searched my entire HDD for “cygwin DLL” and it only appears in arduino-0010 folders. I don’t do other cygwin stuff. So thats probably not the problem.
  • I tried Quitting and disabling all security software changed since it used to work (BOClean, COMODO firewall, COMODO Defense+. Antivir guard) except Windows Firewall. Still freezes.
  • When I kill ‘as.exe’, the IDE the following text in it:
In file included from utility\twi.c:25:
c:/program files/arduino-0010/hardware/tools/avr/bin/../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete.  Use <avr/interrupt.h>."
Couldn't determine program size: C:\Program Files\arduino-0010\hardware/tools/avr/bin/avr-size: 'C:\DOCUME~1\ecw24\LOCALS~1\Temp\build54702.tmp\Test.hex': No such file

(only the last line appears after hitting the compile button).

  • I see .o files in every sub folder of ‘\hardware\libraries’ except the ‘Wire’ folder.
  • I managed to switch to my board (NG with ATMEGA168) by killing ‘as.exe’ when it freezed. I exit and reload arduino IDE. It still freezes on compile.
  • I have Sun Java 1.5.0. I took an exact copy of my install and it compiled fine on an XP machine with Sun Java 1.5.0_5.

Oh, and I wondered how ajlennon got up a DOS box - is he referring to the bottom of the IDE?

Hi Mindspace,

I'm glad it isn't just me... I did a bit more investigating and pulled
out the command line for the copy of as.exe that avr-gcc.exe is
running.

d:\arduino-0010\hardware\tools\avr\bin..\lib\gcc\avr\4.1.2........\avr\bin\as.exe --traditional-format -mmcu=atmega168 -oC:\DOCUME~1\ALEXJL~1\LOCALS~1\Temp\build14359.tmp\WInterrupts.c.o C:\DOCUME~1\ALEXJL~1\LOCALS~1\Temp/ccP1cJGR.s

Interestingly if I run this in a DOS box sometimes it works, sometimes
it locks up...

My gut feeling is there's a DLL problem somewhere, perhaps with
the Cygwin support but I haven't had the time to dig deeper yet.

[Added] I've just noticed your question about the DOS box. I was meaning running the shell Cmd.exe.

Alex/

Hi. ajlennon

Yeah, not so sure about cygwin dll problem - I don't have any other cygwin on my machine.

What version of Java do you have ("java -version" at the DOS box will tell you). I want to try upgrading mine, but it failed on Friday, so I'll try again Monday.

And do you use any security software, maybe like what I mentioned? I know that COMODO Defense+ was alerting me to a number of actions Arduino IDE was taking. But I still got freezes with it disabled...

I'm still not clear on how you got info in a DOS box leading up to a freeze in the IDE, but its probably not hugely important.

Fingers Crossed.

Hi Mindspace,

I have a few Java JREs and JDKs on my system but the one currently in the path is:

java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)

I'm running the Comodo firewall and Avir Antivirus.

I wasn't suggesting that the info in the DOS box was directly related to the freeze in the IDE.
Excepting that the IDE freeze is ocurrs when the IDE has run avr-gcc which then runs as.exe.
Similarly in the DOS box if I run as.exe directly with the same command line arguments I
see that about half the time it doesn't exit, which no doubt is the behaviour that is causing the
IDE freeze.

Best Regards,

Alex/

Hi all,

I've discovered the problem, although I can't say I fully understand
what is going wrong.

I happened across this thread in my Googling -

The poster refers to the Logitech process 'LVPrcSrv.exe' which I
had running on my system. When I kill that process I can compile
the example sketch successfully...

Somebody might want to add this into the installation docs as it's
caused me no end of trouble...

Cheers,

Alex/

Yep - that's the culprit. I killed 'LVPrcSrv.exe' and then I could compile good as gold.

I agree - that gotcha should be documented clearly where people would look for it. I suspect the Arduino IDE could check if that process is running and throw an error, but that is beyond my capabilities.

Thanks a bundle!

I added a note about this to the troubleshooting guide.