I have had exactly the same problems which you describe. I've gone back to stock (tried eclair and Gingerbread), I've tried flashing different camera firmwares, and I've bought a new camera module from ebay. Nothing worked. Gave up.
Front cam works fine, but main cam just FC's the gallery app.
Interestingly though I can pinpoint exactly when it happened. Phone was stock, I'd just been given it from a friend. Checked camera and it was working fine. Thought I'd factory reset the phone to remove my friends email accounts and any personal information so I did that... Rebooted phone and immediately noticed that the camera wasn't working, and since that moment never has...
So it seems to me that it must be a corrupt or deleted file (driver, etc)
Sent from my GT-I9000 using Tapatalk