I have an error in main.m "Thread 1: signal SIGABRT" How can I fix this?

My code in the main.m file is as follows. I have not changed it at all from the moment I started programming this application.

#import <UIKit/UIKit.h> #import "rickAppDelegate.h" int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([rickAppDelegate class])); } } 

I get a SIGABRT error in the string "return UIApplicationMain". My program is an application that displays a red button, and when you click it, it plays the 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 getting the SIGABRT error. I have done a lot of searches and cannot figure out how to fix this. On all websites, someone asks about this and then calculates it themselves or with a very vague answer that I cannot understand. Please help! If you answer, could you please clarify what I should do. If necessary, I can publish all my code. Thanks in advance!

+4
source share
4 answers

When you get SIGABRT on this main line, it means your program threw an exception. The stack trace shows where the exception is thrown, and not where it was raised. This usually does not help.

To debug the problem, you can do two things:

  • Click the "Continue program" button on the debugger control panel or select "Program"> "Debug"> "Continue" in the menu bar. This will allow the program to continue the process of collecting exceptions. It will print a message on the debugger console to help you understand what is wrong. (You may need to continue running several times before it actually prints the messages.) Read the messages carefully! They usually contain useful information.

  • Set an exception checkpoint. This will cause Xcode to stop your program at the point where the exception is raised so that you can see the code and the stack trace that is causing the problem.

+15
source

SIGABRT (Signal Disable) indicates that the application crashes due to the inability to access anything that is null or does not exist, usually in my experience this broke the Sockets.

  1. In the storyboard, check all of your outlets in each view controller.

enter image description here

  1. Make sure you remove the yellow warning connections. These are invalid outlets.

enter image description here

  1. Verify that the storyboard identifier is correct in the Identity Inspector.

  2. Check for any breakpoint on the left side of the code. enter image description here

Hope this helps someone!

+2
source

You must debug your application in the UIVIewController file (this screen or viewing where the application crashes). Usually this error appears when:

1) your xib is not suitable for your outlets. For example, a regular UIView and UITableView instead of a UITableViewController.

2) in your program you want to use a non-existent object. For example: if the number of elements in the array is 3, but you want to get the 4th element.

0
source

I looked through all these things, but still getting an error. Are there any other methods

0
source

Source: https://habr.com/ru/post/1402375/


All Articles