Get many crashes on iOS16 beta4 due to "Cannot form weak reference to instance of class _UIRemoteInputViewController. It is possible that this object was over-released, or is in the process of deallocation."

Incident Identifier: 1E726F51-A52F-49F8-BA7C-9283420CAA2B Hardware Model:   iPhone13,2 Version:       6.22.0 (202208011902) AppStoreTools:    13F100 AppVariant:     1:iPhone13,2:15 Code Type:      ARM-64 (Native) Role:        Foreground Parent Process:   launchd [1]

Date/Time:      2022-08-09 00:13:18.6024 +0800 Launch Time:     2022-08-09 00:12:22.6847 +0800 OS Version:     iPhone OS 16.0 (20A5328h) Release Type:    Beta Baseband Version:  3.06.01 Report Version:   104

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Triggered by Thread: 0

Kernel Triage: VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get VM - Compressor failed a blocking pager_get VM - Fault hit memory shortage

Thread 0 name: Thread 0 Crashed: 0  libsystem_kernel.dylib     0x0000000215908ba4 __abort_with_payload + 8 1  libsystem_kernel.dylib     0x000000021592abf4 abort_with_payload_wrapper_internal + 104 (terminate_with_reason.c:102) 2  libsystem_kernel.dylib     0x000000021592ab8c abort_with_reason + 32 (terminate_with_reason.c:116) 3  libobjc.A.dylib         0x00000001c898f85c _objc_fatalv(unsigned long long, unsigned long long, char const*, char*) + 116 (objc-errors.mm:199) 4  libobjc.A.dylib         0x00000001c898f7e8 _objc_fatal(char const*, ...) + 32 (objc-errors.mm:215) 5  libobjc.A.dylib         0x00000001c8962b50 weak_register_no_lock + 392 (objc-weak.mm:421) 6  libobjc.A.dylib         0x00000001c8967808 objc_storeWeak + 448 (NSObject.mm:365) 7  UIKitCore            0x00000001d2b1c168 _UIResponderForwarderWantsForwardingFromResponder + 736 (UITouch.m:185) 8  UIKitCore            0x00000001d2a312d0 __forwardTouchMethod_block_invoke + 44 (UIResponder.m:2141) 9  CoreFoundation         0x00000001cf51a34c NSSET_IS_CALLING_OUT_TO_A_BLOCK + 24 (NSSetHelpers.m:10) 10 CoreFoundation         0x00000001cf59ae94 -[__NSSetM enumerateObjectsWithOptions:usingBlock:] + 200 (NSSetM_Common.h:157) 11 UIKitCore            0x00000001d2bff474 forwardTouchMethod + 236 (UIResponder.m:2140) 12 UIKitCore            0x00000001d2af9028 -[UIWindow _sendTouchesForEvent:] + 356 (UIWindow.m:3159) 13 UIKitCore            0x00000001d2af85e8 -[UIWindow sendEvent:] + 3284 (UIWindow.m:3480) 14 UIKitCore            0x00000001d2af78a8 -[UIApplication sendEvent:] + 672 (UIApplication.m:12473) 15 UIKitCore            0x00000001d2af6f64 __dispatchPreprocessedEventFromEventQueue + 7084 (UIEventDispatcher.m:2375) 16 UIKitCore            0x00000001d2b3f270 __processEventQueue + 5632 (UIEventDispatcher.m:2684) 17 UIKitCore            0x00000001d3777880 updateCycleEntry + 168 (UIEventDispatcher.m:116) 18 UIKitCore            0x00000001d304dbb8 _UIUpdateSequenceRun + 84 (_UIUpdateSequence.mm:112) 19 UIKitCore            0x00000001d3683570 schedulerStepScheduledMainSection + 172 (_UIUpdateScheduler.m:987) 20 UIKitCore            0x00000001d368273c runloopSourceCallback + 92 (_UIUpdateScheduler.m:1079) 21 CoreFoundation         0x00000001cf5e5bd4 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28 (CFRunLoop.c:1974) 22 CoreFoundation         0x00000001cf5f1f70 __CFRunLoopDoSource0 + 176 (CFRunLoop.c:2018) 23 CoreFoundation         0x00000001cf575e8c __CFRunLoopDoSources0 + 340 (CFRunLoop.c:2063) 24 CoreFoundation         0x00000001cf58b7d8 __CFRunLoopRun + 836 (CFRunLoop.c:2970) 25 CoreFoundation         0x00000001cf590b04 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3390) 26 GraphicsServices        0x0000000213703360 GSEventRunModal + 164 (GSEvent.c:2196) 27 UIKitCore            0x00000001d2d9f484 -[UIApplication _run] + 888 (UIApplication.m:3728) 28 UIKitCore            0x00000001d2d9f0e8 UIApplicationMain + 340 (UIApplication.m:5318) 29 pinduoduo            0x0000000104b0afcc 0x104b04000 + 28620 30 dyld              0x00000002571c68f8 start + 2360 (dyldMain.cpp:1161)

