Suddenly can't compile any project anymore, avr-g++ returns 3

Hi,

all of a sudden I can't compile any code anymore, even the blink.ino starters project. All compiling stops with the message:

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
F:\arduino-1.0.1\hardware\tools\avr\bin\avr-g++ returned 3

OS is XP, I tried installing the latest Java version (v7 update 21), latest version of IDE 1.0.4 but nothing helps.

Can anybody help?

cheers,

Arthur

Narrowed it down to this simple command line statement together with the output:

C:\temp>F:\arduino-1.0.1\hardware\tools\avr\bin\avr-g++ -c -g -Os C:\temp\sketch_may05a.cpp -o C:\temp\sketch_may05a.cpp.o
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

So avr-g++ seems to abort and returns exit code '3' to the calling process. I could not find a list with avr-g++ return codes. Is there any?

....and C:\temp\sketch_may05a.cpp only contains an include of arduino.h, no code at all

Have you installed Cygwin recently?

Nope, never installed it.

I've got the same problem. All of a sudden I can't copmpile anything. Although I must say that I installed Java build 1.7.0_21-b11 when needed to run multiwii config. I had 1.0.1 and also tried the 1.0.4 but I keep getting the same message. Any ideas?

I also have Java 1.7.0_21 and it was recently installed. But I tried to go back to 1.6 and that did not help. Same error.

I uninstalled all aruino s/w and winavr s/w. cleared all registry leftovers. Reinstalled arduino with 1.0.5 version and i still get this message. Can anyone help witjh this?

What happens if you run avr-g++ (without any arguments) from the command-line?

it brings out the msg "no input file"

@avbeek reported...

avbeek:
....and C:\temp\sketch_may05a.cpp only contains an include of arduino.h, no code at all

Is that also true for you?

I entered avr-g++ -c -g -Os test.cpp -o c:\test.cpp.o and
I got the same message:
“This application has requested the Runtime to terminate it in an unusual way. Please contact the application’s support team for more information.”
test.ccp has just an #include <Arduino.h> line.
It didn’t say anything about return code 3.

Are you able to build (verify) any sketches?

Try clearing the TEMP directory.

Hi,
I open a simple example, like Blink, I try to just verify it and it bring out the same error message. I don't go as long as to try to load it. I just try to verify. Where is the TEMP directory? There isn't any in Program Files/Arduino. Is it somewhere else?

In Windows, click Start -> Run and type '%temp%' in the field (without the quotes) and hit OK. That will take you to your system's Temp folder. You should see a bunch of untitled[random numbers].tmp and console[random numbers].tmp folders. Those are all Arduino folders.

I’m sorry, it didn’t work either. I deleted all temp files as you mentioned untitled[random numbers].tmp and console[random numbers].tmp folders. :~

How are you starting the Arduino IDE (arduino.exe)? Short-cut? Running from Explorer?

I used to run it from a desktop shortcut. But during this debugging I ran it from .exe in \program files\arduino\ . It makes no difference. I have the same result.
Do you know if the IDE uses some environment variables stored somewhere in windows when it starts?
Also when deleting / uninstalling older version is there a possibility for something older (maybe corrupted) to remain in the pc?
I also deleted the txt preferences file and arduino created a new file from scratch.
Also should I look for something in the registry?
Where in the forum can we ask somebody from the team that wrote the IDE to tell us what the return code 3 means.
Thank you for your support.

thermike:
I used to run it from a desktop shortcut. But during this debugging I ran it from .exe in \program files\arduino\ . It makes no difference. I have the same result.

Bummer.

Do you know if the IDE uses some environment variables stored somewhere in windows when it starts?

Doesn't matter. The compiler is very likely the culprit (not the IDE). And, yes, the GCC compiler does use environment variables. And, yes, that could be causing the problem.

Try this...
• Open a command shell
• Type set and press Enter
• All the environment variables should be output; it will look something like this...

...
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 23 Stepping 6, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=1706
...

• Maybe you can spot something suspicious (and GCC / GNU related).

Note: If you decide to post the output be sure to redact any personal information.

Also when deleting / uninstalling older version is there a possibility for something older (maybe corrupted) to remain in the pc?

That's very unlikely. The entire Arduino software is kept under the one directory tree.

Also should I look for something in the registry?

As far as I know, the Arduino IDE does not use the Registry at all.

Where in the forum can we ask somebody from the team that wrote the IDE to tell us what the return code 3 means.

http://arduino.cc/en/Main/ContactUs

However, even someone from the Arduino team is probably not going to be able to help. GCC is very likely the culprit, and, as far as I know, the Arduino folks use it as it comes from the avr-gcc / GNU folks.

Try searching your computer for msvcrt.dll. There are probably several copies on your computer. There should be a copy in {ArduinoRootFolder}\java\bin.

Have you tried running the IDE as administrator?

Have you tried the latest version of WinAVR?

Have you tried this...
http://forum.arduino.cc/index.php?topic=104542.0