Compiler getting flaky

I am using the latest version of the Arduino software (1.0.4) in Windows XP. I find that lately, my compilation times for modest-sized sketches can be 15 - 30 seconds: the progress bar advances to about the center, hangs for a while, then finally completes. Sometimes, but not always, I get a message that says

"unable to write to ...\core.a: file exists".

However, the sketch will download and run anyway.

The only suspicious thing I have done lately is to download the Atmel Studio, but it is not active when I am using 1.0.4. Any ideas what might be causing this?

Thanks in advance for any help.

Clicking compile or upload while the IDE is already compiling or uploading will cause this error. I have done this a few times by accident, sometimes it uploads, sometimes it dies in a spew of java exceptions.

I wish there was a 'clean' button for helping this problem ( IDE doesn't seems to clean up temp dirs on exit either, leaving thousands of files after a few days of use ), I have also had AVR apps conflicting with includes from ARM apps when the IDE uses the same temp folder for upload.