signal SIGABRT Error when trying to run xcode 5.0 app - iphone

Sorry to ask, I have tried everything I have read online, but I keep getting the SIGABRT Error when I try to run an app.
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
#autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
Error code comes up beside the return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
line.
The debugger just states
2013-10-18 10:29:45.270 Black History Month[733:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x903f770> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** First throw call stack:
(0x14a3052 0xea3d0a 0x14a2f11 0x9b3032 0x924f7b 0x924eeb 0x93fd60 0x23291a 0x14a4e1a 0x140e821 0x23146e 0x233010 0x1314a 0x13461 0x127c0 0x21743 0x221f8 0x15aa9 0x138dfa9 0x14771c5 0x13dc022 0x13da90a 0x13d9db4 0x13d9ccb 0x122a7 0x13a9b 0x2712 0x2685)
terminate called throwing an exception
I have tried producing a couple different apps and always get this error so cannot release, I have now tried a simple uiwebview app and the same thing keeps happening. I have tried running on many different deployement targets with no successful outcomes.
I have tried resetting the simulator, restarting both xcode the simulator, and computer multiple times, turned off auto layout for the xib file. No luck. Any ideas?
Thanks in advance

This has nothing to do with Xcode. Your application has thrown a run time exception. Since the exception is not caught anywhere it is poped upto main. Set an exception to All Breakpoint to figure out whats wrong. If your app worked in Xcode 4 then check the iOS deployment target. I suspect it has to do with iOS 7 which is default target in Xcode 5.

I also had this error. After spending so much time, I found how to fix it. First of all go the console and see where is the error (mine was related to storyboards and its code) The way I fixed my error was by going in story board. Below the iPhone screen, there will be small yellow button. Right click on it and you will see that is causing error. Delete(x) it if there is yellow error sign.
If this does not fix your error then try to make new project and then replace its blank files with old files of your old project. I had same error in very beginning and by doing this program run without any error.
Other people suggests by restarting your laptop and running it again, reseting the iOS simulator, or changing iOS debugger (however this does not work in latest x code since there is only one debugger)
Hope this helps

From the error message
[<UIApplication 0x903f770> setValue:forUndefinedKey:]: this class is
not key value coding-compliant for the key view.
one can see that you try to set the view property on an instance of UIApplication,
but UIApplication does not have a view property.
To find the point where the error occurs, set a breakpoint on
"All Objective-C Exceptions".

I also had this error. After spending so much time, I found how to fix it. First >of all go the console and see where is the error (mine was related to storyboards >and its code) The way I fixed my error was by going in story board. Below the >iPhone screen, there will be small yellow button. Right click on it and you will >see that is causing error. Delete(x) it if there is yellow error sign.
I would +1 Viraj's answer, but I don't have the reputation. I can verify that in a Swift project in X-Code 6, this solution works. My problem was:
My app ran great on the initial view controller and on the 2nd screen, but upon trying to load the third view controller, my app would crash and return the "SIGABRT" error.
The Fix was indeed to go to the screen where my app was crashing, right click on the yellow icon (which is ABOVE the view in my version of X Code). I had two IB Outlets assigned to views, which did not have connections to the code. I did not need them too (they were old), so I deleted both from within the Outlets inspector in the right sided attributes inspector.

Related

EXC_BAD_access code=2 address 0x8

I have an app that I've been working on, which worked perfectly on iOS 6 in XCode 4.5, but now I downloaded XCode 5 with iOS 7 and get this error,
Thread 1: EXC_BAD_access code=2 address 0x8
in main.m :
#import <UIKit/UIKit.h>
#import "TestAppDelegate.h"
int main(int argc, char *argv[])
{
#autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([TestAppDelegate class]));
}
}
I downloaded iOS 6 sdk and the code work perfect on iOS 6 sdk yet but with iOS 7 , i get this error , and I don't know why?
I try to debug this but get no information about the crash. I read something about zombies and enabled it by going to Product->Edit Schema->Diagnostic->Enable Zombie Object. But even after this I didn't get anything helpful.
Any pointers?
I'd like to expand on the tip given by Vinzzz but differing slightly (exception not symbolic breakpoint).
The problem here is that the program has stopping on an OS caught exception (bad access). You need to go one step earlier than this, to see the exception in code which would lead to an iOS exception. Go to the breakpoints tab on the left Xcode screen panel section (Breakpoint Navigator). Then at the bottom of the panel there should be a + sign. Click there and add an 'Exception Breakpoint'. Re-run your program and you should now be breakpointed when the problem is attempted to be introduced into the OS environment. This gives information about who and what is the cause.
When you get to the (lldb) prompt try to hit the continue button. That may reveal the underlying error message in the top of the debugger console. Look for the top of the bold text to see what possible object is causing the problem. This type of error usually refers to an attempt to access an object that has been deallocated.
I had this error too because in my user model class I had an extra object I declared as
var image = UIImage()
I didn't use it for that task I took it off from model class, my app didn't crashed I would check model class.

Exception on app startup in device,works fine in simulator

The application works fine on the simulator but breaks in start up in device as in the figure
I tried some of the solution in SO but It doesnt work out.What may be the reason ?How can i find it? How to resolve it
For clarity
Tried : Changing the view controller the viewcontroller. view did load and all functions are working fine after that when the view tries to appear on the screen the crash appears
UPDATE : Now getting the error logged as
*** -[Not A Type retain]: message sent to deallocated instance 0x208c9610
I had the same issue before. This is not a crash. Please remove all your break points and run it again.
This is a Breakpoint error ..... It normally occurs when you add a breakpoint to an app running in the device. If you add the breakpoints before the app has been built and run it again.... The crash will not occur.
Even I couldn't figure out why this crash should occur in the first place but it does.
OK found out the problem.I am using an external library which does not implement ARC so it has to be flagged.all files except 2 are not flagged as -fno-objc-arc and hence the issue.

