So, I just finished figuring out why I was constantly getting this error:
java.lang.NullPointerException at processing.app.Serial.setDTR(Serial.java:480) at processing.app.Uploader.flushSerialBuffer(Uploader.java:76)
when trying to upload a sketch.
I am running Vista 32-bit Ultimate with the Diecimila board.
The problem is indeed that something else has a handle to that port. But what software could possibly be so rude as to open the Arduino port automatically??? The answer is the X10 Device Network Service.
As an administrator run net stop x10nets then remove and re-insert the usb cable for the arduio then restart the ide and you should have better results.
Also, I've had some conflicts with the version of java installed on my pc. Using the run.bat file solves everything wonderfully.
For vista, on the 09 release you will need to follow the instructions elsewhere on this forum to get the latest version of winavr into the arduino ide.
Just thought I would post these findings in case anyone else runs into a similar problem.