If you've installed Safari 4 Beta on OS X 10.5.6, you may have noticed that XCode quits unexpectedly on launch. The solution is to update XCode to version 3.1.2 as noted in this knowledge base article.
You can download the (996mb!) update here (requires a free ADC account).
Mac OS X Hints
http://hints.macworld.com/article.php?story=20090228131352369