[SOLVED] IDE crashes without notice

Solution: Just deactivate ClearType in Windows7 control panel... ]:D

Hi all,

I ask for your help on IDE crashing. These are my hints. Any help will be appreciated.

1.- No problems at all with my Duelmilanove. It's working great. It's an issue related to IDE itself. 2.- Suddenly, after months of working, IDE won't load anymore. It shuts down after splash screen without notice nor error. 3.- I'm using Windows 7 ultimate, IDE 1.0, no other com but arduino usb com. It doesn't run, nomatter the arduino is plugged in or not. 4.- Tried with java 7, 6, no java at all. None of these worked. Removal included arduino references on regedit. No luck. 5.- Removed preferences.txt from Users/myuser/... 6.- Renamed java folder on Arduino folder. 7.- Downloaded and tried with IDE from 022 to 1.0. 8.- Removed every C++ runtime from my system (this is the only thing installed after the IDE was working) 9.- Executed arduino from cmd with trace on. Exit code=1. No more data.

Any clues? How can I find out the error that causes the shutdown?

I really appreciate your help. My new ethernet shield just arrived I can't play with it!!!

I'm thinking about reinstalling windows 7. It seems a drastic solution for a java simple IDE. Doesn't it?

Thanks in advance! Sergio.

I'd remove any trace of the old IDE, do a new IDE install in a new folder and maybe going back to a previous instance of windows that was working before the issues started.

The IDE creates a lot of temp files and folders in the folder \AppData\Local\Temp
Maybe something has been corrupted in this location and preventing the IDE from launching.
It would be safe to delete all files and folders in this location to see if this may help with your problem.

Hello my friends !! I'm very new at almost everything about Arduino but I had the same problem which now seems to have solved. I did what Louis said in addition to what I inadvertently did afterwards!! I just copied the folder containing the arduino 1.0 stuff (which was originally on my desktop for some reason) and pasted it in my programfiles folder(and not even in the programfiles x86 !! ) and then I ran it from that location and it miraculously came up !!! I'm not even sure whether it's gonna work on your device or weather it can be a long term solution but I hope It can help you figure out the root of the problem. Good luck XD

The below is a previously posted batch file to clear out the orphaned arduino temporary files. I think that having a lot of the orphaned files can under some circumstances cause the IDE to try to use a lot of memory. Below is the location on my pc of the arduino temp files. Put the batch file in the Temp folder and make a short cut to the batch file for routine cleaning.

C:\Documents and Settings\zoomkat\Local Settings\Temp\deletetemp.bat

deletetemp.bat

del jna*.tmp
::del console*.tmp
::del untitled*.tmp
del fla*.tmp

for /d %%a in (console*.tmp) do rmdir /s /q %%a
for /d %%a in (untitled*.tmp) do rmdir /s /q %%a
for /d %%a in (build*.tmp) do rmdir /s /q %%a