Thread 0 crashed with ARM Thread State (64-bit): x0: 0x0000000000000008 x1: 0x0000000000000001 x2: 0x0000000000000000 x3: 0x0000000000000000 x4: 0x000000013b56d100 x5: 0x0000000000000080 x6: 0x000000000000000a x7: 0x0000000000000001 x8: 0x0000000000000020 x9: 0x0000000000000103 x10: 0x00000000cfc0304f x11: 0x0000000000003a80 x12: 0x00000000000007fd x13: 0x00000000fce01035 x14: 0x00000000fd001800 x15: 0x0000000000001800 x16: 0x0000000000000209 x17: 0x000000022a2697e8 x18: 0x0000000000000000 x19: 0x0000000000000080 x20: 0x000000013b56d100 x21: 0x0000000000000000 x22: 0x0000000000000000 x23: 0x0000000000000001 x24: 0x0000000000000008 x25: 0x00000002250b0e80 x26: 0x0000000000000005 x27: 0x0000000000000000 x28: 0x0000000000000000 fp: 0x000000016b2f9000 lr: 0x000000021592abf4 sp: 0x000000016b2f8fc0 pc: 0x0000000215908ba4 cpsr: 0x40001000 esr: 0x56000080 Address size fault

i have the same problem, many users of my app has crashed , please help us

Have you solved this problem?

i have the same problem, many users of my app has crashed , please help us

The crash occurs at the startup time, last visible vc has Keyboard. After discussion with colleagues, I try to fix by delay show keyboard .

I find _UIRemoteInputViewController can't be release. When I enter and leave page quickly for many times that contains TextField auto become firstResponder,it often case a crash. My iOS is 16.1 and I use third part keyboard

I also had the same problem, and found that when using a third-party keyboard for memos, I dropped the keyboard first, and double-clicked the memo interface also crashed

I also have the problem , the crash occurs on All iOS16~iOS16.1,but i just use the system UIKeyBoard。

The crashed stach info is:

the crash register info is:

same issue

same issue

same issue

I also encountered the same issue, is there a solution?

same issue

Solution: https://github.com/SnowGirls/Objc-Deallocating

Using a UITouch Category to Override this method and check the Deallocating object. - (BOOL)_wantsForwardingFromResponder: toNextResponder: withEvent:

How to use? Just drag the ObjcUtil.h/m and UITouch+FixCrashOnInputKeyboard.h/m into your Xcode project, and done.

still exists crash on iOS16.4,but the crash stack is slightly different from the IOS 16.3 and previous systems

