Our app uses a custom input view, added as a subview to an instance of UIInputView
. We're receiving crash reports after adding this view to our UITextView
's inputView
property and then calling [textView reloadInputViews]
, but I can't reproduce the crash.
Are we going about this the wrong way, or is something else going on here?
Here's an excerpt of our crash log:
#0. Crashed: com.apple.main-thread
0 libsystem_kernel.dylib 0x190c9fd74 __abort_with_payload + 8
1 libsystem_kernel.dylib 0x190c9c4d0 abort_with_payload_wrapper_internal + 100
2 libsystem_kernel.dylib 0x190c9c46c abort_with_payload_wrapper_internal + 34
3 libobjc.A.dylib 0x190707ea4 _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 112
4 libobjc.A.dylib 0x190707dfc __objc_error + 42
5 libobjc.A.dylib 0x19071bedc weak_entry_insert(weak_table_t*, weak_entry_t*) + 318
6 libobjc.A.dylib 0x190724768 objc_initWeak + 320
7 UIKit 0x197e54bf0 -[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] + 2100
8 UIKit 0x197dd51f8 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1096
9 UIKit 0x197dd506c -[UIView(Internal) _didMoveFromWindow:toWindow:] + 700
10 UIKit 0x197dd4538 __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 156
11 Foundation 0x1926e1abc -[NSISEngine withBehaviors:performModifications:] + 168
12 UIKit 0x197dd43b0 -[UIView(Hierarchy) _postMovedFromSuperview:] + 816
13 UIKit 0x1980cded0 __UIViewWasRemovedFromSuperview + 172
14 UIKit 0x197dd3434 -[UIView(Hierarchy) removeFromSuperview] + 512
15 UIKit 0x1987c303c __46-[UIInputWindowController invalidateInputView]_block_invoke + 128
16 UIKit 0x19817b598 -[UIResponder _preserveResponderOverridesWhilePerforming:] + 140
17 UIKit 0x1987c2fac -[UIInputWindowController invalidateInputView] + 104
18 UIKit 0x1987c3960 -[UIInputWindowController changeToInputViewSet:] + 252
19 UIKit 0x1987c4fc8 __43-[UIInputWindowController setInputViewSet:]_block_invoke_2.1355 + 36
20 UIKit 0x1987bdbac -[UIInputWindowController moveFromPlacement:toPlacement:starting:completion:] + 436
21 UIKit 0x1987c4f98 __43-[UIInputWindowController setInputViewSet:]_block_invoke.1354 + 100
22 UIKit 0x1987b9c98 -[UIInputWindowController performOperations:withTemplateNotificationInfo:] + 56
23 UIKit 0x1987c4aec -[UIInputWindowController setInputViewSet:] + 1604
24 UIKit 0x1987bd61c -[UIInputWindowController performOperations:withAnimationStyle:] + 56
25 UIKit 0x197e9d9a0 -[UIPeripheralHost(UIKitInternal) setInputViews:animationStyle:] + 1376
26 UIKit 0x197dfe988 -[UIResponder(UIResponderInputViewAdditions) reloadInputViews] + 80
27 (App calls [textView reloadInputViews])