Intermittent crashes when calling performSegue(withIdentifier:,sender:)

Our app crashes intermittently when calling performSegue(withIdentifier:,sender:). The segue does exist, as most of the time it works fine. The destination view controller only has its view as a connection. Crash report excerpt below. Uploading the crash report isn't working for some reason, so I'll try to do so as a reply.

The stack trace shows searchForClientURL... as the last part of our code that gets executed.

I'm curious if I should look at things in our code that happen while the segue is being performed such as prepare(for:, sender:), the init of the destination controller, etc. or not because they're not showing up in the stack trace.

Thanks for any help!

0   CoreFoundation                	0x19e310e38 __exceptionPreprocess + 164 (NSException.m:202)
1   libobjc.A.dylib               	0x19749f8d8 objc_exception_throw + 60 (objc-exception.mm:356)
2   UIKitCore                     	0x1a1306630 __66-[UIStoryboardPushSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 880 (UIStoryboardPushSegueTemplate.m:58)
3   UIKitCore                     	0x1a08f3c84 -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 172 (UIStoryboardSegueTemplate.m:134)
4   UIKitCore                     	0x1a08f3ba4 -[UIStoryboardSegueTemplate _perform:] + 68 (UIStoryboardSegueTemplate.m:121)
5   UIKitCore                     	0x1a0cc74c0 -[UIViewController performSegueWithIdentifier:sender:] + 300 (UIViewController.m:5017)
6   AWApp                    	0x10061ce38 closure #1 in ClientSelectorViewController.searchForClientURL(nameOrGUID:shouldTestSession:) + 3616 (ClientSelectorViewController.swift:231)

I attempted to "Add File" and "Add Text" multiple times and got a try again error each time, so here's more of the crash report.

Incident Identifier: F7F3733E-2F49-4313-B03B-AAD45B03D874
Hardware Model:      iPhone13,4
Process:             AWApp [11459]
Path:                /private/var/containers/Bundle/Application/13B3EE96-177C-4FD8-847D-5933DE7B7A91/AWApp.app/AWApp
Identifier:          awIdentifier
Version:             1.87 (52)
AppStoreTools:       14E221
AppVariant:          1:iPhone13,4:15
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           awIdentifier [1882]

Date/Time:           2023-05-18 16:34:16.5109 -0400
Launch Time:         2023-05-18 15:46:58.2275 -0400
OS Version:          iPhone OS 16.3.1 (20D67)
Release Type:        User
Baseband Version:    3.40.01
Report Version:      104Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                	0x19e310e38 __exceptionPreprocess + 164 (NSException.m:202)
1   libobjc.A.dylib               	0x19749f8d8 objc_exception_throw + 60 (objc-exception.mm:356)
2   UIKitCore                     	0x1a1306630 __66-[UIStoryboardPushSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 880 (UIStoryboardPushSegueTemplate.m:58)
3   UIKitCore                     	0x1a08f3c84 -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 172 (UIStoryboardSegueTemplate.m:134)
4   UIKitCore                     	0x1a08f3ba4 -[UIStoryboardSegueTemplate _perform:] + 68 (UIStoryboardSegueTemplate.m:121)
5   UIKitCore                     	0x1a0cc74c0 -[UIViewController performSegueWithIdentifier:sender:] + 300 (UIViewController.m:5017)
6   AWApp                    	0x10061ce38 closure #1 in ClientSelectorViewController.searchForClientURL(nameOrGUID:shouldTestSession:) + 3616 (ClientSelectorViewController.swift:231)
7   AWApp                    	0x10061d1cc thunk for @escaping @callee_guaranteed (@guaranteed NSURLSessionDataTask, @in_guaranteed Any?) -> () + 120 (<compiler-generated>:0)
8   AWSDK                        	0x100a82e44 -[MHCPOSTOperation successfulTaskWithResult:] + 156 (MHCPOSTOperation.m:109)
9   AWSDK                        	0x100a74d10 __75-[AFMHCURLSessionManagerTaskDelegate URLSession:task:didCompleteWithError:]_block_invoke_2.32 + 120 (AFMHCURLSessionManager.m:246)
10  libdispatch.dylib             	0x1a5927460 _dispatch_call_block_and_release + 32 (init.c:1518)
11  libdispatch.dylib             	0x1a5928f88 _dispatch_client_callout + 20 (object.m:560)
12  libdispatch.dylib             	0x1a5937850 _dispatch_main_queue_drain + 1020 (inline_internal.h:2618)
13  libdispatch.dylib             	0x1a5937444 _dispatch_main_queue_callback_4CF + 44 (queue.c:7917)
14  CoreFoundation                	0x19e3a16c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1780)
15  CoreFoundation                	0x19e38302c __CFRunLoopRun + 2036 (CFRunLoop.c:3147)
16  CoreFoundation                	0x19e387eb0 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3418)
17  GraphicsServices              	0x1d857d368 GSEventRunModal + 164 (GSEvent.c:2196)
18  UIKitCore                     	0x1a087d668 -[UIApplication _run] + 888 (UIApplication.m:3758)
19  UIKitCore                     	0x1a087d2cc UIApplicationMain + 340 (UIApplication.m:5348)
20  AWApp                    	0x1005394d8 main + 80 (main.m:16)
21  dyld                          	0x1bcc80960 start + 2528 (dyldMain.cpp:1170)

Kernel Triage:
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage


Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001dbe2b674 __pthread_kill + 8 (:-1)
1   libsystem_pthread.dylib       	0x00000001ec58f1ac pthread_kill + 268 (pthread.c:1670)
2   libsystem_c.dylib             	0x00000001a598cc8c abort + 180 (abort.c:118)
3   libc++abi.dylib               	0x00000001ec4ceb8c abort_message + 132 (abort_message.cpp:78)
4   libc++abi.dylib               	0x00000001ec4bea80 demangling_terminate_handler() + 336 (cxa_default_handlers.cpp:71)
5   libobjc.A.dylib               	0x00000001974a5d3c _objc_terminate() + 144 (objc-exception.mm:498)
6   libc++abi.dylib               	0x00000001ec4cdf28 std::__terminate(void (*)()) + 20 (cxa_handlers.cpp:59)
7   libc++abi.dylib               	0x00000001ec4cdec4 std::terminate() + 56 (cxa_handlers.cpp:88)
8   libdispatch.dylib             	0x00000001a5928f9c _dispatch_client_callout + 40 (object.m:563)
9   libdispatch.dylib             	0x00000001a5937850 _dispatch_main_queue_drain + 1020 (inline_internal.h:2618)
10  libdispatch.dylib             	0x00000001a5937444 _dispatch_main_queue_callback_4CF + 44 (queue.c:7917)
11  CoreFoundation                	0x000000019e3a16c8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1780)
12  CoreFoundation                	0x000000019e38302c __CFRunLoopRun + 2036 (CFRunLoop.c:3147)
13  CoreFoundation                	0x000000019e387eb0 CFRunLoopRunSpecific + 612 (CFRunLoop.c:3418)
14  GraphicsServices              	0x00000001d857d368 GSEventRunModal + 164 (GSEvent.c:2196)
15  UIKitCore                     	0x00000001a087d668 -[UIApplication _run] + 888 (UIApplication.m:3758)
16  UIKitCore                     	0x00000001a087d2cc UIApplicationMain + 340 (UIApplication.m:5348)
17  AWApp                    	0x00000001005394d8 main + 80 (main.m:16)
18  dyld                          	0x00000001bcc80960 start + 2528 (dyldMain.cpp:1170)

Hi, We are also seeing similar crash, dont know the reason why this is happening. Have you found a solution to it ? Or can any one provide a solution to this. We are seeing these in release version. like once or twice in a month.

0   CoreFoundation                	0x18d604f20 __exceptionPreprocess + 164 (NSException.m:249)
1   libobjc.A.dylib               	0x18548f2b8 objc_exception_throw + 60 (objc-exception.mm:356)
2   UIKitCore                     	0x190814604 __66-[UIStoryboardPushSegueTemplate newDefaultPerformHandlerForSegue:]_block_invoke + 880 (UIStoryboardPushSegueTemplate.m:58)
3   UIKitCore                     	0x190818dbc -[UIStoryboardSegueTemplate _performWithDestinationViewController:sender:] + 172 (UIStoryboardSegueTemplate.m:134)
4   UIKitCore                     	0x190818cdc -[UIStoryboardSegueTemplate _perform:] + 68 (UIStoryboardSegueTemplate.m:121)
5   UIKitCore                     	0x1900e658c -[UIViewController performSegueWithIdentifier:sender:] + 300 (UIViewController.m:5598)
6   OurAppName           	          0x102154a78 ViewController.tableView(_:didSelectRowAt:) + 568 (ViewController.swift:0)
7   OurAppName                    	0x102154c38 @objc ViewController.tableView(_:didSelectRowAt:) + 136 (<compiler-generated>:0)
8   UIKitCore                     	0x18fab7904 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:isCellMultiSelect:deselectPrevious:performCustomSelectionAction:] + 1232 (UITableView.m:9323)
9   UIKitCore                     	0x190876af4 -[UITableView _userSelectRowAtPendingSelectionIndexPath:animatedSelection:] + 268 (UITableView.m:9377)
10  UIKitCore                     	0x190876bf4 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 216 (UITableView.m:9396)
11  UIKitCore                     	0x18f8bd5d8 -[_UIAfterCACommitBlock run] + 72 (_UIAfterCACommitQueue.m:137)
12  UIKitCore                     	0x18f8bd49c -[_UIAfterCACommitQueue flush] + 164 (_UIAfterCACommitQueue.m:228)
13  UIKitCore                     	0x18f8bd3b4 _runAfterCACommitDeferredBlocks + 496 (UIApplication.m:3144)
14  UIKitCore                     	0x18f8bcfec _cleanUpAfterCAFlushAndRunDeferredBlocks + 80 (UIApplication.m:3108)
15  UIKitCore                     	0x18f8bcefc _UIApplicationFlushCATransaction + 72 (UIApplication.m:3185)
16  UIKitCore                     	0x18f8ba660 _UIUpdateSequenceRun + 84 (_UIUpdateSequence.mm:119)
17  UIKitCore                     	0x18f8ba2a4 schedulerStepScheduledMainSection + 172 (_UIUpdateScheduler.m:1058)
18  UIKitCore                     	0x18f8bb148 runloopSourceCallback + 92 (_UIUpdateScheduler.m:1221)
19  CoreFoundation                	0x18d5d7834 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1957)
20  CoreFoundation                	0x18d5d77c8 __CFRunLoopDoSource0 + 176 (CFRunLoop.c:2001)
21  CoreFoundation                	0x18d5d5298 __CFRunLoopDoSources0 + 244 (CFRunLoop.c:2038)
22  CoreFoundation                	0x18d5d4484 __CFRunLoopRun + 828 (CFRunLoop.c:2955)
23  CoreFoundation                	0x18d5d3cd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
24  GraphicsServices              	0x1d20211a8 GSEventRunModal + 164 (GSEvent.c:2196)
25  UIKitCore                     	0x18fc0dae8 -[UIApplication _run] + 888 (UIApplication.m:3713)
26  UIKitCore                     	0x18fcc1d98 UIApplicationMain + 340 (UIApplication.m:5303)
27  OurAppName.                   	0x10212b228 main + 64 (AppDelegate.swift:21)
28  dyld                          	0x1b0dab154 start + 2356 (dyldMain.cpp:1298)
Intermittent crashes when calling performSegue(withIdentifier:,sender:)
 
 
Q