You must be wondering if you and macegr are the only one's with this problem. :o
It's gotten pretty simple to reproduce:
edit a sketch
either close with the X or just open a new sketch
you are prompted if you want to save your work - hit "Yes"
you loose your work
This happens on Windows (at least).
Well, just sit tight and keep pressing that save arrow! The doctor will be with you soon.
OK I admit this is pretty flip. But having a bug in an IDE that causes developers to loose their work is about as bad a bug as you can have (IMO). If I were a principal here, after verifying the bug, I would make a post to warn others. That's really my only goal here.
I do my best to fix things, but the more help I get, the faster it happens.
What do you need? I've provided instructions to duplicate the problem, but am not qualified to start messing around with the sourcecode. Is there anything else we can do to help out, other than do your QA testing? Please let me know if there is something I can help you do to resolve this problem.
Testing this on the latest version of Processing Download Processing / Processing.org would be a big help. If they've fixed the problem, then I'll just copy their fixes over. If not, I'd like to let them know so they can help figure out the fix.
(The IDE code comes from Processing, so they have a much better understanding of how the save process works.)