Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Thread 1: signal SIGABRT AppDelegate.swift

Tags:

ios

swift

I tried to compile my first iOS Hello app.

I have

ViewController.swift

//
//  ViewController.swift
//  My First Project

import UIKit

class ViewController: UIViewController {

    // Declare components
    @IBOutlet weak var inputLabel: UILabel!
    
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
        
    }

    @IBAction func submitBtn(_ sender: Any) {
        inputLabel.text = "Hello World"
        
    }
    
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

I Kept

getting Build Succeeded

enter image description here

But after about 5 seconds, I got this

enter image description here


Console Error

enter image description here

         0x0000000103915f69 -[UIApplication workspaceDidEndTransaction:] + 188
    18  FrontBoardServices                  0x000000010770f723 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
    19  FrontBoardServices                  0x000000010770f59c -[FBSSerialQueue _performNext] + 189
    20  FrontBoardServices                  0x000000010770f925 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    21  CoreFoundation                      0x0000000105ff0311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    22  CoreFoundation                      0x0000000105fd559c __CFRunLoopDoSources0 + 556
    23  CoreFoundation                      0x0000000105fd4a86 __CFRunLoopRun + 918
    24  CoreFoundation                      0x0000000105fd4494 CFRunLoopRunSpecific + 420
    25  UIKit                               0x00000001039147e6 -[UIApplication _run] + 434
    26  UIKit                               0x000000010391a964 UIApplicationMain + 159
    27  My First Project                    0x0000000102e6db3f main + 111
    28  libdyld.dylib                       0x0000000106f7868d start + 1
    29  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

Try #1

Connection Inspector

I used to have this

enter image description here

I updated to this

enter image description here

Re-run and still happening ...


Try #2

Clean project

Re-run and still happening ...

like image 688
code-8 Avatar asked Jun 08 '17 15:06

code-8


People also ask

What does thread 1 signal SIGABRT mean?

What Does “Thread 1: Signal SIGABRT” Mean? The error SIGABRT stands for “signal abort”. It's a signal that's sent by iOS to a running app, that immediately quits the app because of a runtime error.

How do you resolve a SIGABRT?

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).

What is SIGABRT in C?

A SIGABRT (signal abort) error means that the app was deliberately crashed due to some really bad problem, like a runtime error during the start-up sequence or a bad or unreadable user interface file.


2 Answers

Issue is in your labels, I am 100% sure you have deleted some outlet references and forget to remove the connection from story board. Please check

like image 175
Raza.najam Avatar answered Oct 18 '22 19:10

Raza.najam


This problem happens when you delete referencing outlet in your ViewController and forget to remove the connection from storyboard.

Perfect connection ✅

The perfect referencing outlet looks like below screenshot.

enter image description here enter image description here

Now let's delete the referencing outlet from .h file

Problem ⚠️

if we remove referencing outlet from .h file Xcode will give warning in Storyboard. this is the trick you can find which outlet was deleted from the class.

i hope this will help you .

enter image description here

enter image description here

Solution

In your case you may have changed the name lable to inputLable so you need to do :

Remove the connection to label. Re-Connect the controller to inputLabel.

like image 33
Dhiru Avatar answered Oct 18 '22 21:10

Dhiru