Thank You very much for your hints zoomkat, Kevin and Louis. None of these helped. :(

I'm pretty sure that is has something to do with java installation as JDowloader also behaves the same and this is a very well know java application.

I did remove java using revo unistaller, and installed again with no luck.

After installation, Sun web page says that the installation is fine... but I may be missing somethig. How can I install a clean copy of java? Do I have to install both JRE and SDK? I read out a lot of posts in this forum and found no hints...

Thanks again for you patience...

Sergio.

In my particular case, I am only using the version of Java that is included with the Arduino IDE package. I do not have another Java installation.

Thanks Louis, that shortened my "to do" list a lot. I will remove java at all and follow that way.

Anyone knows how to activate trace on IDE start up?

The below is a previously posted batch file to clear out the orphaned arduino temporary files. I think that having a lot of the orphaned files can under some circumstances cause the IDE to try to use a lot of memory. Below is the location on my pc of the arduino temp files. Put the batch file in the Temp folder and make a short cut to the batch file for routine cleaning.

C:\Documents and Settings\zoomkat\Local Settings\Temp

I discovered this business a week or so ago. Turns out, on my old WinXP machine that has Arduino IDE crash problems, there were 14-GBytes of Temp files, going back for 5-6 years, and that used up fully 35% of my 40GB HD space. [35% !!!! - thank you BillGates for never doing garbage collection].

Everytime I did a compilation using one of a dozen or so development tools, a new folder was created in Temp, and never removed.

The Arduino IDE does appear to "try to" clean out the current Temp folder when the IDE closes, although it does not seem to remove any prior folders, so they multiply without limit over time.

Also, what I did find is that, for some reason on the machine where Arduino IDE crashes, the IDE does not delete file "core.a" when it closes. The file attributes are set to read-only or whatever, and the file cannot even be deleted MANUALLY. When attempting to do so, you get an error msg that says something like "file in use by another program".

Also, when I try to shut down the machine, it hangs up for minutes, then finally an error popup occurs that says the Arduino IDE is shutting down, even though I had closed it long before.

IOW, there seems to be a couple of problems with the IDE shutting down, at least on my machine. None of my other dozen or so dev tools has this probem, so I don't agree that the problem is "a lot of orphaned files", rather the IDE doesn't remove them all properly.

Thanks Oric. No luck again. I deleted lots of temp files but nothing happended. After more than 20 hours since saturday I'm giving up. I'm thinking about reinstalling windows.

Thanks for your support.

Sergio.

thank you BillGates for never doing garbage collection.

It is not a windows problem, it is an IDE issue. I have to use task manager to kill the IDE when the IDE becomes non responsive (usually after my laptop has gone into sleep mode at some point). The IDE never cleans out the huge amount of temp files it makes.

Quote thank you BillGates for never doing garbage collection.

It is not a windows problem, it is an IDE issue. I have to use task manager to kill the IDE when the IDE becomes non responsive (usually after my laptop has gone into sleep mode at some point). The IDE never cleans out the huge amount of temp files it makes.

It seems to be a problem that ALL windows apps have, not just the Arduino IDE. 100s of programs seem to leave files in the Temp folder, and they never get cleaned out even after 5-6 years. To me, Windows should have realized that those 14GB of 5-YO folders and files on my HD were wasted space and deleted them itself. Alfter all, everybody puts them in the same Temp directory. If it only had brain like Dorothy, that is. LOL.

OTOH, FWICT, Arduino IDE creates 3 new folders whenever it starts up, and does delete "most" files in those folders on closing - when it closes properly. I just checked on my netbook, and I have many dozens of build, console, and untitled folders in Temp, but most are empty or sparsely populated with files. Mainly stdout.txt and stderr.txt, plus sketch folders.

The build directories are all empty. The untitled directories all have the "empty" sketch in them that the IDE shows when you start it up. There are ~100 such empty sketch folders in Temp, never deleted.

OTOH, on my other XP machine where the Arduino IDE crashes, "core.a" never gets deleted from the build folder, and the IDE never shuts down properly when I close it.

Thanks Oric. No luck again. I deleted lots of temp files but nothing happended. After more than 20 hours since saturday I'm giving up. I'm thinking about reinstalling windows.

You have the crash problem on your new Win7 machine, I have it on my 6-YO WinXP notebook but not on my 2-YO WinXP netbook.

I somehow doubt that reinstalling windows is going to help.

Offhand, are you finding that the IDE leaves the file "core.a" undeleted, as happens on my machine? It will be located in the buildxxx.tmp fiolder that the IDE creates. On my good machine this folder is cleaned out when I exit the IDE.

I figured out a way to launch the IDE from command line and capture some debug information from the Java runtime.
Execute this command line from the folder where the arduino.exe file is installed:

“C:\arduino\arduino-1.0\java\bin\java.exe” -verbose -Xms128m -Xmx128m -classpath “lib;C:\arduino\arduino-1.0\java\lib\tools.jar;lib\pde.jar;lib\core.jar;lib\jna.jar;lib\ecj.jar;lib\RXTXcomm.jar” processing.app.Base

You will see a bunch of information in the console window. Hopefully this will help narrow down the cause of the problem.

Wow! Louis, you made the difference.

Launching IDE from : F:\arduino-1.0>.\java\bin\java.exe -verbose -Xms128m -Xmx128m -classpath "lib;C:\arduino\arduino-1.0\java\lib\tools.jar;lib\pde.jar;lib\core.jar;lib\jna.jar;lib\ecj.jar;lib\RXTXcomm.jar" processing.app.Base

worked! :)

