NSInvalidArgumentException Crash During Keyboard Language Switch on iOS 26

Hello,

I have been receiving crash reports on iOS 26 related to a view containing a UITextField. Although I have not been able to reproduce the issue locally and the exact reproduction steps are unknown, the call stack suggests the crash may be related to language or input method changes.

If anyone has encountered a similar crash on iOS 26 or has any insights regarding language/input-related issues impacting UITextField behavior, your help would be greatly appreciated. The call stack from the reports is attached below.

Exception

NSInvalidArgumentException -[__NSPlaceholderArray initWithObjects:count:] attempt to insert nil object from objects[1]

Fatal Exception: NSInvalidArgumentException

0  CoreFoundation                 0xc98c8 __exceptionPreprocess
1  libobjc.A.dylib                0x317c4 objc_exception_throw
2  CoreFoundation                 0xe1d7c -[__NSPlaceholderArray initWithObjects:count:]
3  CoreFoundation                 0x1485d0 +[NSArray arrayWithObjects:count:]
4  UIKitCore                     0xfc4d44 -[UIInlineInputSwitcher updateInputModes:withHUD:]
5  UIKitCore                     0xfc4fe0 -[UIIndicatorInputSwitcher switchMode:withHUD:withDelay:]
6  UIKitCore                     0xfc31d4 -[UIInputSwitcher showsLanguageIndicator:]
7  UIKitCore                     0xa16dc8 __140-[_UIKeyboardStateManager _setupDelegate:delegateSame:hardwareKeyboardStateChanged:endingInputSessionIdentifier:force:delayEndInputSession:]_block_invoke_4
8  libdispatch.dylib             0x1abc _dispatch_call_block_and_release
9  libdispatch.dylib             0x1b7cc _dispatch_client_callout
10 libdispatch.dylib             0x38af0 _dispatch_main_queue_drain.cold.5
11 libdispatch.dylib             0x10ea8 _dispatch_main_queue_drain
12 libdispatch.dylib             0x10de4 _dispatch_main_queue_callback_4CF
13 CoreFoundation                0x6b520 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
14 CoreFoundation                0x1dd14 __CFRunLoopRun
15 CoreFoundation                0x1cc44 _CFRunLoopRunSpecificWithOptions
16 GraphicsServices             0x1498 GSEventRunModal
17 UIKitCore                    0xaa6d8 -[UIApplication _run]
18 UIKitCore                    0x4ec24 UIApplicationMain

Thank you!

We have similar crash reports in our app on iOS 26. For us the crash seems to occur while the app is running the background.

