耐心的按"Upload" button :
In my experience the IDE didn't lock up for longer than 6 seconds --
go slow and be patient (and don't click the Tools menu).
I was able to reprogram it from linux by repeatedly clicking the "Upload" button a few times (waiting between clicks),
ignoring the error about /dev/ttyACM0 -- it got through eventually.
Although I removed my bluetooth dongle(suggested on Arduino site) and a package called "BRLTTY"(suggested on ladyada.net)
to get it working again and that also after many tries. After I uploaded blink sketch everything is working fine.
I suspect the problem was with the Serial communication because now I am using bluetooth again and still am able to
upload sketches