Crash: [UIView _addGestureRecognizer:atEnd:]

After iOS 15 has been released my app started crashing. I personally cannot reproduce this crash, however, in Firebase I can see a lot of them.

In most cases it happens when you create a UITextView object or activate an existing one and you have an external keyboard connected to your iPad.

Does anyone know what could cause this crash?

Stack trace:

Last Exception Backtrace:
0   CoreFoundation                	0x1873dfd3c __exceptionPreprocess + 216 (NSException.m:200)
1   libobjc.A.dylib               	0x19e7436a8 objc_exception_throw + 56 (objc-exception.mm:565)
2   CoreFoundation                	0x1874d8940 _CFThrowFormattedException + 112 (CFObject.m:2072)
3   CoreFoundation                	0x1874d5f24 -[__NSArrayM insertObject:atIndex:].cold.1 + 48 (NSArrayM.m:164)
4   CoreFoundation                	0x18735aa68 -[__NSArrayM insertObject:atIndex:] + 996 (NSArrayM.m:164)
5   UIKitCore                     	0x18985afb0 -[UIView _addGestureRecognizer:atEnd:] + 200 (UIView.m:17042)
6   UIKitCore                     	0x18a3ad864 -[UIFlickingAssistantViewSupport _connectController:] + 280 (UIKeyboardMotionSupport.m:1354)
7   UIKitCore                     	0x189997b30 -[UIInputWindowControllerHostingItem configureFlickingAssistantViewController:] + 236 (UIInputWindowControllerHosting.m:2111)
8   UIKitCore                     	0x18997d430 -[UIInputWindowControllerHostingItem initializeTranslateGestureRecognizerIfNecessary] + 488 (UIInputWindowControllerHosting.m:2047)
9   CoreFoundation                	0x1873c06a0 -[NSArray makeObjectsPerformSelector:] + 244 (NSArray.m:507)
10  UIKitCore                     	0x18a35396c __92-[UIInputWindowController chainPlacementsIfNecessaryFrom:toPlacement:transition:completion:]_block_invoke_3 + 28 (UIInputWindowController.m:2508)
11  UIKitCore                     	0x18a3538b4 __92-[UIInputWindowController chainPlacementsIfNecessaryFrom:toPlacement:transition:completion:]_block_invoke.1049 + 212 (UIInputWindowController.m:2502)
12  UIKitCore                     	0x1899600e4 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 688 (UIView.m:14898)
13  UIKitCore                     	0x189833774 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 244 (UIView.m:0)
14  UIKitCore                     	0x189847064 -[UIViewAnimationState animationDidStop:finished:] + 240 (UIView.m:2280)
15  QuartzCore                    	0x18af24800 CA::Layer::run_animation_callbacks(void*) + 276 (CALayer.mm:7203)
16  libdispatch.dylib             	0x1870ac1a8 _dispatch_client_callout + 16 (object.m:560)
17  libdispatch.dylib             	0x1870585e0 _dispatch_main_queue_callback_4CF$VARIANT$mp + 940 (inline_internal.h:2601)
18  CoreFoundation                	0x18739b888 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1795)
19  CoreFoundation                	0x187359188 __CFRunLoopRun + 2528 (CFRunLoop.c:3144)
20  CoreFoundation                	0x18736be1c CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268)
21  GraphicsServices              	0x1a75d99a0 GSEventRunModal + 160 (GSEvent.c:2200)
22  UIKitCore                     	0x189b9f600 -[UIApplication _run] + 1080 (UIApplication.m:3493)
23  UIKitCore                     	0x189934b08 UIApplicationMain + 2028 (UIApplication.m:5046)
24  My App                   	0x1047df2c0 main + 120 (main.m:67)
25  dyld                          	0x107cac250 start + 444 (dyldMain.cpp:879)

Can you please post the full Apple crash log, with exception message etc.?

Happy to see you posting this, because we are getting similar reports from our users. And we also suspected something related to iOS 15.

Any news on this issue? We are still seeing a massive amount of crashes from users.

Crash: [UIView _addGestureRecognizer:atEnd:]
 
 
Q