onfido-ios-sdk icon indicating copy to clipboard operation
onfido-ios-sdk copied to clipboard

NSInternalInconsistencyException on -[AVAssetWriterInput appendSampleBuffer:]

Open lmmenge opened this issue 3 years ago • 10 comments

What was the expected behaviour?

The Onfido library shouldn't crash.

What happened instead?

It crashed with the following exception:

NSInternalInconsistencyException
*** -[AVAssetWriterInput appendSampleBuffer:] Cannot append sample buffer: Must start a session (using -[AVAssetWriter startSessionAtSourceTime:) first

And the following crash log:

OS Version: iOS 14.4 (18D52)
Report Version: 104

Exception Type: EXC_CRASH (SIGABRT)
Crashed Thread: 12

Application Specific Information:
*** -[AVAssetWriterInput appendSampleBuffer:] Cannot append sample buffer: Must start a session (using -[AVAssetWriter startSessionAtSourceTime:) first

Thread 12 Crashed:
0   CoreFoundation                  0x32e10a9d8         <redacted>
1   libobjc.A.dylib                 0x347e73b54         objc_exception_throw
2   AVFCore                         0x36980c7bc         <redacted>
3   Onfido                          0x105c596bc         __swift_memcpy17_8
4   Onfido                          0x105c3384c         globalinit_33_6415B0A579C15A74E4EFB0C40ADAB8DD_func3
5   Foundation                      0x31af232e8         <redacted>
6   Foundation                      0x31ae20098         <redacted>
7   Foundation                      0x31af255a0         <redacted>
8   Foundation                      0x31ae1fd54         <redacted>
9   Foundation                      0x31af25f98         <redacted>
10  Foundation                      0x31af25a64         <redacted>
11  libdispatch.dylib               0x19950575c         <redacted>
12  libdispatch.dylib               0x199556280         <redacted>
13  libdispatch.dylib               0x1994fb390         <redacted>
14  libdispatch.dylib               0x1994faad4         <redacted>
15  libdispatch.dylib               0x199507f3c         <redacted>
16  libdispatch.dylib               0x199508704         <redacted>
17  libsystem_pthread.dylib         0x38bfd8568         _pthread_wqthread
18  libsystem_pthread.dylib         0x38bfdb874         start_wqthread

Thread 0
0   libsystem_kernel.dylib          0x3757ab644         mach_msg_trap
1   libsystem_kernel.dylib          0x3757aaa48         mach_msg
2   CoreFoundation                  0x32e08a0fc         <redacted>
3   CoreFoundation                  0x32e084570         <redacted>
4   CoreFoundation                  0x32e083ba0         CFRunLoopRunSpecific
5   GraphicsServices                0x367877598         GSEventRunModal
6   UIKitCore                       0x324d472f4         <redacted>
7   UIKitCore                       0x324d4c874         UIApplicationMain
8   bunq                            0x204b46c30         main (main.m:17)
9   libdyld.dylib                   0x33c7ff568         <redacted>

Thread 1 name: com.apple.uikit.eventfetch-thread
0   libsystem_kernel.dylib          0x3757ab644         mach_msg_trap
1   libsystem_kernel.dylib          0x3757aaa48         mach_msg
2   CoreFoundation                  0x32e08a0fc         <redacted>
3   CoreFoundation                  0x32e084570         <redacted>
4   CoreFoundation                  0x32e083ba0         CFRunLoopRunSpecific
5   Foundation                      0x31ae097f8         <redacted>
6   Foundation                      0x31ae096d8         <redacted>
7   UIKitCore                       0x324df3054         <redacted>
8   Foundation                      0x31af664bc         <redacted>
9   libsystem_pthread.dylib         0x38bfd6c9c         _pthread_start

Thread 2
0   libsystem_kernel.dylib          0x3757cebf0         __semwait_signal
1   libsystem_c.dylib               0x36aff06d4         nanosleep
2   libsystem_c.dylib               0x36aff04d4         sleep
3   Sentry                          0x2b805a9b8         monitorCachedData
4   libsystem_pthread.dylib         0x38bfd6c9c         _pthread_start

Thread 3 name: SentryCrash Exception Handler (Secondary)
0   libsystem_kernel.dylib          0x3757ab644         mach_msg_trap
1   libsystem_kernel.dylib          0x3757aaa48         mach_msg
2   libsystem_kernel.dylib          0x3757c851c         thread_suspend
3   Sentry                          0x2b805167c         handleExceptions
4   libsystem_pthread.dylib         0x38bfd6c9c         _pthread_start

Thread 4 name: SentryCrash Exception Handler (Primary)
0   libsystem_kernel.dylib          0x3757ab644         mach_msg_trap
1   libsystem_kernel.dylib          0x3757aaa48         mach_msg
2   Sentry                          0x2b80516a8         handleExceptions
3   libsystem_pthread.dylib         0x38bfd6c9c         _pthread_start

Thread 5 name: com.apple.NSURLConnectionLoader
0   libsystem_kernel.dylib          0x3757ab644         mach_msg_trap
1   libsystem_kernel.dylib          0x3757aaa48         mach_msg
2   CoreFoundation                  0x32e08a0fc         <redacted>
3   CoreFoundation                  0x32e084570         <redacted>
4   CoreFoundation                  0x32e083ba0         CFRunLoopRunSpecific
5   CFNetwork                       0x31ab6e4b0         _CFURLStorageSessionCopyCache
6   Foundation                      0x31af664bc         <redacted>
7   libsystem_pthread.dylib         0x38bfd6c9c         _pthread_start

Thread 6 name: AVAudioSession Notify Thread
0   libsystem_kernel.dylib          0x3757ab644         mach_msg_trap
1   libsystem_kernel.dylib          0x3757aaa48         mach_msg
2   CoreFoundation                  0x32e08a0fc         <redacted>
3   CoreFoundation                  0x32e084570         <redacted>
4   CoreFoundation                  0x32e083ba0         CFRunLoopRunSpecific
5   AudioSession                    0x339bd7098         <redacted>
6   AudioSession                    0x339bd8ff8         <redacted>
7   libsystem_pthread.dylib         0x38bfd6c9c         _pthread_start

Thread 7 name: com.apple.CoreMotion.MotionThread
0   libsystem_kernel.dylib          0x3757ab644         mach_msg_trap
1   libsystem_kernel.dylib          0x3757aaa48         mach_msg
2   CoreFoundation                  0x32e08a0fc         <redacted>
3   CoreFoundation                  0x32e084570         <redacted>
4   CoreFoundation                  0x32e083ba0         CFRunLoopRunSpecific
5   CoreFoundation                  0x32e084c60         CFRunLoopRun
6   CoreMotion                      0x338b73d68         CLClientCreateIso6709Notation
7   libsystem_pthread.dylib         0x38bfd6c9c         _pthread_start

Thread 8
0   libsystem_kernel.dylib          0x3757cf48c         __workq_kernreturn
1   libsystem_pthread.dylib         0x38bfd85f0         _pthread_wqthread

Thread 9
0   libsystem_kernel.dylib          0x3757cf48c         __workq_kernreturn
1   libsystem_pthread.dylib         0x38bfd85f0         _pthread_wqthread

Thread 10
0   libsystem_kernel.dylib          0x3757cf48c         __workq_kernreturn
1   libsystem_pthread.dylib         0x38bfd85f0         _pthread_wqthread

Thread 11
0   libsystem_pthread.dylib         0x38bfdb86c         <redacted>

Thread 12 Crashed:
0   CoreFoundation                  0x32e10a9d8         <redacted>
1   libobjc.A.dylib                 0x347e73b54         objc_exception_throw
2   AVFCore                         0x36980c7bc         <redacted>
3   Onfido                          0x105c596bc         __swift_memcpy17_8
4   Onfido                          0x105c3384c         globalinit_33_6415B0A579C15A74E4EFB0C40ADAB8DD_func3
5   Foundation                      0x31af232e8         <redacted>
6   Foundation                      0x31ae20098         <redacted>
7   Foundation                      0x31af255a0         <redacted>
8   Foundation                      0x31ae1fd54         <redacted>
9   Foundation                      0x31af25f98         <redacted>
10  Foundation                      0x31af25a64         <redacted>
11  libdispatch.dylib               0x19950575c         <redacted>
12  libdispatch.dylib               0x199556280         <redacted>
13  libdispatch.dylib               0x1994fb390         <redacted>
14  libdispatch.dylib               0x1994faad4         <redacted>
15  libdispatch.dylib               0x199507f3c         <redacted>
16  libdispatch.dylib               0x199508704         <redacted>
17  libsystem_pthread.dylib         0x38bfd8568         _pthread_wqthread
18  libsystem_pthread.dylib         0x38bfdb874         start_wqthread

Thread 13
0   libsystem_pthread.dylib         0x38bfdb86c         <redacted>



EOF

Version info:

  • Cocoapods (if applicable): N/A
  • Onfido SDK (Debug/Release): 20.0.1 (Release)
  • iOS: 14.4 / 14.3 / 14.0.1 / 12.5.1 / 11.3.1
  • Xcode: 12.4
  • Device/Simulator: iPhone 7 Plus / iPhone 7 / iPhone SE / iPhone 5s / iPhone 6
  • Device/Simulator language: Unknown

Integration configuration:

The only change we're doing out of the ordinary is using a custom strings file:

[configBuilder withCustomLocalizationWithTableName:@"Onfido"];

Steps to reproduce:

Couldn't reproduce internally. This is a crash out from one of our users.

lmmenge avatar Mar 04 '21 10:03 lmmenge