-
Notifications
You must be signed in to change notification settings - Fork 12
Description
- I create a view controller on storyboard
- I assign that viewcontroller's class to BUKImagePickerController
- I run the application. The camera roll item appears. I click on it. It crashes with this error:
the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values.
The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x7fe172d52e10>, and it is attached to <UICollectionView: 0x7fe17302b000; frame = (0 0; 414 736); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x7fe172c12220>; layer = <CALayer: 0x7fe172c17d10>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <UICollectionViewFlowLayout: 0x7fe172d52e10>.
2016-06-24 19:54:07.524 CameraMagicNew[1915:1255483] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
2016-06-24 19:54:07.561 CameraMagicNew[1915:1255483] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan inf]'
*** First throw call stack:
(
0 CoreFoundation 0x000000010b67fd85 exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010ad6ddeb objc_exception_throw + 48
2 CoreFoundation 0x000000010b67fcbd +[NSException raise:format:] + 205
3 QuartzCore 0x000000010f8f2e4a _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 152
4 QuartzCore 0x000000010f8f2fbd -[CALayer setPosition:] + 44
5 UIKit 0x000000010ca18d82 -[UICollectionViewLayoutAttributes frame] + 195
6 UIKit 0x000000010ca48eb3 -[UICollectionViewData _setLayoutAttributes:atGlobalItemIndex:] + 149
7 UIKit 0x000000010ca4bb08 -[UICollectionViewData layoutAttributesForItemAtIndexPath:] + 445
8 UIKit 0x000000010c9fd684 -[UICollectionView scrollToItemAtIndexPath:atScrollPosition:animated:] + 241
9 BUKImagePickerController 0x000000010a886a67 -[BUKAssetsViewController scrollToLatestPhotos] + 519
10 BUKImagePickerController 0x000000010a88479b -[BUKAssetsViewController viewWillAppear:] + 107
11 UIKit 0x000000010c3172bd -[UIViewController _setViewAppearState:isAnimating:] + 710
12 UIKit 0x000000010c317958 -[UIViewController __viewWillAppear:] + 149
13 UIKit 0x000000010ca25e4a -[UICollectionViewController __viewWillAppear:] + 52
14 UIKit 0x000000010c347750 -[UINavigationController _startCustomTransition:] + 1203
15 UIKit 0x000000010c357b9b -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
16 UIKit 0x000000010c358d0b -[UINavigationController __viewWillLayoutSubviews] + 57
17 UIKit 0x000000010c507503 -[UILayoutContainerView layoutSubviews] + 248
18 UIKit 0x000000010c231980 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
19 QuartzCore 0x000000010f8fbc00 -[CALayer layoutSublayers] + 146
20 QuartzCore 0x000000010f8f008e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
21 QuartzCore 0x000000010f8eff0c _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
22 QuartzCore 0x000000010f8e43c9 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
23 QuartzCore 0x000000010f912086 _ZN2CA11Transaction6commitEv + 486
24 UIKit 0x000000010c1a319b _afterCACommitHandler + 174
25 CoreFoundation 0x000000010b5a4c37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 23
26 CoreFoundation 0x000000010b5a4ba7 __CFRunLoopDoObservers + 391
27 CoreFoundation 0x000000010b59a7fb __CFRunLoopRun + 1147
28 CoreFoundation 0x000000010b59a0f8 CFRunLoopRunSpecific + 488
29 GraphicsServices 0x000000010fb11ad2 GSEventRunModal + 161
30 UIKit 0x000000010c176f09 UIApplicationMain + 171
31 CameraMagicNew 0x000000010a7e04bf main + 111
32 libdyld.dylib 0x00000001100a992d start + 1
33 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)