I am working on an app in XCode 8, but when I try to run it in the simulator, it fails with an error on line 12 of AppDelegate.swift. I have not modified this file at all.
//
//
//
//
//
//
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate { // ERROR IS THROWN HERE (Thread 1: signal SIGABRT)
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
return true
}
func applicationWillResignActive(_ application: UIApplication) {
}
func applicationDidEnterBackground(_ application: UIApplication) {
}
func applicationWillEnterForeground(_ application: UIApplication) {
}
func applicationDidBecomeActive(_ application: UIApplication) {
}
func applicationWillTerminate(_ application: UIApplication) {
}
}
The error on that line is Thread 1: signal SIGABRT. When ran, the simulator freezes on the static launchscreen (which is a storyboard, and is set correctly in info.plist).
If I click on Thread 1, the one where SIGABRT originates from, then click on 0 __pthread_kill I get this:
libsystem_kernel.dylib`__pthread_kill:
0x107bb5dd0 <+0>: movl $0x2000148, %eax ; imm = 0x2000148
0x107bb5dd5 <+5>: movq %rcx, %r10
0x107bb5dd8 <+8>: syscall
-> 0x107bb5dda <+10>: jae 0x107bb5de4 ; <+20>
0x107bb5ddc <+12>: movq %rax, %rdi
0x107bb5ddf <+15>: jmp 0x107baed6f ; cerror_nocancel
0x107bb5de4 <+20>: retq
0x107bb5de5 <+21>: nop
0x107bb5de6 <+22>: nop
0x107bb5de7 <+23>: nop
Theres a nice error on line 4 saying < Thread 1: signal SIGABRT >.
Also, under Thread 1, 11 UIApplicationMain, there is the following, with the same error on line 47: (This probably isnt useful, but, maybe)
UIKit`UIApplicationMain:
0x104f28dec <+0>: pushq %rbp
0x104f28ded <+1>: movq %rsp, %rbp
0x104f28df0 <+4>: pushq %r15
0x104f28df2 <+6>: pushq %r14
0x104f28df4 <+8>: pushq %r13
0x104f28df6 <+10>: pushq %r12
0x104f28df8 <+12>: pushq %rbx
0x104f28df9 <+13>: pushq %rax
0x104f28dfa <+14>: movq %rcx, %rbx
0x104f28dfd <+17>: movq %rsi, -0x30(%rbp)
0x104f28e01 <+21>: movl %edi, %r12d
0x104f28e04 <+24>: movq 0xeb33e5(%rip), %r13 ; (void *)0x00000001069c9d20: objc_retain
0x104f28e0b <+31>: movq %rdx, %rdi
0x104f28e0e <+34>: callq *%r13
0x104f28e11 <+37>: movq %rax, %r14
0x104f28e14 <+40>: movq %rbx, %rdi
0x104f28e17 <+43>: callq *%r13
0x104f28e1a <+46>: movq %rax, %r15
0x104f28e1d <+49>: leaq 0xeb1478(%rip), %r13 ; _UIApplicationLinkedOnVersion
0x104f28e24 <+56>: movl (%r13), %eax
0x104f28e28 <+60>: testl %eax, %eax
0x104f28e2a <+62>: jne 0x104f28e3a ; <+78>
0x104f28e2c <+64>: cmpq $-0x1, 0xeac3c4(%rip) ; WebKitSetIsClassic + 7
0x104f28e34 <+72>: jne 0x104f28ead ; <+193>
0x104f28e36 <+74>: movl (%r13), %eax
0x104f28e3a <+78>: cmpl $0x20100, %eax ; imm = 0x20100
0x104f28e3f <+83>: jb 0x104f28e65 ; <+121>
0x104f28e41 <+85>: callq 0x105b0110c ; symbol stub for: objc_autoreleasePoolPush
0x104f28e46 <+90>: movq %rax, %r13
0x104f28e49 <+93>: movl %r12d, %edi
0x104f28e4c <+96>: movq -0x30(%rbp), %rsi
0x104f28e50 <+100>: movq %r14, %rdx
0x104f28e53 <+103>: movq %r15, %rcx
0x104f28e56 <+106>: callq 0x104f28ec5 ; _UIApplicationMainPreparations
0x104f28e5b <+111>: movq %r13, %rdi
0x104f28e5e <+114>: callq 0x105b01106 ; symbol stub for: objc_autoreleasePoolPop
0x104f28e63 <+119>: jmp 0x104f28e77 ; <+139>
0x104f28e65 <+121>: movl %r12d, %edi
0x104f28e68 <+124>: movq -0x30(%rbp), %rsi
0x104f28e6c <+128>: movq %r14, %rdx
0x104f28e6f <+131>: movq %r15, %rcx
0x104f28e72 <+134>: callq 0x104f28ec5 ; _UIApplicationMainPreparations
0x104f28e77 <+139>: movq 0xeb1372(%rip), %rdi ; UIApp
0x104f28e7e <+146>: movq 0xe23e2b(%rip), %rsi ; "_run"
0x104f28e85 <+153>: callq *0xeb3355(%rip) ; (void *)0x00000001069ccac0: objc_msgSend
0x104f28e8b <+159>: movq 0xeb3356(%rip), %rbx ; (void *)0x00000001069c9d90: objc_release
0x104f28e92 <+166>: movq %r15, %rdi
0x104f28e95 <+169>: callq *%rbx
0x104f28e97 <+171>: movq %r14, %rdi
0x104f28e9a <+174>: callq *%rbx
0x104f28e9c <+176>: xorl %eax, %eax
0x104f28e9e <+178>: addq $0x8, %rsp
0x104f28ea2 <+182>: popq %rbx
0x104f28ea3 <+183>: popq %r12
0x104f28ea5 <+185>: popq %r13
0x104f28ea7 <+187>: popq %r14
0x104f28ea9 <+189>: popq %r15
0x104f28eab <+191>: popq %rbp
0x104f28eac <+192>: retq
0x104f28ead <+193>: leaq 0xeac344(%rip), %rdi ; _UIApplicationLinkedOnVersionOnce
0x104f28eb4 <+200>: leaq 0xeb68f5(%rip), %rsi ; __block_literal_global.1569
0x104f28ebb <+207>: callq 0x105b01940 ; symbol stub for: dispatch_once
0x104f28ec0 <+212>: jmp 0x104f28e36 ; <+74>
12 main under thread one just takes me to the AppDelegate.swift
13 start gives me the same error on line 3:
libdyld.dylib`start:
0x1078596bc <+0>: nop
0x1078596bd <+1>: movl %eax, %edi
0x1078596bf <+3>: callq 0x1078596f6 ; symbol stub for: exit
0x1078596c4 <+8>: hlt
14 start gives me the same errror on line 3:
libdyld.dylib`start:
0x1078596bc <+0>: nop
0x1078596bd <+1>: movl %eax, %edi
0x1078596bf <+3>: callq 0x1078596f6 ; symbol stub for: exit
0x1078596c4 <+8>: hlt
If it would be helpfull, I can post my ViewController.
Nevermind, somehow I had an error in the storyboard. http://stackoverflow.com/questions/26442414/libcabi-dylib-terminating-with-uncaught-exception-of-type-nsexception-lldb fixed it.