Я использую AVCaptureSession для записи экрана iPad с устройства MacOS. Продолжительность записи большая, и я использую AVCaptureMovieFileOutput.startRecording(to:recordingDelegate:)
, чтобы начать новую запись в зависимости от определенных условий. (Я не использую метод stopRecording()
, если я не хочу останавливать сеанс записи, это необходимо для того, чтобы убедиться, что между файлами записи нет потерянных данных)
Теперь этого не происходит на последовательном шаблон, но иногда все приложение зависает, и когда я приостанавливаю его, я всегда вижу, что приложение останавливает выполнение на этом методе. (в частности, 0x7fff2b6deb22 <+598>: movq (%r14,%r12), %rax
)
AVCaptureMovieFileOutput.startRecording (к: recordDelegate :)
AVFoundation`-[AVCaptureMovieFileOutput startRecordingToOutputFileURL:recordingDelegate:]:
0x7fff2b6de8cc <+0>: pushq %rbp
0x7fff2b6de8cd <+1>: movq %rsp, %rbp
0x7fff2b6de8d0 <+4>: pushq %r15
0x7fff2b6de8d2 <+6>: pushq %r14
0x7fff2b6de8d4 <+8>: pushq %r13
0x7fff2b6de8d6 <+10>: pushq %r12
0x7fff2b6de8d8 <+12>: pushq %rbx
0x7fff2b6de8d9 <+13>: subq $0x58, %rsp
0x7fff2b6de8dd <+17>: movq %rsi, %r14
0x7fff2b6de8e0 <+20>: movq %rdi, %r12
0x7fff2b6de8e3 <+23>: testq %rdx, %rdx
0x7fff2b6de8e6 <+26>: je 0x7fff2b6dedbb ; <+1263>
0x7fff2b6de8ec <+32>: movq %rcx, %rbx
0x7fff2b6de8ef <+35>: movq %rdx, %r13
0x7fff2b6de8f2 <+38>: movq 0x5b637acf(%rip), %rsi ; "isFileURL"
0x7fff2b6de8f9 <+45>: movq %rdx, %rdi
0x7fff2b6de8fc <+48>: callq *0x5b5a977e(%rip) ; (void *)0x00007fff68d3c800: objc_msgSend
0x7fff2b6de902 <+54>: testb %al, %al
0x7fff2b6de904 <+56>: je 0x7fff2b6dedd8 ; <+1292>
0x7fff2b6de90a <+62>: testq %rbx, %rbx
0x7fff2b6de90d <+65>: je 0x7fff2b6dee38 ; <+1388>
0x7fff2b6de913 <+71>: movq %rbx, -0x30(%rbp)
0x7fff2b6de917 <+75>: movq 0x5b639422(%rip), %rsi ; "_activeConnections"
0x7fff2b6de91e <+82>: movq 0x5b5a975b(%rip), %r15 ; (void *)0x00007fff68d3c800: objc_msgSend
0x7fff2b6de925 <+89>: movq %r12, %rdi
0x7fff2b6de928 <+92>: callq *%r15
0x7fff2b6de92b <+95>: movq 0x5b6350ae(%rip), %rsi ; "count"
0x7fff2b6de932 <+102>: movq %rax, -0x38(%rbp)
0x7fff2b6de936 <+106>: movq %rax, %rdi
0x7fff2b6de939 <+109>: callq *%r15
0x7fff2b6de93c <+112>: testq %rax, %rax
0x7fff2b6de93f <+115>: je 0x7fff2b6dee6c ; <+1440>
0x7fff2b6de945 <+121>: movq 0x5b638594(%rip), %r14 ; "path"
0x7fff2b6de94c <+128>: movq %r13, %rdi
0x7fff2b6de94f <+131>: movq %r14, %rsi
0x7fff2b6de952 <+134>: callq *%r15
0x7fff2b6de955 <+137>: movq 0x5b63941c(%rip), %rsi ; "stringByStandardizingPath"
0x7fff2b6de95c <+144>: movq %rax, %rdi
0x7fff2b6de95f <+147>: callq *%r15
0x7fff2b6de962 <+150>: movq %rax, %rbx
0x7fff2b6de965 <+153>: movq 0x5b639414(%rip), %rsi ; "outputFileURL"
0x7fff2b6de96c <+160>: movq %r12, %rdi
0x7fff2b6de96f <+163>: callq *%r15
0x7fff2b6de972 <+166>: movq %rax, %rdi
0x7fff2b6de975 <+169>: movq %r14, %rsi
0x7fff2b6de978 <+172>: callq *%r15
0x7fff2b6de97b <+175>: movq 0x5b634d8e(%rip), %rsi ; "isEqualToString:"
0x7fff2b6de982 <+182>: movq %rax, %rdi
0x7fff2b6de985 <+185>: movq %rbx, %rdx
0x7fff2b6de988 <+188>: callq *%r15
0x7fff2b6de98b <+191>: testb %al, %al
0x7fff2b6de98d <+193>: jne 0x7fff2b6dedac ; <+1248>
0x7fff2b6de993 <+199>: testq %rbx, %rbx
0x7fff2b6de996 <+202>: je 0x7fff2b6de9b4 ; <+232>
0x7fff2b6de998 <+204>: movq 0x5b63c069(%rip), %rdi ; (void *)0x00007fff8782c7a8: NSURL
0x7fff2b6de99f <+211>: movq 0x5b6393e2(%rip), %rsi ; "fileURLWithPath:"
0x7fff2b6de9a6 <+218>: movq %rbx, %rdx
0x7fff2b6de9a9 <+221>: callq *0x5b5a96d1(%rip) ; (void *)0x00007fff68d3c800: objc_msgSend
0x7fff2b6de9af <+227>: movq %rax, %r13
0x7fff2b6de9b2 <+230>: jmp 0x7fff2b6de9b7 ; <+235>
0x7fff2b6de9b4 <+232>: xorl %r13d, %r13d
0x7fff2b6de9b7 <+235>: movq %r12, %r14
0x7fff2b6de9ba <+238>: movq $0x0, -0x40(%rbp)
0x7fff2b6de9c2 <+246>: movq 0x5b6393a7(%rip), %rsi ; "_stopError"
0x7fff2b6de9c9 <+253>: movq %r12, %rdi
0x7fff2b6de9cc <+256>: callq *0x5b5a96ae(%rip) ; (void *)0x00007fff68d3c800: objc_msgSend
0x7fff2b6de9d2 <+262>: testq %rax, %rax
0x7fff2b6de9d5 <+265>: je 0x7fff2b6dea1c ; <+336>
0x7fff2b6de9d7 <+267>: movq 0x5b63bfd2(%rip), %rbx ; (void *)0x00007fff8782c2a8: NSArray
0x7fff2b6de9de <+274>: movq 0x5b63c9db(%rip), %rdi ; (void *)0x00007fff86d27950: AVCaptureFileOutputRecordingOperationDescriptor
0x7fff2b6de9e5 <+281>: movq 0x5b6393b4(%rip), %rsi ; "recordingOperationDescriptorWithOutputFileURL:delegate:connections:"
0x7fff2b6de9ec <+288>: movq %r13, %rdx
0x7fff2b6de9ef <+291>: movq -0x30(%rbp), %rcx
0x7fff2b6de9f3 <+295>: movq -0x38(%rbp), %r8
0x7fff2b6de9f7 <+299>: callq *%r15
0x7fff2b6de9fa <+302>: movq 0x5b6355df(%rip), %rsi ; "arrayWithObject:"
0x7fff2b6dea01 <+309>: movq %rbx, %rdi
0x7fff2b6dea04 <+312>: movq %rax, %rdx
0x7fff2b6dea07 <+315>: callq *%r15
0x7fff2b6dea0a <+318>: movq 0x5b639397(%rip), %rsi ; "_handleCanceledOperations:"
0x7fff2b6dea11 <+325>: movq %r14, %rdi
0x7fff2b6dea14 <+328>: movq %rax, %rdx
0x7fff2b6dea17 <+331>: jmp 0x7fff2b6deda9 ; <+1245>
0x7fff2b6dea1c <+336>: movq 0x5b63c4d5(%rip), %rdi ; (void *)0x00007fff87da2530: NSFileManager
0x7fff2b6dea23 <+343>: movq 0x5b637c7e(%rip), %rsi ; "defaultManager"
0x7fff2b6dea2a <+350>: callq *%r15
0x7fff2b6dea2d <+353>: movq 0x5b63935c(%rip), %rsi ; "fileExistsAtPath:"
0x7fff2b6dea34 <+360>: movq %rax, %rdi
0x7fff2b6dea37 <+363>: movq %rbx, %rdx
0x7fff2b6dea3a <+366>: callq *%r15
0x7fff2b6dea3d <+369>: testb %al, %al
0x7fff2b6dea3f <+371>: je 0x7fff2b6deabf ; <+499>
0x7fff2b6dea41 <+373>: leaq 0x5b5ad8b8(%rip), %rax ; AVFoundationErrorDomain
0x7fff2b6dea48 <+380>: movq (%rax), %rdi
0x7fff2b6dea4b <+383>: movq $-0x2e2f, %rsi ; imm = 0xD1D1
0x7fff2b6dea52 <+390>: xorl %edx, %edx
0x7fff2b6dea54 <+392>: callq 0x7fff2b6b9a08 ; AVLocalizedError
0x7fff2b6dea59 <+397>: movq %r14, %rbx
0x7fff2b6dea5c <+400>: movq 0x5b639335(%rip), %r14 ; "_setStopError:"
0x7fff2b6dea63 <+407>: movq %rbx, %rdi
0x7fff2b6dea66 <+410>: movq %r14, %rsi
0x7fff2b6dea69 <+413>: movq %rax, %rdx
0x7fff2b6dea6c <+416>: callq *%r15
0x7fff2b6dea6f <+419>: movq 0x5b63bf3a(%rip), %r12 ; (void *)0x00007fff8782c2a8: NSArray
0x7fff2b6dea76 <+426>: movq 0x5b63c943(%rip), %rdi ; (void *)0x00007fff86d27950: AVCaptureFileOutputRecordingOperationDescriptor
0x7fff2b6dea7d <+433>: movq 0x5b63931c(%rip), %rsi ; "recordingOperationDescriptorWithOutputFileURL:delegate:connections:"
0x7fff2b6dea84 <+440>: movq %r13, %rdx
0x7fff2b6dea87 <+443>: movq -0x30(%rbp), %rcx
0x7fff2b6dea8b <+447>: movq -0x38(%rbp), %r8
0x7fff2b6dea8f <+451>: callq *%r15
0x7fff2b6dea92 <+454>: movq 0x5b635547(%rip), %rsi ; "arrayWithObject:"
0x7fff2b6dea99 <+461>: movq %r12, %rdi
0x7fff2b6dea9c <+464>: movq %rax, %rdx
0x7fff2b6dea9f <+467>: callq *%r15
0x7fff2b6deaa2 <+470>: movq 0x5b6392ff(%rip), %rsi ; "_handleCanceledOperations:"
0x7fff2b6deaa9 <+477>: movq %rbx, %rdi
0x7fff2b6deaac <+480>: movq %rax, %rdx
0x7fff2b6deaaf <+483>: callq *%r15
0x7fff2b6deab2 <+486>: movq %rbx, %rdi
0x7fff2b6deab5 <+489>: movq %r14, %rsi
0x7fff2b6deab8 <+492>: xorl %edx, %edx
0x7fff2b6deaba <+494>: jmp 0x7fff2b6deda9 ; <+1245>
0x7fff2b6deabf <+499>: movq 0x5b6392ea(%rip), %rsi ; "_noDataConnections"
0x7fff2b6deac6 <+506>: movq %r14, %rdi
0x7fff2b6deac9 <+509>: callq *%r15
0x7fff2b6deacc <+512>: movq %rax, %rdi
0x7fff2b6deacf <+515>: movq 0x5b634f0a(%rip), %rsi ; "count"
0x7fff2b6dead6 <+522>: callq *%r15
0x7fff2b6dead9 <+525>: testq %rax, %rax
0x7fff2b6deadc <+528>: je 0x7fff2b6dec0b ; <+831>
0x7fff2b6deae2 <+534>: movq 0x5b640a0f(%rip), %r12 ; AVCaptureMovieFileOutput._internal
0x7fff2b6deae9 <+541>: movq %r13, %rbx
0x7fff2b6deaec <+544>: movl $0xf4, %r13d
0x7fff2b6deaf2 <+550>: movq (%r14,%r12), %rdi
0x7fff2b6deaf6 <+554>: addq %r13, %rdi
0x7fff2b6deaf9 <+557>: callq 0x7fff2b82d274 ; symbol stub for: os_unfair_lock_lock
0x7fff2b6deafe <+562>: movq (%r14,%r12), %rax
0x7fff2b6deb02 <+566>: movb $0x1, 0xf1(%rax)
0x7fff2b6deb09 <+573>: movq (%r14,%r12), %rdi
0x7fff2b6deb0d <+577>: addq %r13, %rdi
0x7fff2b6deb10 <+580>: callq 0x7fff2b82d27a ; symbol stub for: os_unfair_lock_unlock
0x7fff2b6deb15 <+585>: movq 0x5b63929c(%rip), %rsi ; "_forciblyStopFileWritingForRunningRecordingOperation"
0x7fff2b6deb1c <+592>: movq %r14, %rdi
0x7fff2b6deb1f <+595>: callq *%r15
-> 0x7fff2b6deb22 <+598>: movq (%r14,%r12), %rax
0x7fff2b6deb26 <+602>: movq 0x58(%rax), %rdi
0x7fff2b6deb2a <+606>: movq 0x5b63767f(%rip), %rsi ; "lock"
0x7fff2b6deb31 <+613>: callq *%r15
0x7fff2b6deb34 <+616>: movq (%r14,%r12), %rax
0x7fff2b6deb38 <+620>: movq 0x50(%rax), %rdi
0x7fff2b6deb3c <+624>: movq 0x5b63927d(%rip), %rsi ; "dequeueAllOperationDescriptors"
0x7fff2b6deb43 <+631>: callq *%r15
0x7fff2b6deb46 <+634>: movq %rax, %rdi
0x7fff2b6deb49 <+637>: callq *0x5b5a9541(%rip) ; (void *)0x00007fff68d3c6d0: objc_retain
0x7fff2b6deb4f <+643>: movq %rax, -0x40(%rbp)
0x7fff2b6deb53 <+647>: testq %rbx, %rbx
0x7fff2b6deb56 <+650>: je 0x7fff2b6debc5 ; <+761>
0x7fff2b6deb58 <+652>: movq (%r14,%r12), %rax
0x7fff2b6deb5c <+656>: movq 0x50(%rax), %rax
0x7fff2b6deb60 <+660>: movq %rax, -0x48(%rbp)
0x7fff2b6deb64 <+664>: movq 0x5b63c855(%rip), %rdi ; (void *)0x00007fff86d27950: AVCaptureFileOutputRecordingOperationDescriptor
0x7fff2b6deb6b <+671>: movq 0x5b63922e(%rip), %rsi ; "recordingOperationDescriptorWithOutputFileURL:delegate:connections:"
0x7fff2b6deb72 <+678>: movq %rbx, %rdx
0x7fff2b6deb75 <+681>: movq -0x30(%rbp), %rcx
0x7fff2b6deb79 <+685>: movq -0x38(%rbp), %r8
0x7fff2b6deb7d <+689>: callq *%r15
0x7fff2b6deb80 <+692>: movq %rax, -0x30(%rbp)
0x7fff2b6deb84 <+696>: movq 0x5b63923d(%rip), %rdx ; "_syncTime"
0x7fff2b6deb8b <+703>: leaq -0x78(%rbp), %rbx
0x7fff2b6deb8f <+707>: movq %rbx, %rdi
0x7fff2b6deb92 <+710>: movq %r14, %rsi
0x7fff2b6deb95 <+713>: callq 0x7fff2b82d220 ; symbol stub for: objc_msgSend_stret
0x7fff2b6deb9a <+718>: movq 0x5b63922f(%rip), %rsi ; "enqueueOperationDescriptor:forTime:dequeuedOperationDescriptors:"
0x7fff2b6deba1 <+725>: subq $0x8, %rsp
0x7fff2b6deba5 <+729>: movq 0x10(%rbx), %rax
0x7fff2b6deba9 <+733>: movq (%rbx), %r8
0x7fff2b6debac <+736>: movq 0x8(%rbx), %rbx
0x7fff2b6debb0 <+740>: movq -0x48(%rbp), %rdi
0x7fff2b6debb4 <+744>: movq -0x30(%rbp), %rdx
0x7fff2b6debb8 <+748>: xorl %ecx, %ecx
0x7fff2b6debba <+750>: pushq %rax
0x7fff2b6debbb <+751>: pushq %rbx
0x7fff2b6debbc <+752>: pushq %r8
0x7fff2b6debbe <+754>: callq *%r15
0x7fff2b6debc1 <+757>: addq $0x20, %rsp
0x7fff2b6debc5 <+761>: movq (%r14,%r12), %rax
0x7fff2b6debc9 <+765>: movq 0x58(%rax), %rdi
0x7fff2b6debcd <+769>: movq 0x5b6375ec(%rip), %rsi ; "unlock"
0x7fff2b6debd4 <+776>: callq *0x5b5a94a6(%rip) ; (void *)0x00007fff68d3c800: objc_msgSend
0x7fff2b6debda <+782>: movq -0x40(%rbp), %rdi
0x7fff2b6debde <+786>: callq 0x7fff2b82d1ba ; symbol stub for: objc_autorelease
0x7fff2b6debe3 <+791>: movq (%r14,%r12), %rdi
0x7fff2b6debe7 <+795>: addq %r13, %rdi
0x7fff2b6debea <+798>: callq 0x7fff2b82d274 ; symbol stub for: os_unfair_lock_lock
0x7fff2b6debef <+803>: movq (%r14,%r12), %rax
0x7fff2b6debf3 <+807>: movb $0x0, 0xf1(%rax)
0x7fff2b6debfa <+814>: addq (%r14,%r12), %r13
0x7fff2b6debfe <+818>: movq %r13, %rdi
0x7fff2b6dec01 <+821>: callq 0x7fff2b82d27a ; symbol stub for: os_unfair_lock_unlock
0x7fff2b6dec06 <+826>: jmp 0x7fff2b6ded61 ; <+1173>
0x7fff2b6dec0b <+831>: movq 0x5b63c2ee(%rip), %rdi ; (void *)0x00007fff87da42e0: NSThread
0x7fff2b6dec12 <+838>: movq 0x5b637a9f(%rip), %rsi ; "currentThread"
0x7fff2b6dec19 <+845>: callq *%r15
0x7fff2b6dec1c <+848>: movq 0x5b638375(%rip), %rsi ; "threadDictionary"
0x7fff2b6dec23 <+855>: movq %rax, %rdi
0x7fff2b6dec26 <+858>: callq *%r15
0x7fff2b6dec29 <+861>: movq 0x5b634c00(%rip), %rsi ; "objectForKey:"
0x7fff2b6dec30 <+868>: leaq 0x5b5bfd31(%rip), %rdx ; @"com.apple.avfoundation.__AVCaptureMovieFileOutputIsCallbackThread"
0x7fff2b6dec37 <+875>: movq %rax, %rdi
0x7fff2b6dec3a <+878>: callq *%r15
0x7fff2b6dec3d <+881>: movq %rax, %rbx
0x7fff2b6dec40 <+884>: movq 0x5b6408b1(%rip), %r12 ; AVCaptureMovieFileOutput._internal
0x7fff2b6dec47 <+891>: movq (%r14,%r12), %rax
0x7fff2b6dec4b <+895>: movq 0x58(%rax), %rdi
0x7fff2b6dec4f <+899>: movq 0x5b63755a(%rip), %rsi ; "lock"
0x7fff2b6dec56 <+906>: callq *%r15
0x7fff2b6dec59 <+909>: movq (%r14,%r12), %rax
0x7fff2b6dec5d <+913>: movq 0x50(%rax), %r12
0x7fff2b6dec61 <+917>: movq 0x5b63c758(%rip), %rdi ; (void *)0x00007fff86d27950: AVCaptureFileOutputRecordingOperationDescriptor
0x7fff2b6dec68 <+924>: movq 0x5b639131(%rip), %rsi ; "recordingOperationDescriptorWithOutputFileURL:delegate:connections:"
0x7fff2b6dec6f <+931>: movq %r13, %rdx
0x7fff2b6dec72 <+934>: movq -0x30(%rbp), %rcx
0x7fff2b6dec76 <+938>: movq -0x38(%rbp), %r8
0x7fff2b6dec7a <+942>: callq *%r15
0x7fff2b6dec7d <+945>: movq %rax, %rdx
0x7fff2b6dec80 <+948>: testq %rbx, %rbx
0x7fff2b6dec83 <+951>: movq %rbx, -0x48(%rbp)
0x7fff2b6dec87 <+955>: movq %r12, %r13
0x7fff2b6dec8a <+958>: je 0x7fff2b6decac ; <+992>
0x7fff2b6dec8c <+960>: movq 0x5b5a63ad(%rip), %rax ; (void *)0x00007fff310fae28: kCMTimeNegativeInfinity
0x7fff2b6dec93 <+967>: movq 0x10(%rax), %rcx
0x7fff2b6dec97 <+971>: movq %rcx, -0x50(%rbp)
0x7fff2b6dec9b <+975>: movq (%rax), %rcx
0x7fff2b6dec9e <+978>: movq 0x8(%rax), %rax
0x7fff2b6deca2 <+982>: movq %rax, -0x58(%rbp)
0x7fff2b6deca6 <+986>: movq %rcx, -0x60(%rbp)
0x7fff2b6decaa <+990>: jmp 0x7fff2b6decc5 ; <+1017>
0x7fff2b6decac <+992>: movq %rdx, %rbx
0x7fff2b6decaf <+995>: movq 0x5b639112(%rip), %rdx ; "_syncTime"
0x7fff2b6decb6 <+1002>: leaq -0x60(%rbp), %rdi
0x7fff2b6decba <+1006>: movq %r14, %rsi
0x7fff2b6decbd <+1009>: callq 0x7fff2b82d220 ; symbol stub for: objc_msgSend_stret
0x7fff2b6decc2 <+1014>: movq %rbx, %rdx
0x7fff2b6decc5 <+1017>: movq 0x5b639104(%rip), %rsi ; "enqueueOperationDescriptor:forTime:dequeuedOperationDescriptors:"
0x7fff2b6deccc <+1024>: subq $0x8, %rsp
0x7fff2b6decd0 <+1028>: movq -0x50(%rbp), %rax
0x7fff2b6decd4 <+1032>: movq -0x60(%rbp), %r8
0x7fff2b6decd8 <+1036>: movq -0x58(%rbp), %rbx
0x7fff2b6decdc <+1040>: leaq -0x40(%rbp), %r12
0x7fff2b6dece0 <+1044>: movq %r13, %rdi
0x7fff2b6dece3 <+1047>: movq %r12, %rcx
0x7fff2b6dece6 <+1050>: pushq %rax
0x7fff2b6dece7 <+1051>: pushq %rbx
0x7fff2b6dece8 <+1052>: pushq %r8
0x7fff2b6decea <+1054>: callq *%r15
0x7fff2b6deced <+1057>: addq $0x20, %rsp
0x7fff2b6decf1 <+1061>: movq (%r12), %rdi
0x7fff2b6decf5 <+1065>: callq *0x5b5a9395(%rip) ; (void *)0x00007fff68d3c6d0: objc_retain
0x7fff2b6decfb <+1071>: movq 0x5b6407f6(%rip), %rax ; AVCaptureMovieFileOutput._internal
0x7fff2b6ded02 <+1078>: movq (%r14,%rax), %rax
0x7fff2b6ded06 <+1082>: movq 0x58(%rax), %rdi
0x7fff2b6ded0a <+1086>: movq 0x5b6374af(%rip), %rsi ; "unlock"
0x7fff2b6ded11 <+1093>: callq *%r15
0x7fff2b6ded14 <+1096>: movq (%r12), %rdi
0x7fff2b6ded18 <+1100>: callq 0x7fff2b82d1ba ; symbol stub for: objc_autorelease
0x7fff2b6ded1d <+1105>: cmpq $0x0, -0x48(%rbp)
0x7fff2b6ded22 <+1110>: jne 0x7fff2b6ded61 ; <+1173>
0x7fff2b6ded24 <+1112>: movq 0x5b6390ad(%rip), %rbx ; "_startFileControlCallbackTimeoutTimer"
0x7fff2b6ded2b <+1119>: movq 0x5b63bc7e(%rip), %rdi ; (void *)0x00007fff8782c2a8: NSArray
0x7fff2b6ded32 <+1126>: movq 0x5b5a6047(%rip), %rax ; (void *)0x00007fff876fb4a8: kCFRunLoopCommonModes
0x7fff2b6ded39 <+1133>: movq (%rax), %rdx
0x7fff2b6ded3c <+1136>: movq 0x5b63529d(%rip), %rsi ; "arrayWithObject:"
0x7fff2b6ded43 <+1143>: callq *%r15
0x7fff2b6ded46 <+1146>: movq 0x5b639093(%rip), %rsi ; "performSelectorOnMainThread:withObject:waitUntilDone:modes:"
0x7fff2b6ded4d <+1153>: movq %r14, %rdi
0x7fff2b6ded50 <+1156>: movq %rbx, %rdx
0x7fff2b6ded53 <+1159>: xorl %ecx, %ecx
0x7fff2b6ded55 <+1161>: movl $0x1, %r8d
0x7fff2b6ded5b <+1167>: movq %rax, %r9
0x7fff2b6ded5e <+1170>: callq *%r15
0x7fff2b6ded61 <+1173>: movq 0x5b639080(%rip), %rbx ; "_refreshRecordingState"
0x7fff2b6ded68 <+1180>: movq 0x5b63bc41(%rip), %rdi ; (void *)0x00007fff8782c2a8: NSArray
0x7fff2b6ded6f <+1187>: movq 0x5b5a600a(%rip), %rax ; (void *)0x00007fff876fb4a8: kCFRunLoopCommonModes
0x7fff2b6ded76 <+1194>: movq (%rax), %rdx
0x7fff2b6ded79 <+1197>: movq 0x5b635260(%rip), %rsi ; "arrayWithObject:"
0x7fff2b6ded80 <+1204>: callq *%r15
0x7fff2b6ded83 <+1207>: movq 0x5b639056(%rip), %rsi ; "performSelectorOnMainThread:withObject:waitUntilDone:modes:"
0x7fff2b6ded8a <+1214>: movq %r14, %rdi
0x7fff2b6ded8d <+1217>: movq %rbx, %rdx
0x7fff2b6ded90 <+1220>: xorl %ecx, %ecx
0x7fff2b6ded92 <+1222>: xorl %r8d, %r8d
0x7fff2b6ded95 <+1225>: movq %rax, %r9
0x7fff2b6ded98 <+1228>: callq *%r15
0x7fff2b6ded9b <+1231>: movq -0x40(%rbp), %rdx
0x7fff2b6ded9f <+1235>: movq 0x5b639002(%rip), %rsi ; "_handleCanceledOperations:"
0x7fff2b6deda6 <+1242>: movq %r14, %rdi
0x7fff2b6deda9 <+1245>: callq *%r15
0x7fff2b6dedac <+1248>: addq $0x58, %rsp
0x7fff2b6dedb0 <+1252>: popq %rbx
0x7fff2b6dedb1 <+1253>: popq %r12
0x7fff2b6dedb3 <+1255>: popq %r13
0x7fff2b6dedb5 <+1257>: popq %r14
0x7fff2b6dedb7 <+1259>: popq %r15
0x7fff2b6dedb9 <+1261>: popq %rbp
0x7fff2b6dedba <+1262>: retq
0x7fff2b6dedbb <+1263>: movq %r12, %rdi
0x7fff2b6dedbe <+1266>: movq 0x5b63bb9b(%rip), %rbx ; (void *)0x00007fff8782c438: NSException
0x7fff2b6dedc5 <+1273>: movq 0x5b5a5e74(%rip), %rax ; (void *)0x00007fff87730640: NSInvalidArgumentException
0x7fff2b6dedcc <+1280>: movq (%rax), %r12
0x7fff2b6dedcf <+1283>: leaq 0x5b5bd4f2(%rip), %rdx ; @"Nil URL passed"
0x7fff2b6dedd6 <+1290>: jmp 0x7fff2b6dee53 ; <+1415>
0x7fff2b6dedd8 <+1292>: movq 0x5b63bb81(%rip), %rbx ; (void *)0x00007fff8782c438: NSException
0x7fff2b6deddf <+1299>: movq 0x5b5a5e5a(%rip), %rax ; (void *)0x00007fff87730640: NSInvalidArgumentException
0x7fff2b6dede6 <+1306>: movq (%rax), %r15
0x7fff2b6dede9 <+1309>: movq 0x5b63bb20(%rip), %rdi ; (void *)0x00007fff87da4178: NSString
0x7fff2b6dedf0 <+1316>: movq 0x5b6348d1(%rip), %rsi ; "stringWithFormat:"
0x7fff2b6dedf7 <+1323>: leaq 0x5b5bd4ea(%rip), %rdx ; @"Cannot record to URL %@ because it is not a file URL"
0x7fff2b6dedfe <+1330>: movq 0x5b5a927b(%rip), %r8 ; (void *)0x00007fff68d3c800: objc_msgSend
0x7fff2b6dee05 <+1337>: movq %r13, %rcx
0x7fff2b6dee08 <+1340>: xorl %eax, %eax
0x7fff2b6dee0a <+1342>: movq %r8, %r13
0x7fff2b6dee0d <+1345>: callq *%r8
0x7fff2b6dee10 <+1348>: movq %r12, %rdi
0x7fff2b6dee13 <+1351>: movq %r14, %rsi
0x7fff2b6dee16 <+1354>: movq %rax, %rdx
0x7fff2b6dee19 <+1357>: xorl %eax, %eax
0x7fff2b6dee1b <+1359>: callq 0x7fff2b79f3ca ; AVMethodExceptionReasonWithObjectAndSelector
0x7fff2b6dee20 <+1364>: movq 0x5b634b71(%rip), %rsi ; "exceptionWithName:reason:userInfo:"
0x7fff2b6dee27 <+1371>: movq %rbx, %rdi
0x7fff2b6dee2a <+1374>: movq %r15, %rdx
0x7fff2b6dee2d <+1377>: movq %rax, %rcx
0x7fff2b6dee30 <+1380>: xorl %r8d, %r8d
0x7fff2b6dee33 <+1383>: callq *%r13
0x7fff2b6dee36 <+1386>: jmp 0x7fff2b6deeaa ; <+1502>
0x7fff2b6dee38 <+1388>: movq %r12, %rdi
0x7fff2b6dee3b <+1391>: movq 0x5b63bb1e(%rip), %rbx ; (void *)0x00007fff8782c438: NSException
0x7fff2b6dee42 <+1398>: movq 0x5b5a5df7(%rip), %rax ; (void *)0x00007fff87730640: NSInvalidArgumentException
0x7fff2b6dee49 <+1405>: movq (%rax), %r12
0x7fff2b6dee4c <+1408>: leaq 0x5b5bd4b5(%rip), %rdx ; @"Nil delegate passed"
0x7fff2b6dee53 <+1415>: movq %r14, %rsi
0x7fff2b6dee56 <+1418>: xorl %eax, %eax
0x7fff2b6dee58 <+1420>: callq 0x7fff2b79f3ca ; AVMethodExceptionReasonWithObjectAndSelector
0x7fff2b6dee5d <+1425>: movq 0x5b634b34(%rip), %rsi ; "exceptionWithName:reason:userInfo:"
0x7fff2b6dee64 <+1432>: movq %rbx, %rdi
0x7fff2b6dee67 <+1435>: movq %r12, %rdx
0x7fff2b6dee6a <+1438>: jmp 0x7fff2b6dee9e ; <+1490>
0x7fff2b6dee6c <+1440>: movq 0x5b63baed(%rip), %rbx ; (void *)0x00007fff8782c438: NSException
0x7fff2b6dee73 <+1447>: movq 0x5b5a5dc6(%rip), %rax ; (void *)0x00007fff87730640: NSInvalidArgumentException
0x7fff2b6dee7a <+1454>: movq (%rax), %r15
0x7fff2b6dee7d <+1457>: leaq 0x5b5bd4a4(%rip), %rdx ; @"No active/enabled connections"
0x7fff2b6dee84 <+1464>: movq %r12, %rdi
0x7fff2b6dee87 <+1467>: movq %r14, %rsi
0x7fff2b6dee8a <+1470>: xorl %eax, %eax
0x7fff2b6dee8c <+1472>: callq 0x7fff2b79f3ca ; AVMethodExceptionReasonWithObjectAndSelector
0x7fff2b6dee91 <+1477>: movq 0x5b634b00(%rip), %rsi ; "exceptionWithName:reason:userInfo:"
0x7fff2b6dee98 <+1484>: movq %rbx, %rdi
0x7fff2b6dee9b <+1487>: movq %r15, %rdx
0x7fff2b6dee9e <+1490>: movq %rax, %rcx
0x7fff2b6deea1 <+1493>: xorl %r8d, %r8d
0x7fff2b6deea4 <+1496>: callq *0x5b5a91d6(%rip) ; (void *)0x00007fff68d3c800: objc_msgSend
0x7fff2b6deeaa <+1502>: movq %rax, %rdi
0x7fff2b6deead <+1505>: callq 0x7fff2b82d1fc ; symbol stub for: objc_exception_throw
Что мне теперь делать с этой информацией и какими способами я могу предотвратить это? Есть ли другие вещи, которые мне нужно поместить в контекст?
Метод startRecording
вызывается в делегате captureOutput
, например:
func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {
// other logic
if self.shouldStartANewRecording(output, sampleBuffer) {
self.isRecording = true
self.lastRecordedAt = Date()
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(20)) {
self.movieFileOutput.startRecording(to: fileName, recordingDelegate: self) // here
}
} else if self.shouldStopRecording() {
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(20)) {
self.movieFileOutput.stopRecording()
self.isRecording = false
}
}
// other logic
}