amazon-chime-sdk-ios
amazon-chime-sdk-ios copied to clipboard
NSGenericException when starting/switch camera.
Describe the bug
We are seeing crash reports when users try to start or switch their camera. We have a few different stack traces, but they are all getting tagged as NSGenericException
in our crash reporting.
To Reproduce Unable to reproduce. We just see the crash reports come in from users.
Logs We see crashes in two different locations...
-
DefaultCameraCaptureSource.start()
a. First instances date back to when we were using Chime SDK 0.11.0 and Chime Media SDK 0.7.0
b. The Second instances are after we upgraded from Chime SDK 0.15.0 to 0.17.0 and Chime Media SDK from 0.11.0 to 0.13.0. Note theThread 9 Crashed: 0 CoreFoundation 0x30ac1b708 <redacted> 1 libobjc.A.dylib 0x3343307a8 objc_exception_throw 2 AVFCapture 0x33ec23e50 <redacted> 3 AmazonChimeSDK 0x106fc76e8 globalinit_33_D78EC57267D91995F1CB206F2C71A37F_func42 4 <MyApp> 0x202993f74 closure #1 in MyClass.start() 5 <MyApp> 0x202993d74 partial apply for closure #1 in MyClass.start() 6 <MyApp> 0x202835c84 thunk for @escaping @callee_guaranteed () -> ()
_swift_stdlib_malloc_size
instead ofglobalinit_33...
...Thread 11 Crashed: 0 CoreFoundation 0x332445288 <redacted> 1 libobjc.A.dylib 0x363ebc744 objc_exception_throw 2 AVFCapture 0x37054ba1c <redacted> 3 AmazonChimeSDK 0x105640a34 _swift_stdlib_malloc_size 4 <MyApp> 0x201099adc [inlined] closure #1 in MyClass.start() 5 <MyApp> 0x201099adc partial apply for closure #1 in MyClass.start() 6 <MyApp> 0x2016bcf70 thunk for @escaping @callee_guaranteed () -> ()
-
DefaultCamerCaptureSource.switchCamera()
a. These started showing up when we upgraded from Chime SDK 0.15.0 to 0.17.0 and Chime Media SDK from 0.11.0 to 0.13.0...Thread 19 Crashed: 0 CoreFoundation 0x300b350fc <redacted> 1 libobjc.A.dylib 0x331c59d64 objc_exception_throw 2 AVFCapture 0x33dfa7d8c <redacted> 3 AmazonChimeSDK 0x106e17bbc globalinit_33_D78EC57267D91995F1CB206F2C71A37F_func43 4 AmazonChimeSDK 0x106e19644 globalinit_33_D78EC57267D91995F1CB206F2C71A37F_func43 5 AmazonChimeSDK 0x106e17fa4 globalinit_33_D78EC57267D91995F1CB206F2C71A37F_func43 6 <MyApp> 0x20292ff9c closure #1 in MyClass.switchCamera() 7 <MyApp> 0x202e8c09c thunk for @escaping @callee_guaranteed () -> ()
Test environment Info (please complete the following information):
- Device: Multiple
- OS: Multiple
- Version AmazonChimeSDK: 0.17.0 (See some issues prior to this, but they may be unrelated).
- Version AmazonChimeSDKMedia: 0.13.0 (See some issues prior to this, but they may be unrelated).
- Can you reproduce this in the demo app? No If you are reporting a crash:
- Are you using bitcode supported binaries? No
Thoughts
At first I thought it would be related to our upgrade from 0.15.0 to 0.17.0. However, since we see some crashes for .start()
well before that, I'm less sure. However, it could be that these earlier crashes are a red herring. All I can see is that the last trace from my app is at the line where we either call DefaultCameraCaptureSource.start()
or DefaultCameraCaptureSource.switchCamera
.
Hi @keverly, do you have the full crash logs so we can symbolicate on our end?
Hi @keverly,
For the crash reports you shared, where did you get them? The format does not look correct, the header is missing(should look like this). Also, what is the SDK version for the crash report?
Could you also upgrade to the latest version? See if that addresses the crash.
They were provided by Sentry.
The latest crashes we see are with ChimeSDK 0.19.4 and ChimeMediaSDK 0.15.4. I will update them for our next release, but would appreciate it if this could be looked into in the mean time.
Hi @keverly,
Are you still experiencing this issue?
Closing this for now for pending customer response for 14+ days. Feel free to reopen it if you have further questions.