I have a camera app on the app store that uses GPUImage to take pictures and record videos. I am getting crash reports that says its crashing for a lot of users with the error
Fatal Exception: NSRangeException
*** -[NSArray| objectAtIndex:]: index 0 beyond bounds for empty array
The crash report says the crash occurs in the GPUImageStillCamera.m class at line 283. Below is the crash report. I appreciate your help in advance.
Thread : Fatal Exception: NSRangeException
0 CoreFoundation 6484558552 __exceptionPreprocess
1 libobjc.A.dylib 6783221988 objc_exception_throw
2 CoreFoundation 6483393332 CFRunLoopRemoveTimer
3 Selfie 4297468448 -[GPUImageStillCamera capturePhotoProcessedUpToFilter:withImageOnGPUHandler:] (GPUImageStillCamera.m:283)
4 Selfie 4297465636 -[GPUImageStillCamera capturePhotoAsImageProcessedUpToFilter:withOrientation:withCompletionHandler:] (GPUImageStillCamera.m:171)
5 Selfie 4295826452 +[SEMediaCapture captureImageFromCamera:withFilter:completion:] (SEMediaCapture.m:39)
6 Selfie 4296216108 -[SEViewController takePicture] (SEViewController.m:595)
7 Selfie 4296201380 -[SEViewController tappedToTakeAPicture:] (SEViewController.m:216)
8 UIKit 6564311152 _UIGestureRecognizerSendActions
9 UIKit 6562842292 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:]
10 UIKit 6567498636 ___UIGestureRecognizerUpdate_block_invoke662
11 UIKit 6562595864 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks
12 UIKit 6562588612 _UIGestureRecognizerUpdate
13 UIKit 6562834476 -[UIWindow _sendGesturesForEvent:]
14 UIKit 6562832100 -[UIWindow sendEvent:]
15 UIKit 6562648352 -[UIApplication sendEvent:]
16 UIKit 6565405368 _UIApplicationHandleEventFromQueueEvent
17 UIKit 6562641460 _UIApplicationHandleEventQueue
18 CoreFoundation 6484263488 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
19 CoreFoundation 6484260068 __CFRunLoopDoSources0
20 CoreFoundation 6484252052 __CFRunLoopRun
21 CoreFoundation 6483382996 CFRunLoopRunSpecific
22 GraphicsServices 6645217020 GSEventRunModal
23 UIKit 6563065664 UIApplicationMain
24 Selfie 4296168708 main (main.m:15)
25 libdyld.dylib 6790212104 start