My code in the main.m file is as follows. I haven't changed it at all from when I started programming this app.
#import <UIKit/UIKit.h>
#import "rickAppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([rickAppDelegate class]));
}
}
I am getting the SIGABRT error on the 'return UIApplicationMain' line. My program is an app which displays a red button and when you press it, it plays a video. This error appeared after I implemented iAds using this tutorial: http://www.ioslearner.com/implement-iads-tutorial-iphone-ipad-sdk/
It worked at first, but then I started receiving the SIGABRT error. I have done a lot of searches and cannot figure out how to fix this, In all the websites, someone asks this and then figures it out themselves or through a very vague answer which I am not able to understand. Please Help! If you answer, could you please be specific as to what I have to do. If required I can post my entire code. Thanks in advance!
Use the exception breakpoint to gather extra information for the SIGABRT crash, and then disable it once you've solved the bug (until it's needed again).
>> generally the error "Thread 1: signal SIGABRT" is caused by missing code. Not really. A signal is just really a way that an application can tell the underlying Unix kernel that something important happened (that's what "signal" really means), but it's usually something bad, and usually represents a crash.
A SIGABRT is caused if your program aborted due to a fatal error. This can also be caused if you are using an assert() which fails or an abort(). Fix : In C++, this is normally due to an assert statement in C++ not returning true, but some STL elements can generate this if they try to store too much memory.
The SIGABRT only indicates that the app called abort() — that is, crashed deliberately. This can happen as a result of an error unwrapping a Swift optional (which can be an unconnected outlet), but there are plenty of other possibilities).
When you get SIGABRT
on that line of main
, it means that your program has raised an exception. The stack trace shows where the exception is being caught, not where it's being raised. Usually this is not helpful.
To debug the problem, you can do two things:
Click the “Continue Program Execution” button in the debugger control bar, or choose Program > Debug > Continue from the menu bar. This will let the program continue the exception-raising process. It will print a message to the debugger console that will help you understand what's wrong. (You may have to continue execution a couple of times before it actually prints messages.) Read the messages carefully! They usually contain helpful information.
Set an exception breakpoint. This will make Xcode stop your program at the point where the exception is being raised, so you can see the code and the stack trace that is causing the problem.
SIGABRT (Signal abort) indicates that the app crash due to failure to access something which is nil or doesn't exist, usually in my experience it's broken Outlets.
Check your storyboard ID in the Identity Inspector if the names are correct.
Check for any breakpoint in the left side of the code.
Hope this helps someone!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With