在PhotosUI中崩溃

时间:2014-04-18 06:18:09

标签: ios objective-c ios7 uiimagepickercontroller ios7.1

我以模态UIImagePickerController呈现用户的照片,并看到来自PhotosUI的崩溃 - 这是我的错吗?如果全部是UIKit CoreFoundation& PhotosUI(iOS 7.1)?

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])
    {
        _libraryPicker = [[UIImagePickerController alloc] init];
        _libraryPicker.delegate = self;
        _libraryPicker.allowsEditing = YES;
        _libraryPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

        [self presentViewController:_libraryPicker animated:animated completion:NULL];
    }

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
 //
}
  

致命异常:NSRangeException    * - [__ NSOrderedSetM objectAtIndex:]:超出边界的索引300 [0 .. 299]

Thread : Fatal Exception: NSRangeException
0  CoreFoundation                 0x0000000183506950 __exceptionPreprocess + 132
1  libobjc.A.dylib                0x000000018fa0c1fc objc_exception_throw + 60
2  CoreFoundation                 0x000000018347f820 -[NSArray indexOfObjectIdenticalTo:inRange:]
3  PhotosUI                       0x000000018b113b2c -[PUPhotosGridViewController assetAtIndexPath:]
4  PhotosUI                       0x000000018b11fe80 -[PUPhotosGridViewController collectionView:shouldSelectItemAtIndexPath:]
5  UIKit                          0x0000000186715204 -[UICollectionView _selectItemAtIndexPath:animated:scrollPosition:notifyDelegate:] + 196
6  UIKit                          0x0000000186714d5c -[UICollectionView touchesEnded:withEvent:] + 448
7  UIKit                          0x00000001866735f8 forwardTouchMethod + 268
8  UIKit                          0x00000001864c1e0c _UIGestureRecognizerUpdate + 5032
9  UIKit                          0x00000001864ffb20 -[UIWindow _sendGesturesForEvent:] + 1012
10 UIKit                          0x00000001864ff230 -[UIWindow sendEvent:] + 828
11 UIKit                          0x00000001864d0b68 -[UIApplication sendEvent:] + 256
12 UIKit                          0x00000001864cec58 _UIApplicationHandleEventQueue + 8500
13 CoreFoundation                 0x00000001834c7044 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
14 CoreFoundation                 0x00000001834c63a0 __CFRunLoopDoSources0 + 256
15 CoreFoundation                 0x00000001834c4638 __CFRunLoopRun + 632
16 CoreFoundation                 0x00000001834056d0 CFRunLoopRunSpecific + 452
17 GraphicsServices               0x00000001890e9c0c GSEventRunModal + 168
18 UIKit                          0x0000000186536fdc UIApplicationMain + 1156
19 *******                        0x0000000100097858 main (main.m:16)
20 libdyld.dylib                  0x000000018ffffaa0 start + 4

0 个答案:

没有答案