I am getting an assertion error when I launch Xcode 4, which I just installed. I have looked on Google and Stackoverflow, and I could not find anybody with the same problem as me. As soon as I open Xcode 4, it shows me the welcome screen. I try to open a project, and Xcode gives me a message saying I can continue using Xcode in an inconsistent state or I can crash Xcode. When I click on more details it says "ASSERTION ERROR" followed by some other debugging info. I can't copy it because when I try to highlight it Xcode freezes completely.
Any suggestions?
NOTE: This is different from other people who get this error when they build, I am getting this when it is LAUNCHED.
Could it also be because I am continuing a project from the previous version of Xcode?
[UPDATE] I have solved the problem. If you are also encountering such an error, try reinstalling Xcode 4. If you continue getting the same error, then follow the advice of #mrueg.
Xcode 4 has various bugs, and the assertion error is just a general warning that an inconsistency was detected.
The best way to get more info on the actual error that happened is to crash Xcode when you get the error and then show the details.
It probably also makes sense to send the crash report to Apple so they can fix the bug.
It is probably best to keep using Xcode 3 (which is still downloadable for the newest SDKs) and wait for the next version of Xcode 4 if your project crashes it.
Related
Yesterday i was testing my app in the iOS simulator and everything was working fine. I then decided to run the app on my iPhone and i got the error unable to install application, Unknown error occurred this has happened before so I cleaned my build folder (as this has fixed this issue before) however, the same error occurred. I then ran the app in the iOS simulator again and now i get the error Unable to run app in Simulator, An error was encountered while running (Domain = LaunchServicesError, Code = 0). I find this very weird as i didn't change anything besides trying to run the app on my iPhone. I have tried every solution given on this post and still no luck.
I'm sorry if my question doesn't contain much detail but as I said I didn't change anything and it was building and running fine a minute before plugging in my iPhone and trying to run it on there.
Any help would be much appreciated.
edit
I tried running other projects (with and without extensions) and they are working on both simulator and iPhone, therefore the problem must be within my project. (my project does have a today extension)
In that kind of cases I usually :
Product > Clean
Close xCode
Delete the Derived Data (in ~/Library/Developer/Xcode/DerivedData subfolders)
Delete the app on the iPhone
Reboot the iPhone
Restart and rebuild
I had this problem. In my case, it was caused by the Build value being blank. After putting a value there, and resetting the simulator once more, the issue went away.
I had the same problem and checking the system log carefully helped me to identify a coliding library that was causing this error. You can also check this answer if you are using extensions.
Generally it means there is a problem with the build, it may be due to old cache (solved by a clean build) or a project definition error (missing library, bad definition in info.plist, etc).
In my case it happened only on iOS 8, turns out that my widget had the wrong bundle ID.
this happens after an error that appears in organizer several time when running the program in Xcode.
the error is Xcode has encountered an unexpected error (0xC011).
any help to guide me get rid of this problem this is highly appreciated
Even when its too late but maybe for somebody else. The problem is either in your computer nor in your xcode. You must check the way you are saving the data in the files ( saving from two resource at the same file). error (0xC011) is for logging data in files.
Check your code, then delete the app. from your device then start it. It will work.
I just restarted my computer and the organizer is working now, However,the error is appearing again that is:
Xcode has encountered an unexpected error (0xC011) ‘file
exists/SourceCache/DTDeviceKit/DTDeviceKit-2083/DTDeviceKit/DTDKApplication.m:1474
Okay, so my Xcode and iPhone simulator have become really screwed up lately, all i remember doing right before this started happening is i turned off my mac. So, my first problem is that every time i open up iPhone simulator, it says the simulated application can't be run and asks to switch sdk and i click 5.0 and it keeps on saying that. I have tried reinstalling Xcode 3 times now. Second, whenever i go to open up the MainStoryboard.iphone/ipad files, Xcode freezes up and gives me the option to either crash or continue in a poor state or something like that. Next, the app I'm trying to create used to work, but then all of a sudden, it would crash at startup with this error message:
dyld: Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in:/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/Sym/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-01-03 21:02:45.802 ibtoold[1399:d03] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-933/IBPlugin/Utilities/IBObjectMarshalling.m:179
Details: Interface Builder encountered an error communicating with the iOS Simulator. "Interface Builder Cocoa Touch Tool" (1402) failed to launch and exited with status (null), signal 5. Please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" for further information.
Function: NSDistantObject<IBCocoaTouchToolProtocol> *IBAttachToCocoaTouchTool(IBCocoaTouchTargetRuntime *)
Thread: <NSThread: 0x40010a220>{name = (null), num = 1}
That is the error that i got when beginning to run the app, now instead, it just gives me two errors while building the app and here is what those say:
Command /Developer/usr/bin/ibtool failed with exit code 255
Verify exit code of build task 'CompileStoryboard MainStoryboard_iPhone.storyboard'
Build task failed without generating error messages.
These have to be in some way related and it has either to do with the storyboard settings or the iOS simulator, this has been a huge setback for the making of my app, if anyone has had this issue, please help
EDIT: ok have been trying to see if this same thing happens on other projects and it seems to be only that app with the errors, but IOS simulator doesn't work for anything. Also, literally every other thing i try to do on Xcode now prompts a crash, even trying to open up a project and look at errors in new window.
Update to a newer version of Xcode, they run smoother and are a lot less buggy.
I've been using Xcode to develop iPhone Apps for a couple of years now. In the last couple of months I've updated to Xcode 4.2 for iOS 5 development.
On previous versions of Xcode I've found it very rare that I get a crash without any log of where the error happened. With Xcode 4.2 / iOS 5 I find that I regularly get crashes without any log. I just end up with the code stopped in main.m with a message like "program received signal SIGABRT" (or a couple of other messages) but no log messages at all. (I'm looking in the "All Output" window at the bottom of the Xcode gui).
For example, my last one was where I used the initWithNibName:bundle: method but typed in the incorrect nib name. The code passed this line without error, but when I got to the pushViewController:animated: method the code crashed with the SIGABRT message but no log messages. It took a while for me to find my typo...
I'm sure in previous versions of Xcode I would see a far more informative message...
Is there something I'm missing in Xcode 4.2? Should I enable some extra debugging feature? Any way to get it to give more useful crash information? Or is this a know problem with iOS 5 / Xcode 4.2?
Thanks for any pointers...
You are not alone, I have found this too. I often find there is not enough information in the log to diagnose the crash with the lastest xcode. I have two tips that might help.
Run on the actual device. I often find for some reason I get more detailed logs when it crashes on the device.
Worst case, you can go into the organiser and check the crash logs of the device, this will give you what thread crashed and what you call stacks looked like when it crashed.
Switch between the GDB and LLVM compiler and or debugger. I havent experitmented enough with this but I believe this has helped on occasion.
My app is crashing with an error code - Program exited with status value:255. I can't find any error or stack trace in console. This crash will occur only when the app is installed and executed for the first time. I don't get this error while running the app second time. I searched around the web and found a solution. According to that I changed the Target setting of "Compile for Thumb" to off. Even after I am getting this crash and error.
In my previous versions i don't get this error. I don't know whether any change in the code or settings of Xcode causing this problem.
Any help is highly appreciated.
Thanks,
Adarsh V C.