Xcode error at runtime

You can see the error in the image.
I don't even know what these errors mean, it was working fine before I updated Xcode for the iOS 6 update. I've done a few things to try and fix it such as change the target OS and do a Clean, but that has not worked.
I get the error after the app successfully is built and pushed to the device.
Your application crashed at runtime, because there was an exception.
The exception is written in your console log. We can see it in your capture:
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x...> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
This means that somewhere in your application, you tried to set the "view" property of an object of type UIApplication, but UIApplication does not have any view property, so this crashes.
This is very likely that in your MainWindow.xib file, you connected a view IBOutlet to an object of type UIApplication, but this binding of your outlet is invalid because the outlet does not exist anymore.
(maybe you added the outlet at a given time, and binded/connected it in IB, and then removed it in your code, or maybe you binded the IBOutlet then changed the class of your object so the new class does not have the same outlets at all, whatever the outlet is now binded to a non-existant property in your XIB and that generates the crash)
To fix this, open your XIB file in interface builder and remove this invalid connection to your now non-existant outlet, and your exception should go away.
It means your program crashed. The error is in that box in the corner right. I can't see the whole error message, but it has something to do with key-value coding.
It might be the simple fact that you're running a slightly outdated version of your program. Delete it from the simulator or your device, clean and re-build your project, and let Xcode re-copy it over.

App crashes while loading with error in main.m

I'm trying to recover an app that I accidentally deleted and managed to do it through the organizer, however, now when I try to run it on the simulator or iphone, it crashes with an error popping up in the main.m file:
int main(int argc, char *argv[])
{
#autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
The error occurs in the "return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));" section of the file with the SIGABRT error. I am using Xcode 4.2 with ARC on. I am testing it on ios 4.3 and ios 5.0. The app was working before and in fact, is on the app store right now. Anything would help
If you look in the debugger it will probably tell you what caused the error. This has happened to me before, due to insufficient memory (too many items on screen at once). Either way, look at the target debugger for what caused the error.
Usually when I get similar errors is because there is a broken link on the Interface Builder. Maybe you've changed the name of an IBOutlet and forgot to connect it again.
If you are using Storyboards, make sure you haven't hooked up duplicate referencing outlets or reference outlets that aren't there anymore in your code. In other words, if you dragged from a button on your view controller to your code and then the property or method has changed at all, you can get this error.
happened to me, looked in the debugger and found it mentioned a name I given to an action, but deleted it after I created it both viewController .h and .m so for some reason that old action created with a different name, still lingered somewhere... so I copied my code and pasted it on a new prog. Of course, it was a very small one view app so it was easy...
I've seen this happen before if the following build settings are not there. OTHER_LDFLAGS = -ObjC -all_load
This is under Linking in the target.
Not sure what the error message is—that would be helpful. But are you importing AppDelegate.h?
It happened to me and all I did was changed the name of my image view and than changed it back later. But, I forgot to disconnect the other name after I deleted it. However, once I disconnected it from interface builder it worked.
Crashed with LLDP debugger I changed to GDB and then it worked.
I got stuck with this problem too but not all the time only 1/2 launch. Absolutely no error in the console no nothing, just a signal SIGARBT. My AppDelegate did not even went to didFinishLaunchingWithOptions. Changing the debugger back to GDB (Edit Scheme… > (Info tab) Debugger > LLDB) solved the problem.
To fix it, click on mainstoryboard i.e. Interface Builder, select the File Inspector tab, and uncheck Use autolayout.
Alternatively, you can target iOS 6.0+-only devices and change the minimum target, if you absolutely must have autolayout.
This problem occurs due to mismatch in versions of xcode and source of learning programs from.

Error on empty project: "this class is not key value coding-compliant for the viewcontroller."

this error drives me crazy. I already spent hours on fixing this, unfortunately without success.
I tested my app in simulator, everything works fine. I'am testing it on my device (iphone 4 with ios 4.3.3) the app won't start.
So I tried creating a new project, build and go. And the end of the error now says instead of viewcontroller, key window.
To get further information about the error I setup an exeption breakpoint whicht breaks on throw and on all exeptions. Something interesting happend now: when I am launching the empty project on my iphone I get a warning:
warning: Unable to read symbols for /Users/xxx/Library/Developer/Xcode/DerivedData/testing-cmaekkzgdqyseidlqkorvrdvvodg/Build/Products/Debug-iphoneos/OLDAPP.app/testing (file not found). (The app which I am runnning is called testapp, not OLDAPP?! This was my last project!)
Some further errors now occure:
Unknown class OLDAPPAppDelegate in Interface Builder file. and Unknown class RootViewController in Interface Builder file.
I did clean all targets and made a clean build. Nothing changes…
I didn't change anything in IB, just edited the provisioning profile to run the app on my phone.
Help is very appreciated here :-) Hopefully someone can help me I would be really thankful.
The whole error message: *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UICustomObject 0x18b410> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key window.'
This happens to me if I change the name of an outlet on the ViewController which was connected to something in the View in Interface Builder. For example, renaming 'labelFirstName' to 'lblFirstName' and forgetting to break and recreate the connection in IB.
I had the same problem where there were no !'s in my XIB and no re-naming problems. To fix it, I just created a new XIB, copied in the view from the old XIB, and rewired all the connections.