A: 

So is there's anyway to delete my iPhone's profile in there (Ivan Zhao's iPhone) so I can start a new one.

The profiles are in ~/Library/MobileDevice/Provisioning Profiles.

Mark Smith
tried. nothing helps. I think it's something wrong with the DEVICE not the provisioning (even when I unplug my iPhone it still shows up in that Organizer window, for a second before it crashes)
ivanTheTerrible
A: 

At the most basic level, the -[NSCFString substringToIndex:] method has been provided with an index that is out-of-bounds. Since it doesn't look like other people are reporting your problem, it could be that there is some string on your system that is shorter than expected (i.e. substringToIndex was given an index that is past the end of the string).

Basically, it looks like it's probably an XCode bug. Post the stack trace information that it says it printed to the Console and maybe it'll give us a better idea.

This old post describes a similar problem with another Cocoa app. In that case, the problem was internationalization -- and particularly date and time internationalization. Do you happen to have Region set to something besides United States in the Format tab of the International preference panel in System Preferences? If so, try setting it to United States to see if anything improves.

If that's not it, the data from Console might be of some help.

Naaff
I tried (switching my region from Canada to US), but still the same problem. So frustrating.
ivanTheTerrible
+1  A: 

Try removing Completion Dictionary, which is a third-party extension that hooks in to Xcode. One part of it isn't loading, because it's incompatible with the Objective-C Garbage Collection, and I suppose that when the other part loads it tries to use the code that failed to load, and crashes Xcode.

cdespinosa
Solved the problem on my own, but you provided the insight. Thanks!
ivanTheTerrible
A: 

When do you get this error?

I updated to beta 4 yesterday and the mail.app crashed whenever I opened it. It would open the first page of one of my accounts, grind for several seconds then crash. When I was out of the mail app the iPhone seemed sluggish. When my iPhone was plugged into the MBP and had XCode running XCode would take up all my processor resources.

I looked at the preferences and discovered a mail account with no info behind it. I deleted it and the mail.app worked as expected. So I suspect that what was happening is that the iPhone was trying to pull from this nil email account over and over again.

So just for grins I'd take a look at your preferences for mail and see if you have a null account in there.

OhioDude
I got this error since yesterday, May 3rd.Also, I tried to look into my Mail.app, there's no null account.
ivanTheTerrible
A: 

I had AirPlay SDK installed and I deleted it after my previous version of iPhone SDK Bet 3 uninstalled. Once I saw the previous problem, I put that directory back into my /Developer folder, the error went away. I think there is a plug-in added with the install and that must be the one causing this issue.

Please post any suggestion to remove AirPlay SDK completely from my system.

Muthu
A: 

Somehow related to this - for me Xcode started to crash when the Organizer was displayed. Seems that it was related to a malformed plist entry inside my iPhone project... I have documented it here: http://spielhaus-ftw.com/blog/2010/08/xcode-crash-loop-countbyenumeratingwithstate

Nicolinux