Question

Final Edit: This problem is solved, after I downgraded to SDK for iPhone 2.2, then deleted all the files in the Crash Logs in the Organizer window (then upgrade back to 3.0 beta 4). Apparently there were too many of Crash Logs associated with my iPhone (like 300+). Thanks you guys for insights!

Original problem: After I update my iPhone SDK to the newest Beta 4 (released April 28th), Xcode completely crashes whenever I open it, leaving me this:

alt text http://ivzhao.com/temp/sdkbroken.jpg

Anybody have any idea what this Internal Error, NSCFString out of bounds businesses are? Now I can't even open the Xcode to do some normal, non-iPhone related programming. So frustrating.

My guess is maybe it has something to do with my Device (in the Organizer window). So is there's anyway to delete my iPhone's profile in there (Ivan Zhao's iPhone) so I can start a new one. I try to uninstall/reinstall SDK but my old iPhone's profile remains.

Edit: I copy pasted the error message in from Console (Application/Utility/Console). Now looks like something wrong with the external editor compatibility (I am using TextMate as my external text editor.) The problem now is that I can't even open Xcode->Preference to set the text editor back to Xcode's defult. Any ideas?

03/05/09 9:22:49 PM Xcode[2457] Error loading /Library/InputManagers/Edit in ODBEditor/Edit in ODBEditor.bundle/Contents/MacOS/Edit in ODBEditor: dlopen(/Library/InputManagers/Edit in ODBEditor/Edit in ODBEditor.bundle/Contents/MacOS/Edit in ODBEditor, 265): no suitable image found. Did find: /Library/InputManagers/Edit in ODBEditor/Edit in ODBEditor.bundle/Contents/MacOS/Edit in ODBEditor: GC capability mismatch

03/05/09 9:22:50 PM Xcode[2457] ODCompletionDictionary (Version 4.1.v255) loaded

03/05/09 9:22:51 PM Xcode[2457] An uncaught exception was raised

Thanks, please help me out; my developing life is in a halt now : (

Was it helpful?

Solution

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.

OTHER TIPS

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.

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.

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.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top