If you want to report this issue to Apple's engineering, send a bug report or an enhancement request via its Bug Reporter system. To do this, register as an Apple Developer—it's free and available for all Mac users and gets you a look at some development software. Since you already have an Apple username/ID, use that. Once a member, go to Apple BugReporter and file your bug report or enhancement request. You'll get a response and a follow-up number; thus, starting a dialog with engineering.
Like brushing teeth to cure cancer. Of course, not only did I try Disk Utility, but I spent almost $200 on disk recovery software to try to salvage something. No luck. The only reason I recovered the second time was that I had copied my Time Machine sparsebundle to my NAS, so that even though the Xcode install erased the Time Machine backup I still had a way to (partially) recover.
What I am looking for now is how to avoid the "erasing all mounted volumes" bug and safely install Xcode. Attempting to report the bug just gave me a Bug Reporter error, so I'm about to call Developer Customer Support by phone.
FWIW, this post was marked "Correct Answer" in this Snow Leopard thread:
Apr 26, 2011 12:58 PM (in response to Frustrated Dylan)
Been working with Apple and finally have a resolution that worked here anyway.
They traced the problem down to my /Applications/Installers/ folder where a previous version of an early Xcode installer had migrated from an old G5 as I migrated all apps having recently purchased a new iMac.
I deleted that and another G5 installer and Xcode installed flawlessly via the AP store.
That said I wouldn't recommend attempting to install Xcode from the AP Store without first...
- Verifying that you have a recent TimeMachine backup.
- Logging off all networked drives and connected drives--even flash drives.
Thanks jsd2. I had seen this before, but didn't want to "assume" that it was the fix for the latest Lion and Xcode, as the bug and fix were reported for Snow Leopard. I girded the ol' loins and tried a third install, this time with the Ethernet cable unplugged, and after deleting the /Applications/Installers folder. It Xcode installed fine.
So, the same bug is still there and the same fix still works. SUCH a castrophic bug, though. Certainly this should be raised and fixed ASAP. Unfortunately, three times I tried to submit my first bug report and three times the Bug Reporter just said that there was some kind of error and gave me an email link to report the Bug Reporter failure. I've just gotten the automated response from that. No sign of human involvement yet.
At least I'm up and running Xcode 4 now.