You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
UICollectionView crashes in -performBatchUpdates: when header view is nil
Steps to Reproduce:
Run the attached project in the simulator
Or
Set a header size in UICollectionView, but don't provide a supplementary view
Invoke -performBatchUpdates with an empty block
Expected Results:
Leaves space for a header view without actually drawing it. This is identical to what would happen if you don't call -performBatchUpdates.
Actual Results: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* setObjectForKey: object cannot be nil (key: <_UICollectionViewItemKey: 0x109440b0> Type = SV Kind = UICollectionElementKindSectionHeader IndexPath = <NSIndexPath 0x10944080> 2 indexes [0, 0])'
Description
Summary:
UICollectionView crashes in -performBatchUpdates: when header view is nil
Steps to Reproduce:
Or
Expected Results:
Leaves space for a header view without actually drawing it. This is identical to what would happen if you don't call -performBatchUpdates.
Actual Results:
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* setObjectForKey: object cannot be nil (key: <_UICollectionViewItemKey: 0x109440b0> Type = SV Kind = UICollectionElementKindSectionHeader IndexPath = <NSIndexPath 0x10944080> 2 indexes [0, 0])'
if let
andguard let
to assign toself
in failable value type initializers #1: tid = 0x1f03, 0x010d0e52 libobjc.A.dylibobjc_exception_throw, stop reason = breakpoint 1.3 frame #0: 0x010d0e52 libobjc.A.dylib
objc_exception_throwframe 22108400: Swift 2.0b4: Allow
if let
andguard let
to assign toself
in failable value type initializers #1: 0x01d160de CoreFoundation-[__NSDictionaryM setObject:forKey:] + 158 frame #2: 0x00515aa0 UIKit
-[UICollectionView _setVisibleSupplementaryView:forKind:indexPath:] + 93frame 22108354: Swift 2.0b4: Curried initializer syntax #3: 0x005258f9 UIKit
-[UICollectionView _viewAnimationsForCurrentUpdate] + 6745 frame #4: 0x005266f8 UIKit
-[UICollectionView _updateWithItems:] + 1615frame 22108118: Apple Music: No Love Icon On CarPlay #5: 0x00523bdb UIKit
-[UICollectionView _endItemAnimations] + 13286 frame #6: 0x005275f5 UIKit
-[UICollectionView _endUpdates] + 48frame 22107493: Xocde 7, can't run playground. Unable to create target for stub executable. unable to find executable for #7: 0x005276b9 UIKit
-[UICollectionView performBatchUpdates:completion:] + 191 frame #8: 0x00003627 UICollectionViewBug
-[ViewController setItems:](self=0x075504c0, _cmd=0x005bce1d, items=0x07551190) + 231 at ViewController.m:59frame 22107374: Xcode should mark debugging messages originating from the main thread #9: 0x0000322f UICollectionViewBug
-[ViewController viewDidLoad](self=0x075504c0, _cmd=0x005c7a77) + 463 at ViewController.m:34 frame #10: 0x000f61c7 UIKit
-[UIViewController loadViewIfRequired] + 536frame 22106545: automaticallyAdjustsScrollViewInsets doesn't change insets on iOS 9 #11: 0x000f6232 UIKit
-[UIViewController view] + 33 frame #12: 0x000453d5 UIKit
-[UIWindow addRootViewControllerViewIfPossible] + 66frame 22105831: Application windows move erratically with two monitors #13: 0x0004576f UIKit
-[UIWindow _setHidden:forced:] + 368 frame #14: 0x00045905 UIKit
-[UIWindow _orderFrontWithoutMakingKey] + 49frame 22104678: Xcode7-beta4 (7A165t): libtool does not support -ios_version_min link editor flag #15: 0x0004e917 UIKit
-[UIWindow makeKeyAndVisible] + 65 frame #16: 0x00002c55 UICollectionViewBug
-[AppDelegate application:didFinishLaunchingWithOptions:](self=0x0754ada0, _cmd=0x005abc21, application=0x07649cf0, launchOptions=0x00000000) + 661 at AppDelegate.m:21frame 22103812: TestFlight does not support yet apps with watchOS 2 #17: 0x00012157 UIKit
-[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 266 frame #18: 0x00012747 UIKit
-[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1248frame 22102418: El Capitan Terminal password autofill suggestion #19: 0x0001394b UIKit
-[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 805 frame #20: 0x00024cb5 UIKit
-[UIApplication handleEvent:withNewEvent:] + 1022frame 22100305: Safari does not see my valid Safari Developer cert #21: 0x00025beb UIKit
-[UIApplication sendEvent:] + 85 frame #22: 0x00017698 UIKit
_UIApplicationHandleEvent + 9874frame 22098225: Add indexOfObject:inSortedRange:options:usingComparator: method in Swift Array #23: 0x01beedf9 GraphicsServices
_PurpleEventCallback + 339 frame #24: 0x01beead0 GraphicsServices
PurpleEventCallback + 46frame 22095844: There's no reminder if you forget to unlock your watch #25: 0x01c08bf5 CoreFoundation
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53 frame #26: 0x01c08962 CoreFoundation
__CFRunLoopDoSource1 + 146frame 22094327: Mac OS X 10.10.4: Managing Gatekeeper's automated re-enable via a management profile #27: 0x01c39bb6 CoreFoundation
__CFRunLoopRun + 2118 frame #28: 0x01c38f44 CoreFoundation
CFRunLoopRunSpecific + 276frame 22092373: Code Coverage is not accurately reported for code in Embedded Framework #29: 0x01c38e1b CoreFoundation
CFRunLoopRunInMode + 123 frame #30: 0x0001317a UIKit
-[UIApplication _run] + 774frame 22091468: Photos has issues playing certain videos that have been imported #31: 0x00014ffc UIKit
UIApplicationMain + 1211 frame #32: 0x0000298d UICollectionViewBug
main(argc=1, argv=0xbffff364) + 141 at main.m:16frame 22090264: The first proposal of Spotlights search-results should not change the first proposal as long as the following keystrokes still match the first proposal #33: 0x000028b5 UICollectionViewBug`start + 53
Regression:
The results occur on iOS 6.1.
Notes:
In ViewController.m, set WANT_CRASH to 0 to skip the call to -performBatchUpdates:, which prevents the crash.
Product Version: 6.1
Created: 2013-03-01T19:34:44.648782
Originated: 2013-03-01T00:00:00
Open Radar Link: http://www.openradar.me/13326239
The text was updated successfully, but these errors were encountered: