Crash in -[_UIAnimationCoordinator cancelInteractiveAnimation] with hidesBarsOnSwipe

Originator:cpickslay
Number:rdar://21910679 Date Originated:7/20/15
Status:Open Resolved:
Product:iOS Product Version:8+
Classification:Crash Reproducible:No
 
Summary:
With the hidesBarsOnSwipe property set to true on a UINavigationController, we see about 1500-2000 of these crashes per day: http://crashes.to/s/7726b6a2fab

Unfortunately I have not found a way to reproduce the crash, but as you can see in the stack trace, it's all SDK code:

Thread : Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x00000001824242d8 __exceptionPreprocess
1  libobjc.A.dylib                0x00000001940980e4 objc_exception_throw
2  CoreFoundation                 0x0000000182424198 +[NSException raise:format:]
3  Foundation                     0x00000001832d8ed4 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4  UIKit                          0x0000000187589a00 -[_UIAnimationCoordinator cancelInteractiveAnimation]
5  UIKit                          0x00000001871d7a18 -[UINavigationController _gestureRecognizedInteractiveHide:]
6  UIKit                          0x0000000187033070 _UIGestureRecognizerSendActions
7  UIKit                          0x0000000186ecc5c4 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:]
8  UIKit                          0x000000018733d38c ___UIGestureRecognizerUpdate_block_invoke662
9  UIKit                          0x0000000186e90418 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks
10 UIKit                          0x0000000186e8e7c4 _UIGestureRecognizerUpdate
11 UIKit                          0x0000000186eca82c -[UIWindow _sendGesturesForEvent:]
12 UIKit                          0x0000000186ec9ee4 -[UIWindow sendEvent:]
13 UIKit                          0x0000000186e9d120 -[UIApplication sendEvent:]
14 UIKit                          0x00000001870d8530 __42-[UIApplication _cancelTouches:withEvent:]_block_invoke
15 UIKit                          0x0000000186f242a0 -[UIApplication _cancelTouches:withEvent:includingGestures:notificationBlock:]
16 UIKit                          0x0000000186f23f90 -[UIApplication _cancelTouches:withEvent:]
17 UIKit                          0x000000018713de94 _UIApplicationHandleEventFromQueueEvent
18 UIKit                          0x0000000186e9b634 _UIApplicationHandleEventQueue
19 CoreFoundation                 0x00000001823dc240 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
20 CoreFoundation                 0x00000001823db59c __CFRunLoopDoSources0
21 CoreFoundation                 0x00000001823d9594 __CFRunLoopRun
22 CoreFoundation                 0x00000001823052d4 CFRunLoopRunSpecific
23 GraphicsServices               0x000000018bd636fc GSEventRunModal
24 UIKit                          0x0000000186f02f40 UIApplicationMain
25 Team Stream                    0x0000000100047480 main (main.m:13)
26 libdyld.dylib                  0x0000000194742a08 start

Steps to Reproduce:
Create a UINavigationController with a UIScrollView and enable hidesBarsOnSwipe (sample project attached).

Not sure if this is related, but in viewWillAppear: for the controller at the bottom of the navigation stack, we set hidesBarsOnScroll to true. In viewWillAppear: for other controllers pushed on top of it, we set it to false. So we only hide bars when scrolling the root view controler.

Expected Results:
Given that it's all UIKit code, I would expect the invalid state to be a no-op, perhaps logged to the console.

Actual Results:
UIKit raises an exception and crashes the process

Version:
iOS 8+

Notes:
This crash also occurs in iOS 9. 



Configuration:
Occurs on iPhone, iPod Touch and iPad

Attachments:
'HideBarsOnSwipeCrash.zip' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!