If I try to launch it using the exe file it stills not working.

At least I went back to work.

Thanks dude!

"C:\arduino\arduino-1.0\java\bin\java.exe" -verbose -Xms128m -Xmx128m -classpath "lib;C:\arduino\arduino-1.0\java\lib\tools.jar;lib\pde.jar;lib\core.jar;lib\jna.jar;lib\ecj.jar;lib\RXTXcomm.jar" processing.app.Base

You will see a bunch of information in the console window. Hopefully this will help narrow down the cause of the problem.

The following doesn't help with the startup problem, but is the typical way of displaying all that info in the console window. Once the IDE has started [assuming you can get there], go to "File > Preferences", and edit the preferences.txt file to include the line "build.verbose=true". You have to close the IDE before saving the file, else the IDE will overwrite it.

This apparently has the same effect as your -verbose parameter above. This is how I found out where the IDE stores all the build/console/untitled folders that never get deleted, and also that "core.a" is never deleted from buildxxxxxxx.tmp on my machine that hangs when the IDE closes.

I can see the problems, but still have NO WAY to fix them.

That command is the command that is issued by the arduino.exe application to launch the IDE in the java environment. The -verbose switch is added to hopefully see detailed information about the java environment as it is launching the IDE.

Launching the IDE with this command does not have anything to do with the preferences.txt or how the IDE invokes the compiler.

Attached is the verbose output from the command that I captured on my machine.

out.txt (184 KB)

I see...

In my particular case, launching the arduino.exe itself doesn't starts the IDE (it crashes after splash screen). On the other hand, launching your provided java line command, the IDE works like a charm. It is stable and closes perfectly.

I made a .bat file to launch the IDE as a workaround for my particular case.

Weird, isn't it?

Thanks again to all of you.

I had the same issue. Resolved it by downloading Java v 7 and installing the desktop version: http://java.com/en/download/chrome.jsp?locale=en

Then copied the bin & lib folders from the java install (c:\program files (x86\java on Win7 64) to overwrite the java\bin and java\lib files in arduino's java subdirectory. Seems the install package could use an update.

Since this is the longest running and most USEFUL thread on debugging Arduino startup problems on Windows, I’m adding my unique solution to my own problem. THANK YOU Louis for posting how to launch the IDE with verbose output! That was how I found my error.

Here was the command I ran and the error I got:

C:\arduino>"C:\arduino\java\bin\java.exe" -verbose -Xms128m -Xmx128m -classpath
"lib;C:\arduino\java\lib\tools.jar;lib\pde.jar;lib\core.jar;lib\jna.jar;lib\ecj.
jar;lib\RXTXcomm.jar" processing.app.Base > log.log

Exception in thread "main" java.awt.AWTError: Assistive Technology not found: co
m.sun.java.accessibility.AccessBridge
        at java.awt.Toolkit.loadAssistiveTechnologies(Unknown Source)
        at java.awt.Toolkit.getDefaultToolkit(Unknown Source)
        at processing.core.PApplet.<clinit>(Unknown Source)
        at processing.app.Preferences.save(Preferences.java:812)
        at processing.app.Preferences.init(Preferences.java:264)
        at processing.app.Base.main(Base.java:113)

A little researching led to this solution: Delete “C:\Users%USERNAME%.accessibility.properties” ?!

This was because I had previously used an old version of a program called Sikuli Script that required installing an old version of Java and used the Java AccessBridge in order to do some things. Apparently this file got installed, and now the default settings for Java programs were to load the AccessBridge. Maybe it was installed wrong, or just incompatible with the Java that comes with Arduino, or I DON’T KNOW but after renaming the file, Arduino IDE could launch again! Hopefully my problem isn’t COMPLETELY unique to me, and some other soul on the Internet will find this solution useful.