Swift线程1信号SIGABRT错误

时间:2016-05-16 22:22:05

标签: ios swift multithreading

我正在制作一个简单的hi应用程序。但是当我运行应用程序时遇到了问题。它什么也没显示,在调试屏幕中它会显示这个0xcf49c< + 140>:xorl%ecx ,%ecx线程1:信号SIGABRT.Here是我的ViewController.swift文件

import UIKit

class ViewController: UIViewController {

@IBOutlet var Label: UILabel!
@IBOutlet var NameField: UITextField!
@IBAction func SayMyName(sender: UIButton) {
  let nameEntered = NameField.text
  Label.text = "Hi there \(nameEntered)"

}
override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
    }


   }

这是我的联系

这是跟踪

Hi World`main:
0x81410 <+0>:   pushl  %ebp
0x81411 <+1>:   movl   %esp, %ebp
0x81413 <+3>:   pushl  %edi
0x81414 <+4>:   pushl  %esi
0x81415 <+5>:   subl   $0x30, %esp
0x81418 <+8>:   calll  0x8141d                   ; <+13> at AppDelegate.swift
0x8141d <+13>:  popl   %eax
0x8141e <+14>:  movl   0xc(%ebp), %ecx
0x81421 <+17>:  movl   0x8(%ebp), %edx
0x81424 <+20>:  movl   0x1c17(%eax), %esi
0x8142a <+26>:  movl   0x1c0f(%eax), %edi
0x81430 <+32>:  movl   %edx, (%edi)
0x81432 <+34>:  cmpl   $0xffffffff, (%esi)
0x81438 <+40>:  movl   %eax, -0xc(%ebp)
0x8143b <+43>:  movl   %ecx, -0x10(%ebp)
0x8143e <+46>:  movl   %edx, -0x14(%ebp)
0x81441 <+49>:  je     0x8145e                   ; <+78> at AppDelegate.swift:12
0x81443 <+51>:  movl   -0xc(%ebp), %eax
0x81446 <+54>:  movl   0x1c17(%eax), %ecx
0x8144c <+60>:  movl   0x1c13(%eax), %edx
0x81452 <+66>:  movl   %ecx, (%esp)
0x81455 <+69>:  movl   %edx, 0x4(%esp)
0x81459 <+73>:  calll  0x81732                   ; symbol stub for: swift_once
0x8145e <+78>:  movl   -0xc(%ebp), %eax
0x81461 <+81>:  movl   0x1c0b(%eax), %ecx
0x81467 <+87>:  movl   -0x10(%ebp), %edx
0x8146a <+90>:  movl   %edx, (%ecx)
0x8146c <+92>:  calll  0x81260                   ; type metadata accessor for Hi_World.AppDelegate
0x81471 <+97>:  movl   %eax, (%esp)
0x81474 <+100>: calll  0x816ae                   ; symbol stub for: NSStringFromClass
0x81479 <+105>: xorl   %ecx, %ecx
0x8147b <+107>: movl   -0x10(%ebp), %edx
0x8147e <+110>: movl   -0x14(%ebp), %esi
0x81481 <+113>: movl   %esi, (%esp)
0x81484 <+116>: movl   %edx, 0x4(%esp)
0x81488 <+120>: movl   $0x0, 0x8(%esp)
0x81490 <+128>: movl   %eax, 0xc(%esp)
0x81494 <+132>: movl   %ecx, -0x18(%ebp)
0x81497 <+135>: calll  0x816b4 ; symbol stub for:         UIApplicationMain
0x8149c <+140>: xorl   %ecx, %ecx //Where my error is.
0x8149e <+142>: movl   %eax, -0x1c(%ebp)
0x814a1 <+145>: movl   %ecx, %eax
0x814a3 <+147>: addl   $0x30, %esp
0x814a6 <+150>: popl   %esi
0x814a7 <+151>: popl   %edi
0x814a8 <+152>: popl   %ebp
0x814a9 <+153>: retl   

0 个答案:

没有答案