current deallocating: 0, next deallocationg: 1, current: <_UISizeTrackingView: 0x17eda2760; frame = (0 0; 390 292); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x284594a80>>, next: <_UIRemoteInputViewController: 0x11b2e0a00>, self: <UITouch: 0x2a40c4f10> phase: Began tap count: 1 force: 0.000 window: <UIRemoteKeyboardWindow: 0x156356400; frame = (0 0; 390 844); opaque = NO; autoresize = W+H; layer = <UIWindowLayer: 0x28517ee80>> responder: <_UISizeTrackingView: 0x17eda2760; frame = (0 0; 390 292); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x284594a80>> location in window: {65.666656494140625, 67.333328247070312} previous location in window: {65.666656494140625, 67.333328247070312} location in view: {65.666656494140625, 67.333328247070312} previous location in view: {65.666656494140625, 67.333328247070312}, event: <UITouchesEvent: 0x283a0a970> timestamp: 40148.7 touches: {( <UITouch: 0x2a40c4f10> phase: Began tap count: 1 force: 0.000 window: <UIRemoteKeyboardWindow: 0x156356400; frame = (0 0; 390 844); opaque = NO; autoresize = W+H; layer = <UIWindowLayer: 0x28517ee80>> responder: <_UISizeTrackingView: 0x17eda2760; frame = (0 0; 390 292); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x284594a80>> location in window: {65.666656494140625, 67.333328247070312} previous location in window: {65.666656494140625, 67.333328247070312} location in view: {65.666656494140625, 67.333328247070312} previous location in view: {65.666656494140625, 67.333328247070312} )}, cmd: "_wantsForwardingFromResponder:toNextResponder:withEvent:" current deallocating: %i, next deallocationg: %i, current: %@, next: %@, self: %@, event: %@, cmd: "%s"

Thread 1 Queue : com.apple.main-thread (serial) #0 0x00000001eb9ad3a4 in __abort_with_payload () #1 0x00000001eb9cfc14 in abort_with_payload_wrapper_internal () #2 0x00000001eb9cfc48 in abort_with_payload () #3 0x00000001b41fac14 in _os_crash_msg () #4 0x00000001aee4384c in _UIResponderForwarderWantsForwardingFromResponder () #5 0x00000001aed5bcb8 in __forwardTouchMethod_block_invoke () #6 0x00000001accbb328 in NSSET_IS_CALLING_OUT_TO_A_BLOCK () #7 0x00000001acd3a8f8 in -[__NSSetM enumerateObjectsWithOptions:usingBlock:] () #8 0x00000001aef247b4 in forwardTouchMethod () #9 0x00000001aee20934 in -[UIWindow _sendTouchesForEvent:] () #10 0x00000001aee1ff2c in -[UIWindow sendEvent:] () #11 0x00000001aee1f1e0 in -[UIApplication sendEvent:] () #12 0x00000001aee1d4cc in __dispatchPreprocessedEventFromEventQueue () #13 0x00000001aee6612c in __processEventQueue () #14 0x00000001afad79a4 in updateCycleEntry () #15 0x00000001af374dfc in _UIUpdateSequenceRun () #16 0x00000001af9d8944 in schedulerStepScheduledMainSection () #17 0x00000001af9d7ea0 in runloopSourceCallback () #18 0x00000001acd84208 in CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION () #19 0x00000001acd90864 in __CFRunLoopDoSource0 () #20 0x00000001acd156c8 in __CFRunLoopDoSources0 () #21 0x00000001acd2b1c4 in __CFRunLoopRun () #22 0x00000001acd304dc in CFRunLoopRunSpecific () #23 0x00000001e7f8b35c in GSEventRunModal () #24 0x00000001af0c4378 in -[UIApplication _run] () #25 0x00000001af0c3fdc in UIApplicationMain () #26 0x000000010a97ec74 in main at /Users/wangqiuli/Documents/JDApp/JDAppModule/Example/JDAppModule/main.m:15 #27 0x00000001cc1b1dec in start ()

@interface CustomApplication : UIApplication

@end

@implementation CustomApplication

  • (void)sendEvent:(UIEvent *)event { if (event.type == UIEventTypeTouches) { for (UITouch *touch in event.allTouches) { NSString *windowName = NSStringFromClass([touch.window class]); if ([windowName isEqualToString:@"UIRemoteKeyboardWindow"]) { return; } } } [super sendEvent:event];

} @end

Get many crashes on iOS16 beta4 due to "Cannot form weak reference to instance of class _UIRemoteInputViewController. It is possible that this object was over-released, or is in the process of deallocation."
 
 
Q