EXC_BREAKPOINTというエラーが出てしまってどうすればいいのか分かりません。
参考書に書いてあるカメラアプリを作ろうと記述通りの手順でコードを書いたつもりです。
コード自体にはエラーは表示されていません。アプリをMacに繋いだ自分のiPhoneで試そうとしたのですが、以下のような表示が出てしまい、iPhone画面が真っ白な状態です。
ibswiftCore.dylib`function signature specialization <preserving fragile attribute, Arg[2] = Dead, Arg[3] = Dead> of Swift._fatalErrorMessage (Swift.StaticString, Swift.StaticString, Swift.StaticString, Swift.UInt, flags : Swift.UInt32) -> Swift.Never:
0x1002c1184 <+0>: stp x26, x25, [sp, #-80]!
0x1002c1188 <+4>: stp x24, x23, [sp, #16]
0x1002c118c <+8>: stp x22, x21, [sp, #32]
.
.
.
0x1002c11f4 <+112>: mov x4, x8
0x1002c11f8 <+116>: bl 0x1001b4b80 ; function signature specialization <preserving fragile attribute, Arg[1] = [Closure Propagated : reabstraction thunk helper from @callee_owned (@unowned Swift.UnsafeBufferPointer<Swift.UInt8>) -> () to @callee_owned (@unowned Swift.UnsafeBufferPointer<Swift.UInt8>) -> (@out ()), Argument Types : [@callee_owned (@unowned Swift.UnsafeBufferPointer<Swift.UInt8>) -> ()]> of generic specialization <preserving fragile attribute, ()> of Swift.StaticString.withUTF8Buffer <A> ((Swift.UnsafeBufferPointer<Swift.UInt8>) -> A) -> A
-> 0x1002c11fc <+120>: brk #0x1
上の最後の#0x1の後に"Thread 1:EXC_BREAKPOINT(code=1, subcode=0x1002c11fc)"が表示されて止まってしまいます。
Swiftを独学で勉強し始めてほんの数日です。基本的な文法もルールもまだ理解していません。試しにアプリを作ってみたくて、本に書いてある通りに操作して作っていました。このサイトを利用するのも初めてです。どうか、この身の程知らずのぺいぺいにご教授お願いします。
追記
コードは
import UIKit
import AVFoundation
class ViewController: UIViewController {
//プレビュー用のビューとoutlet接続しておく
@IBOutlet weak var previewView:UIView!
//インスタンスの作成
var session = AVCaptureSession()
var photoOutput = AVCapturePhotoOutput()
//通知センターを作る
let notification = NotificationCenter.default
override func viewDidLoad() {
super.viewDidLoad()
// セッション実行中ならば中断する
if session.isRunning {
return
}
//入出力の設定
setupInputOutput()
//プレビューレイヤの設定
setPreviewLayer()
//セッション開始
session.startRunning()
notification.addObserver(self,
selector: #selector(self.changedDeviceOrientation(_:)),
name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil)
}
//シャッターボタンで実行する
@IBAction func takePhoto(_ sender: AnyObject) {
let captureSetting = AVCapturePhotoSettings()
captureSetting.flashMode = .auto
captureSetting.isAutoStillImageStabilizationEnabled = true
captureSetting.isHighResolutionPhotoEnabled = false
//キャプチャのイメージ処理はデリゲートに任せる
photoOutput.capturePhoto(with: captureSetting, delegate: self)
}
//入出力の設定
func setupInputOutput(){
//解像度の指定
session.sessionPreset = AVCaptureSessionPresetPhoto
//入出力
do {
//デバイスの取得
let device = AVCaptureDevice.defaultDevice(
withDeviceType: AVCaptureDeviceType.builtInWideAngleCamera,
mediaType: AVMediaTypeVideo,
position: .back)
//入力元
let input = try AVCaptureDeviceInput(device: device)
if session.canAddInput(input){
session.addInput(input)
}else {
print("セッションに入力を追加できなかった")
return
}
} catch let error as NSError {
print("カメラがない\(error)")
return
}
//入力先
if session.canAddOutput(photoOutput) {
session.addOutput(photoOutput)
} else {
print("セッションに出力をできなかった")
return
}
}
//プレビューレイヤの設定
func setPreviewLayer(){
//プレビューレイヤを作る
let previewLayer = AVCaptureVideoPreviewLayer(session: session)
guard let videoLayer = previewLayer else {
print("プレビューレイヤーを作れなかった")
return
}
videoLayer.frame = view.bounds
videoLayer.masksToBounds = true
videoLayer.videoGravity = AVLayerVideoGravityResizeAspectFill
//previewViewに追加する
previewView.layer.addSublayer(videoLayer)
}
//デバイスの向きが変わった時に呼び出すメソッド
func changedDeviceOrientation(_ notification :Notification) {
// photoOutput.connectionの回転向きをデバイスと合わせる
if let photoOutputConnection = self.photoOutput.connection(withMediaType: AVMediaTypeVideo) {
switch UIDevice.current.orientation {
case .portrait:
photoOutputConnection.videoOrientation = .portrait
case .portraitUpsideDown:
photoOutputConnection.videoOrientation = .portraitUpsideDown
case .landscapeLeft:
photoOutputConnection.videoOrientation = .landscapeRight
case .landscapeRight:
photoOutputConnection.videoOrientation = .landscapeLeft
default:
break
}
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
と
// ExtensionViewController.swift
// avCapturePhoto_simple
//
import Photos
//デリゲート部分を拡張する
extension ViewController:AVCapturePhotoCaptureDelegate {
//映像をキャプチャする
func capture(_ captureOutput: AVCapturePhotoOutput,
didFinishProcessingPhotoSampleBuffer photoSampleBuffer: CMSampleBuffer?,
previewPhotoSampleBuffer: CMSampleBuffer?,
resolvedSettings: AVCaptureResolvedPhotoSettings,
bracketSettings: AVCaptureBracketedStillImageSettings?,
error: Error?) {
//バッファからjpegデータを取り出す
let photoData = AVCapturePhotoOutput.jpegPhotoDataRepresentation(
forJPEGSampleBuffer: photoSampleBuffer!,
previewPhotoSampleBuffer: previewPhotoSampleBuffer)
// photoDateがnill出ない時UIImageに変換する
if let data = photoData {
if let stillImage = UIImage(data: data) {
//アルバムに追加する
UIImageWriteToSavedPhotosAlbum(stillImage, self, nil, nil)
}
}
}
}
です。
Autolayout`ViewController.setPreviewLayer() -> ():
0x10818e7f0 <+0>: pushq %rbp
0x10818e7f1 <+1>: movq %rsp, %rbp
0x10818e7f4 <+4>: subq $0x190, %rsp ; imm = 0x190
0x10818e7fb <+11>: movq %rdi, -0x8(%rbp)
0x10818e7ff <+15>: movq %rdi, -0x68(%rbp)
0x10818e803 <+19>: callq 0x10818ed40 ; type metadata accessor for __ObjC.AVCaptureVideoPreviewLayer at ViewController.swift
0x10818e808 <+24>: movq 0x68e1(%rip), %rdi ; (void *)0x000000010aac99a0: swift_isaMask
0x10818e80f <+31>: movq -0x68(%rbp), %rcx
0x10818e813 <+35>: movq (%rcx), %rdx
0x10818e816 <+38>: andq (%rdi), %rdx
0x10818e819 <+41>: movq %rcx, %rdi
0x10818e81c <+44>: movq %rax, -0x70(%rbp)
0x10818e820 <+48>: callq *0x68(%rdx)
0x10818e823 <+51>: movq %rax, %rdi
0x10818e826 <+54>: movq -0x70(%rbp), %rsi
0x10818e82a <+58>: callq 0x10818ece0 ; __ObjC.AVCaptureVideoPreviewLayer.__allocating_init (session : Swift.ImplicitlyUnwrappedOptional<__ObjC.AVCaptureSession>) -> Swift.ImplicitlyUnwrappedOptional<__ObjC.AVCaptureVideoPreviewLayer> at ViewController.swift
0x10818e82f <+63>: movq %rax, %rdi
0x10818e832 <+66>: movq %rax, -0x78(%rbp)
0x10818e836 <+70>: callq 0x10819214c ; symbol stub for: objc_retain
0x10818e83b <+75>: movq -0x78(%rbp), %rcx
0x10818e83f <+79>: movq -0x78(%rbp), %rcx
0x10818e843 <+83>: cmpq $0x0, %rcx
0x10818e847 <+87>: movq %rax, -0x80(%rbp)
0x10818e84b <+91>: je 0x10818ec0c ; <+1052> at ViewController.swift:99
0x10818e851 <+97>: movq -0x78(%rbp), %rax
0x10818e855 <+101>: movq %rax, -0x88(%rbp)
0x10818e85c <+108>: movq -0x88(%rbp), %rax
0x10818e863 <+115>: movq %rax, -0x10(%rbp)
0x10818e867 <+119>: movq %rax, %rdi
0x10818e86a <+122>: movq %rax, -0x90(%rbp)
0x10818e871 <+129>: callq 0x10819214c ; symbol stub for: objc_retain
0x10818e876 <+134>: movq -0x90(%rbp), %rdi
0x10818e87d <+141>: movq -0x68(%rbp), %rcx
0x10818e881 <+145>: movq %rdi, -0x98(%rbp)
0x10818e888 <+152>: movq %rcx, %rdi
0x10818e88b <+155>: movq %rax, -0xa0(%rbp)
0x10818e892 <+162>: callq 0x10819214c ; symbol stub for: objc_retain
0x10818e897 <+167>: movq -0x68(%rbp), %rcx
0x10818e89b <+171>: movq 0x8256(%rip), %rsi ; "view"
0x10818e8a2 <+178>: movq %rcx, %rdi
0x10818e8a5 <+181>: movq %rax, -0xa8(%rbp)
0x10818e8ac <+188>: callq 0x108192134 ; symbol stub for: objc_msgSend
0x10818e8b1 <+193>: movq %rax, %rdi
0x10818e8b4 <+196>: callq 0x108192152 ; symbol stub for: objc_retainAutoreleasedReturnValue
0x10818e8b9 <+201>: movq %rax, -0x18(%rbp)
0x10818e8bd <+205>: movq -0x78(%rbp), %rax
0x10818e8c1 <+209>: cmpq $0x0, -0x18(%rbp)
0x10818e8c6 <+214>: jne 0x10818e913 ; <+291> at ViewController.swift:94
0x10818e8c8 <+216>: movq -0x78(%rbp), %rax
0x10818e8cc <+220>: movq -0x78(%rbp), %rax
0x10818e8d0 <+224>: movq -0x78(%rbp), %rax
0x10818e8d4 <+228>: leaq 0x4c0f(%rip), %rdi ; "fatal error"
0x10818e8db <+235>: movl $0xb, %eax
0x10818e8e0 <+240>: movl %eax, %esi
0x10818e8e2 <+242>: movl $0x2, %eax
0x10818e8e7 <+247>: leaq 0x4bc2(%rip), %rcx ; "unexpectedly found nil while unwrapping an Optional value"
0x10818e8ee <+254>: movl $0x39, %edx
0x10818e8f3 <+259>: movl %edx, %r8d
0x10818e8f6 <+262>: xorl %edx, %edx
0x10818e8f8 <+264>: movl %edx, -0xac(%rbp)
0x10818e8fe <+270>: movl %eax, %edx
0x10818e900 <+272>: movl %eax, %r9d
0x10818e903 <+275>: movl $0x0, (%rsp)
0x10818e90a <+282>: callq 0x1081921ca ; symbol stub for: function signature specialization <preserving fragile attribute, Arg[2] = Dead, Arg[3] = Dead> of Swift._fatalErrorMessage (Swift.StaticString, Swift.StaticString, Swift.StaticString, Swift.UInt, flags : Swift.UInt32) -> Swift.Never
0x10818e90f <+287>: movq -0x78(%rbp), %rcx
0x10818e913 <+291>: movq -0x18(%rbp), %rax
0x10818e917 <+295>: movq %rax, %rdi
0x10818e91a <+298>: movq %rax, -0xb8(%rbp)
0x10818e921 <+305>: callq 0x10819214c ; symbol stub for: objc_retain
0x10818e926 <+310>: leaq -0x38(%rbp), %rdi
0x10818e92a <+314>: movq 0x81cf(%rip), %rdx ; "bounds"
0x10818e931 <+321>: movq -0xb8(%rbp), %rcx
0x10818e938 <+328>: movq %rcx, %rsi
0x10818e93b <+331>: movq %rax, -0xc0(%rbp)
0x10818e942 <+338>: callq 0x108192140 ; symbol stub for: objc_msgSend_stret
0x10818e947 <+343>: leaq -0x58(%rbp), %rax
0x10818e94b <+347>: movsd -0x38(%rbp), %xmm0 ; xmm0 = mem[0],zero
0x10818e950 <+352>: movsd -0x30(%rbp), %xmm1 ; xmm1 = mem[0],zero
0x10818e955 <+357>: movsd -0x28(%rbp), %xmm2 ; xmm2 = mem[0],zero
0x10818e95a <+362>: movsd -0x20(%rbp), %xmm3 ; xmm3 = mem[0],zero
0x10818e95f <+367>: movq 0x81a2(%rip), %rsi ; "setFrame:"
0x10818e966 <+374>: movsd %xmm0, -0x58(%rbp)
0x10818e96b <+379>: movsd %xmm1, -0x50(%rbp)
0x10818e970 <+384>: movsd %xmm2, -0x48(%rbp)
0x10818e975 <+389>: movsd %xmm3, -0x40(%rbp)
0x10818e97a <+394>: movq -0x98(%rbp), %rcx
0x10818e981 <+401>: movq %rcx, %rdi
0x10818e984 <+404>: movq (%rax), %rcx
0x10818e987 <+407>: movq %rcx, (%rsp)
0x10818e98b <+411>: movq 0x8(%rax), %rcx
0x10818e98f <+415>: movq %rcx, 0x8(%rsp)
0x10818e994 <+420>: movq 0x10(%rax), %rcx
0x10818e998 <+424>: movq %rcx, 0x10(%rsp)
0x10818e99d <+429>: movq 0x18(%rax), %rax
0x10818e9a1 <+433>: movq %rax, 0x18(%rsp)
0x10818e9a6 <+438>: callq 0x108192134 ; symbol stub for: objc_msgSend
0x10818e9ab <+443>: movq -0xb8(%rbp), %rdi
0x10818e9b2 <+450>: callq 0x108192146 ; symbol stub for: objc_release
0x10818e9b7 <+455>: movq -0x18(%rbp), %rdi
0x10818e9bb <+459>: callq 0x108192146 ; symbol stub for: objc_release
0x10818e9c0 <+464>: movq -0x68(%rbp), %rdi
0x10818e9c4 <+468>: callq 0x108192146 ; symbol stub for: objc_release
0x10818e9c9 <+473>: movq -0x90(%rbp), %rdi
0x10818e9d0 <+480>: callq 0x108192146 ; symbol stub for: objc_release
0x10818e9d5 <+485>: movq -0x90(%rbp), %rdi
0x10818e9dc <+492>: callq 0x10819214c ; symbol stub for: objc_retain
0x10818e9e1 <+497>: movl $0x1, %edx
0x10818e9e6 <+502>: movq -0x90(%rbp), %rcx
0x10818e9ed <+509>: movq 0x811c(%rip), %rsi ; "setMasksToBounds:"
0x10818e9f4 <+516>: movq %rcx, %rdi
0x10818e9f7 <+519>: movq %rax, -0xc8(%rbp)
0x10818e9fe <+526>: callq 0x108192134 ; symbol stub for: objc_msgSend
0x10818ea03 <+531>: movq -0x90(%rbp), %rdi
0x10818ea0a <+538>: callq 0x108192146 ; symbol stub for: objc_release
0x10818ea0f <+543>: movq 0x660a(%rip), %rax ; (void *)0x0000000108de8270: AVLayerVideoGravityResizeAspectFill
0x10818ea16 <+550>: movq (%rax), %rdi
0x10818ea19 <+553>: callq 0x108192236 ; symbol stub for: static (extension in Foundation):Swift.String._unconditionallyBridgeFromObjectiveC (Swift.Optional<__ObjC.NSString>) -> Swift.String
0x10818ea1e <+558>: movq -0x78(%rbp), %rsi
0x10818ea22 <+562>: movb $0x1, %r8b
0x10818ea25 <+565>: testb $0x1, %r8b
0x10818ea29 <+569>: movq %rax, -0xd0(%rbp)
0x10818ea30 <+576>: movq %rdx, -0xd8(%rbp)
0x10818ea37 <+583>: movq %rcx, -0xe0(%rbp)
0x10818ea3e <+590>: jne 0x10818ea42 ; <+594> at ViewController.swift:96
0x10818ea40 <+592>: jmp 0x10818ea83 ; <+659> at ViewController.swift:96
0x10818ea42 <+594>: movq -0xd0(%rbp), %rdi
0x10818ea49 <+601>: movq -0xd8(%rbp), %rsi
0x10818ea50 <+608>: movq -0xe0(%rbp), %rdx
0x10818ea57 <+615>: callq 0x10819222a ; symbol stub for: (extension in Foundation):Swift.String._bridgeToObjectiveC () -> __ObjC.NSString
0x10818ea5c <+620>: movq -0xe0(%rbp), %rdi
0x10818ea63 <+627>: movq %rax, -0xe8(%rbp)
0x10818ea6a <+634>: callq 0x108192200 ; symbol stub for: swift_unknownRelease
0x10818ea6f <+639>: movq -0x78(%rbp), %rax
0x10818ea73 <+643>: movq -0xe8(%rbp), %rax
0x10818ea7a <+650>: movq %rax, -0xf0(%rbp)
0x10818ea81 <+657>: jmp 0x10818ea92 ; <+674> at ViewController.swift:96
0x10818ea83 <+659>: movq -0x78(%rbp), %rax
0x10818ea87 <+663>: xorl %ecx, %ecx
0x10818ea89 <+665>: movl %ecx, %eax
0x10818ea8b <+667>: movq %rax, -0xf0(%rbp)
0x10818ea92 <+674>: movq -0xf0(%rbp), %rax
0x10818ea99 <+681>: movq 0x8078(%rip), %rsi ; "setVideoGravity:"
0x10818eaa0 <+688>: movq -0x90(%rbp), %rcx
0x10818eaa7 <+695>: movq %rcx, %rdi
0x10818eaaa <+698>: movq %rax, %rdx
0x10818eaad <+701>: movq %rax, -0xf8(%rbp)
0x10818eab4 <+708>: callq 0x108192134 ; symbol stub for: objc_msgSend
0x10818eab9 <+713>: movq -0xf8(%rbp), %rdi
0x10818eac0 <+720>: callq 0x108192146 ; symbol stub for: objc_release
0x10818eac5 <+725>: movq 0x6624(%rip), %rax ; (void *)0x000000010aac99a0: swift_isaMask
0x10818eacc <+732>: movq -0x68(%rbp), %rcx
0x10818ead0 <+736>: movq (%rcx), %rdx
0x10818ead3 <+739>: andq (%rax), %rdx
0x10818ead6 <+742>: movq %rcx, %rdi
0x10818ead9 <+745>: callq *0x50(%rdx)
0x10818eadc <+748>: movq %rax, -0x60(%rbp)
0x10818eae0 <+752>: movq -0x78(%rbp), %rax
0x10818eae4 <+756>: cmpq $0x0, -0x60(%rbp)
0x10818eae9 <+761>: jne 0x10818eb36 ; <+838> at ViewController.swift:98
0x10818eaeb <+763>: movq -0x78(%rbp), %rax
0x10818eaef <+767>: movq -0x78(%rbp), %rax
0x10818eaf3 <+771>: movq -0x78(%rbp), %rax
0x10818eaf7 <+775>: leaq 0x49ec(%rip), %rdi ; "fatal error"
0x10818eafe <+782>: movl $0xb, %eax
0x10818eb03 <+787>: movl %eax, %esi
0x10818eb05 <+789>: movl $0x2, %eax
0x10818eb0a <+794>: leaq 0x499f(%rip), %rcx ; "unexpectedly found nil while unwrapping an Optional value"
0x10818eb11 <+801>: movl $0x39, %edx
0x10818eb16 <+806>: movl %edx, %r8d
0x10818eb19 <+809>: xorl %edx, %edx
0x10818eb1b <+811>: movl %edx, -0xfc(%rbp)
0x10818eb21 <+817>: movl %eax, %edx
0x10818eb23 <+819>: movl %eax, %r9d
0x10818eb26 <+822>: movl $0x0, (%rsp)
0x10818eb2d <+829>: callq 0x1081921ca ; symbol stub for: function signature specialization <preserving fragile attribute, Arg[2] = Dead, Arg[3] = Dead> of Swift._fatalErrorMessage (Swift.StaticString, Swift.StaticString, Swift.StaticString, Swift.UInt, flags : Swift.UInt32) -> Swift.Never
0x10818eb32 <+834>: movq -0x78(%rbp), %rcx
0x10818eb36 <+838>: movq -0x60(%rbp), %rax
0x10818eb3a <+842>: movq %rax, %rdi
0x10818eb3d <+845>: movq %rax, -0x108(%rbp)
0x10818eb44 <+852>: callq 0x10819214c ; symbol stub for: objc_retain
0x10818eb49 <+857>: movq 0x7fd0(%rip), %rsi ; "layer"
0x10818eb50 <+864>: movq -0x108(%rbp), %rdi
0x10818eb57 <+871>: movq %rax, -0x110(%rbp)
0x10818eb5e <+878>: callq 0x108192134 ; symbol stub for: objc_msgSend
0x10818eb63 <+883>: movq %rax, %rdi
0x10818eb66 <+886>: callq 0x108192152 ; symbol stub for: objc_retainAutoreleasedReturnValue
0x10818eb6b <+891>: movq -0x90(%rbp), %rdi
0x10818eb72 <+898>: movq %rax, -0x118(%rbp)
0x10818eb79 <+905>: callq 0x10819214c ; symbol stub for: objc_retain
0x10818eb7e <+910>: movq -0x90(%rbp), %rsi
0x10818eb85 <+917>: movq 0x7f9c(%rip), %rdi ; "addSublayer:"
0x10818eb8c <+924>: movq -0x118(%rbp), %rcx
0x10818eb93 <+931>: movq %rdi, -0x120(%rbp)
0x10818eb9a <+938>: movq %rcx, %rdi
0x10818eb9d <+941>: movq -0x120(%rbp), %rcx
0x10818eba4 <+948>: movq %rsi, -0x128(%rbp)
0x10818ebab <+955>: movq %rcx, %rsi
0x10818ebae <+958>: movq -0x128(%rbp), %rdx
0x10818ebb5 <+965>: movq %rax, -0x130(%rbp)
0x10818ebbc <+972>: callq 0x108192134 ; symbol stub for: objc_msgSend
0x10818ebc1 <+977>: movq -0x90(%rbp), %rdi
0x10818ebc8 <+984>: callq 0x108192146 ; symbol stub for: objc_release
0x10818ebcd <+989>: movq -0x118(%rbp), %rdi
0x10818ebd4 <+996>: callq 0x108192146 ; symbol stub for: objc_release
0x10818ebd9 <+1001>: movq -0x108(%rbp), %rdi
0x10818ebe0 <+1008>: callq 0x108192146 ; symbol stub for: objc_release
0x10818ebe5 <+1013>: movq -0x60(%rbp), %rdi
0x10818ebe9 <+1017>: callq 0x108192146 ; symbol stub for: objc_release
0x10818ebee <+1022>: movq -0x90(%rbp), %rdi
0x10818ebf5 <+1029>: callq 0x108192146 ; symbol stub for: objc_release
0x10818ebfa <+1034>: movq -0x78(%rbp), %rdi
0x10818ebfe <+1038>: callq 0x108192146 ; symbol stub for: objc_release
0x10818ec03 <+1043>: movq -0x78(%rbp), %rax
0x10818ec07 <+1047>: jmp 0x10818eccc ; <+1244> at ViewController.swift:99
0x10818ec0c <+1052>: movl $0x1, %eax
0x10818ec11 <+1057>: movl %eax, %edi
0x10818ec13 <+1059>: callq 0x10819225a ; symbol stub for: generic specialization <preserving fragile attribute, Any> of Swift._allocateUninitializedArray <A> (Builtin.Word) -> (Swift.Array<A>, Builtin.RawPointer)
0x10818ec18 <+1064>: leaq 0x4851(%rip), %rdi
0x10818ec1f <+1071>: movl $0x10, %ecx
0x10818ec24 <+1076>: movl %ecx, %esi
0x10818ec26 <+1078>: movq 0x640b(%rip), %r8 ; (void *)0x000000010aaa1858: type metadata for Swift.String
0x10818ec2d <+1085>: movq %r8, 0x18(%rdx)
0x10818ec31 <+1089>: movq %rax, -0x138(%rbp)
0x10818ec38 <+1096>: movq %rdx, -0x140(%rbp)
0x10818ec3f <+1103>: callq 0x108192176 ; symbol stub for: Swift.String.init (_builtinUTF16StringLiteral : Builtin.RawPointer, utf16CodeUnitCount : Builtin.Word) -> Swift.String
0x10818ec44 <+1108>: movq -0x140(%rbp), %rsi
0x10818ec4b <+1115>: movq %rax, (%rsi)
0x10818ec4e <+1118>: movq %rdx, 0x8(%rsi)
0x10818ec52 <+1122>: movq %rcx, 0x10(%rsi)
0x10818ec56 <+1126>: callq 0x1081921ac ; symbol stub for: Swift.(print (Swift.Array<Any>, separator : Swift.String, terminator : Swift.String) -> ()).(default argument 1)
0x10818ec5b <+1131>: movq %rax, -0x148(%rbp)
0x10818ec62 <+1138>: movq %rdx, -0x150(%rbp)
0x10818ec69 <+1145>: movq %rcx, -0x158(%rbp)
0x10818ec70 <+1152>: callq 0x1081921b2 ; symbol stub for: Swift.(print (Swift.Array<Any>, separator : Swift.String, terminator : Swift.String) -> ()).(default argument 2)
0x10818ec75 <+1157>: movq -0x138(%rbp), %rdi
0x10818ec7c <+1164>: movq -0x148(%rbp), %rsi
0x10818ec83 <+1171>: movq -0x150(%rbp), %r8
0x10818ec8a <+1178>: movq %rdx, -0x160(%rbp)
0x10818ec91 <+1185>: movq %r8, %rdx
0x10818ec94 <+1188>: movq -0x158(%rbp), %r9
0x10818ec9b <+1195>: movq %rcx, -0x168(%rbp)
0x10818eca2 <+1202>: movq %r9, %rcx
0x10818eca5 <+1205>: movq %rax, %r8
0x10818eca8 <+1208>: movq -0x160(%rbp), %r9
0x10818ecaf <+1215>: movq -0x168(%rbp), %rax
0x10818ecb6 <+1222>: movq %rax, (%rsp)
0x10818ecba <+1226>: callq 0x1081921a0 ; symbol stub for: Swift.print (Swift.Array<Any>, separator : Swift.String, terminator : Swift.String) -> ()
0x10818ecbf <+1231>: movq -0x78(%rbp), %rdi
0x10818ecc3 <+1235>: callq 0x108192146 ; symbol stub for: objc_release
0x10818ecc8 <+1240>: movq -0x78(%rbp), %rax
0x10818eccc <+1244>: movq -0x78(%rbp), %rax
0x10818ecd0 <+1248>: addq $0x190, %rsp ; imm = 0x190
0x10818ecd7 <+1255>: popq %rbp
0x10818ecd8 <+1256>: retq
上のコード(?)の0x10818eb32 <+834>: movq -0x78(%rbp), %rcx の横にThread1:EXC_BAD_INSTRUCTION(code=EXC_I386_INVOP,subcode=0x0)と表示されてアプリがフリーズしてしまいます。この操作はsimulatorで試みたものです。