iPhone simulator crashing on startup - iphone

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.

Related

Unable to run app in Simulator Xcode 6

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.

Xcode 4 Assertion Error

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.

Program exited with status value:255. while debbuging iphone app in device

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.

Xcode Run Error dyld: Library not loaded: /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics

tough one this.
Recently I added another target to my iPhone project to run a command line tool to create the initial database.
Since then, I started getting this error whilst running the iPhone project:
dyld: Library not loaded: /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
Referenced from: /Users/mm/Apple Development/XCode Projects/GridTest1/build/Release-iphonesimulator/GridTest1.app/GridTest1
Reason: image not found
The Debugger has exited due to signal 5 (SIGTRAP).The Debugger has exited due to signal 5 (SIGTRAP).
The bizarre thing is that this library appears to be successfully loaded earlier.
Here's some debug output generated by dyld:
dyld: loaded: /Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
dyld: loaded: /Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/UIKit.framework/UIKit
Checking dyld environmental variables and of course whether the framework is actually present, everything looks good:
IPHONE_SIMULATOR_ROOT=/Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk
DYLD_ROOT_PATH=/Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk
Is CoreGraphics.framework here?... yes it is.
/Xcode3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
To mystify things further:
App runs on device no problem either as release or debug.
Xcode 4 runs fine too either as release or debug.
Running in debug mode with a breakpoint set runs fine.
Fair enough you might say if it works ok in Xcode 4 why not just use that? Good point but you know how these problems can come back to haunt you. I don't want to leave this for now then it comes up again during submission.
Any advice would be greatly appreciated.
Btw I have searched countless lists and posts on this and related errors. I've also tried most of the advice there, e.g. restart Xcode, clean, etc. Unfortunately it didn't help.
Have been stuck on this for ages so some help would be awesome.
Cheers,
Max.
Did you start the project in XCode 3 (or earlier) and are now working with it in XCode 4? I cannot tell you the number of frustrations I've experienced with frameworks not referenced correctly as Apple has released new version of XCode over the past couple of years. The consensus seems to be to delete your project and create a new one in XCode 4. I have taken to manually editing the XML files before but in the end something weird just keeps happening. It may not be the "best" answer but should solve any odd framework referencing issues.
Thanks,
Rick

iPhone SDK 3.0 not displaying error messages

I could resolve this problem just now but assuming others might have the same problem, I post the "solution" here anyway.
When building a project in XCode using "Build and Debug" and then running it the iPhone simulator would exit without printing an error message to the console. Like for example I would access an invalid pointer and it would just terminate without printing Program received signal: “EXC_BAD_ACCESS”.
I used to use SDK 2.X and never experienced this and now I switched to 3.2 and this bug totally sucks.
Anyway. The "solution", if you want to call it that, is to set a breakpoint on the line where you access your invalid pointer, open the debugger, step over it and in the next cycle step into it. After that press continue and then close the debugger and simulator.
Then running the project using the "Build and Debug" button on the "Debugger Console" was fixed, i.e. when the simulator crashes it now prints "EXC_BAD_ACCESS" just like it used to in SDK 2.X.
Xcode will "normally" continue on an untrapped exception and display the appropriate message in the Debugger Console. However, if you have set "Run->Stop on Objective-C Exceptions" it will first pause in gdb before displaying the message. I would imagine that you may have set this breakpoint at some time - there are a few related breakpoints you can set in .gdbinit that will have a similar effect.