I'm getting lots of crashes with the following backtrace and I can't find the cause for it.
According to Apple -[NSObject(NSObject) doesNotRecognizeSelector:] occurs when a new object is allocated in the memory previously occupied by the deallocated object.
Note: Messaging a previously deallocated object may raise an NSInvalidArgumentException instead of crashing the program with a memory access violation. This occurs when a new object is allocated in the memory previously occupied by the deallocated object. If your application is crashing due to an uncaught NSInvalidArgumentException (look for -[NSObject(NSObject) doesNotRecognizeSelector:] in the exception backtrace), consider profiling your application with the Zombies instrument to eliminate the possibility that improper memory management is the cause.
https://developer.apple.com/library/archive/technotes/tn2151/_index.html
But what's up with the rest of the backtrace, especially -[UIUndoGestureInteraction didMoveToView:] thing?
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x1ae45498c __exceptionPreprocess + 220 (NSException.m:199)
1 libobjc.A.dylib 0x1ae17d0a4 objc_exception_throw + 56 (objc-exception.mm:565)
2 CoreFoundation 0x1ae35843c -[NSObject(NSObject) doesNotRecognizeSelector:] + 140 (NSObject.m:144)
3 UIKitCore 0x1b24902a8 -[UIResponder doesNotRecognizeSelector:] + 296 (UIResponder.m:659)
4 CoreFoundation 0x1ae458e08 ___forwarding___ + 1324 (NSForwarding.m:3325)
5 CoreFoundation 0x1ae45abec _CF_forwarding_prep_0 + 92
6 UIKitCore 0x1b2353040 -[UIUndoGestureInteraction didMoveToView:] + 108 (UIUndoGestureInteraction.m:725)
7 UIKitCore 0x1b28eb3c4 _setInteractionView + 84 (UIView.m:16421)
8 UIKitCore 0x1b28eb2a0 -[UIView(Dragging) addInteraction:] + 268 (UIView.m:16450)
9 UIKitCore 0x1b26cd2b8 -[UIEditingOverlayViewController _addInteractions] + 260 (UIEditingOverlayViewController.m:79)
10 UIKitCore 0x1b1e5b2ec -[UIViewController _setViewAppearState:isAnimating:] + 832 (UIViewController.m:4695)
11 UIKitCore 0x1b1e5b6fc __52-[UIViewController _setViewAppearState:isAnimating:]_block_invoke + 268 (UIViewController.m:4758)
12 CoreFoundation 0x1ae42773c __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16 (NSArrayHelpers.m:9)
13 CoreFoundation 0x1ae32b86c -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] + 152 (NSArrayI.m:108)
14 UIKitCore 0x1b1e5b49c -[UIViewController _setViewAppearState:isAnimating:] + 1264 (UIViewController.m:4736)
15 UIKitCore 0x1b1e5d530 __64-[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]_block_invoke + 44 (UIViewController.m:5272)
16 UIKitCore 0x1b1e5c32c -[UIViewController _executeAfterAppearanceBlock] + 88 (UIViewController.m:5050)
17 UIKitCore 0x1b246bca4 _runAfterCACommitDeferredBlocks + 584 (UIApplication.m:3027)
18 UIKitCore 0x1b245b7c0 _cleanUpAfterCAFlushAndRunDeferredBlocks + 232 (UIApplication.m:2986)
19 UIKitCore 0x1b248b594 _afterCACommitHandler + 76 (UIApplication.m:3048)
20 CoreFoundation 0x1ae3d1c48 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 (CFRunLoop.c:1758)
21 CoreFoundation 0x1ae3ccb34 __CFRunLoopDoObservers + 416 (CFRunLoop.c:1868)
22 CoreFoundation 0x1ae3cd100 __CFRunLoopRun + 1308 (CFRunLoop.c:2910)
23 CoreFoundation 0x1ae3cc8bc CFRunLoopRunSpecific + 464 (CFRunLoop.c:3192)
24 GraphicsServices 0x1b8238328 GSEventRunModal + 104 (GSEvent.c:2246)
25 UIKitCore 0x1b24626d4 UIApplicationMain + 1936 (UIApplication.m:4753)
26 JustConnect 0x10425ca60 main + 68 (APIInfoUser.swift:7)
27 libdyld.dylib 0x1ae257460 start + 4