Last Exception Backtrace:
0   CoreFoundation                	0x19a05e8c8 __exceptionPreprocess + 164 (NSException.m:249)
1   libobjc.A.dylib               	0x196fd57c4 objc_exception_throw + 88 (objc-exception.mm:356)
2   CoreFoundation                	0x19a070e88 -[__NSArrayM objectAtIndex:] + 592 (NSArrayM.m:142)
3   UIKitCore                     	0x1a0369758 -[_UIFlowLayoutInfo setSizes:forItemsAtIndexPaths:] + 316 (UIFlowLayoutSupport.m:2030)
4   UIKitCore                     	0x1a0355768 -[UICollectionViewFlowLayout _didPerformUpdateVisibleCellsPassWithLayoutOffset:] + 156 (UICollectionViewFlowLayout.m:2112)
5   UIKitCore                     	0x1a03136f0 -[UICollectionView _updateVisibleCellsNow:] + 3452 (UICollectionView.m:5683)
6   UIKitCore                     	0x19fa64604 -[UICollectionView layoutSubviews] + 280 (UICollectionView.m:6895)
7   UIKitCore                     	0x19f8aa078 UIView._layoutSubviewsWithObservationTracking() + 828 (_UIObservationTracking.swift:383)
8   UIKitCore                     	0x19f8aab38 @objc UIView._layoutSubviewsWithObservationTracking() + 36 (<compiler-generated>:0)
9   UIKitCore                     	0x1a1190f68 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2532 (UIView.m:20962)
10  QuartzCore                    	0x19aa009a8 CA::Layer::perform_update_(CA::Layer*, CALayer*, unsigned int, CA::Transaction*) + 352 (CALayer.mm:11185)
11  QuartzCore                    	0x19a9e32fc CA::Layer::update_if_needed(CA::Transaction*, unsigned int, unsigned int) + 600 (CALayer.mm:11262)
12  UIKitCore                     	0x19f8887b4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 316 (UIView.m:15195)
13  UIKitCore                     	0x1a05c23e4 -[_UIAlertControllerPhoneTVMacView _updateTextAlignmentAfterLayout] + 124 (_UIAlertControllerPhoneTVMacView.m:3049)
14  UIKitCore                     	0x1a0095808 -[UIAlertController viewDidLayoutSubviews] + 156 (UIAlertController.m:928)
15  UIKitCore                     	0x19f8d4550 UIViewController._viewDidLayoutSubviewsWithObservationTracking() + 828 (_UIObservationTracking.swift:436)
16  UIKitCore                     	0x19f8d4938 @objc UIViewController._viewDidLayoutSubviewsWithObservationTracking() + 36 (<compiler-generated>:0)
17  UIKitCore                     	0x1a119120c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 3208 (UIView.m:20993)
18  QuartzCore                    	0x19aa009a8 CA::Layer::perform_update_(CA::Layer*, CALayer*, unsigned int, CA::Transaction*) + 352 (CALayer.mm:11185)
19  QuartzCore                    	0x19a9e32fc CA::Layer::update_if_needed(CA::Transaction*, unsigned int, unsigned int) + 600 (CALayer.mm:11262)
20  UIKitCore                     	0x19f8887b4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 316 (UIView.m:15195)
21  UIKitCore                     	0x1a06f6d2c __76-[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:]_block_invoke_3 + 60 (_UIKeyboardLayoutAlignmentView.m:181)
22  UIKitCore                     	0x1a1188b9c +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 516 (UIView.m:17651)
23  UIKitCore                     	0x1a11891f0 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 48 (UIView.m:17734)
24  UIKitCore                     	0x1a06f6cd0 __76-[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:]_block_invoke_2 + 160 (_UIKeyboardLayoutAlignmentView.m:179)
25  UIKitCore                     	0x1a06f6bd0 -[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:] + 772 (_UIKeyboardLayoutAlignmentView.m:190)
26  CoreFoundation                	0x199fe6a04 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 (CFNotificationCenter.c:702)
27  CoreFoundation                	0x199fe6ab4 ___CFXRegistrationPost_block_invoke + 92 (CFNotificationCenter.c:195)
28  CoreFoundation                	0x199fe6910 _CFXRegistrationPost + 436 (CFNotificationCenter.c:223)
29  CoreFoundation                	0x199fe70b0 _CFXNotificationPost + 736 (CFNotificationCenter.c:1249)
30  Foundation                    	0x197fb8c30 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92 (NSNotification.m:598)
31  TextInputUI                   	0x1a6c71610 -[TUIKeyboardTrackingCoordinator postNotificationWithName:userInfo:] + 236 (TUIKeyboardTrackingCoordinator.m:1123)
32  TextInputUI                   	0x1a6c7115c -[TUIKeyboardTrackingCoordinator _postNotificationsWithAnimationInfo:type:start:] + 292 (TUIKeyboardTrackingCoordinator.m:0)
33  TextInputUI                   	0x1a6c71730 -[TUIKeyboardTrackingCoordinator postNotificationType:forStart:] + 140 (TUIKeyboardTrackingCoordinator.m:1113)
34  UIKitCore                     	0x1a0d3c134 __78-[UITrackingElementWindowController postValidatedStartNotifications:withInfo:]_block_invoke + 856 (UITrackingElementWindowController.m:1874)
35  UIKitCore                     	0x1a0d3bdb8 -[UITrackingElementWindowController postValidatedStartNotifications:withInfo:] + 228 (UITrackingElementWindowController.m:1905)
36  UIKitCore                     	0x1a0d3bcb0 -[UITrackingElementWindowController postStartNotifications:withInfo:] + 72 (UITrackingElementWindowController.m:1858)
37  UIKitCore                     	0x1a0d41528 __87-[UITrackingElementWindowController moveFromPlacement:toPlacement:starting:completion:]_block_invoke_4 + 1516 (UITrackingElementWindowController.m:2969)
38  UIKitCore                     	0x1a070646c -[UIInputViewAnimationStyle launchAnimation:afterStarted:completion:forHost:fromCurrentPosition:] + 396 (UIInputViewAnimationStyle.m:149)
39  UIKitCore                     	0x1a0d40b10 -[UITrackingElementWindowController moveFromPlacement:toPlacement:starting:completion:] + 3096 (UITrackingElementWindowController.m:3090)
40  UIKitCore                     	0x1a0d47e2c -[UITrackingElementWindowController setInputViewSet:] + 2412 (UITrackingElementWindowController.m:4203)
41  UIKitCore                     	0x1a0d3e390 -[UITrackingElementWindowController performOperations:withAnimationStyle:] + 68 (UITrackingElementWindowController.m:2440)
42  UIKitCore                     	0x1a0604b0c -[UIKeyboardSceneDelegate setKeyWindowSceneInputViews:animationStyle:] + 2780 (UIKeyboardSceneDelegate.m:2938)
43  UIKitCore                     	0x1a0603ff4 -[UIKeyboardSceneDelegate setInputViews:animationStyle:] + 188 (UIKeyboardSceneDelegate.m:2806)
44  UIKitCore                     	0x1a06050ac -[UIKeyboardSceneDelegate setInputViews:animated:] + 76 (UIKeyboardSceneDelegate.m:2994)
45  UIKitCore                     	0x1a0605110 -[UIKeyboardSceneDelegate setInputViews:] + 56 (UIKeyboardSceneDelegate.m:2999)
....

If possible, can we get any input from @DTS Engineer as to whether this is a known issue?

Thanks!

NSInvalidArgumentException Crash During Keyboard Language Switch on iOS 26
 
 
Q