Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handoff Links crash app from startup #928

Closed
ZachOrr opened this issue Mar 28, 2022 · 3 comments
Closed

Handoff Links crash app from startup #928

ZachOrr opened this issue Mar 28, 2022 · 3 comments
Labels
bug Issues relating to features that don't work as expected

Comments

@ZachOrr
Copy link
Member

ZachOrr commented Mar 28, 2022

When the app is closed (or possibly not yet initialized), opening a handoff link is causing a crash. It's likely because we're pulling data from the persistentContainer - but in the app handoff flow we do not run the AppSetupOperation before attempting to access the persistentContainer

Last Exception Backtrace:
0   CoreFoundation                	0x1828bdd78 __exceptionPreprocess + 220 (NSException.m:200)
1   libobjc.A.dylib               	0x19b522734 objc_exception_throw + 60 (objc-exception.mm:565)
2   CoreData                      	0x18a1be7b4 -[NSPersistentStoreCoordinator _introspectLastErrorAndThrow] + 136 (NSPersistentStoreCoordinator.m:0)
3   CoreData                      	0x18a1bed6c __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke.819 + 844 (NSPersistentStoreCoordinator.m:0)
4   CoreData                      	0x18a022850 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 264 (NSPersistentStoreCoordinator.m:606)
5   CoreData                      	0x18a053b44 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 1248 (NSPersistentStoreCoordinator.m:2737)
6   CoreData                      	0x18a053b70 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 1292 (NSPersistentStoreCoordinator.m:3397)
7   CoreData                      	0x18a025e54 -[NSManagedObjectContext save:] + 1512 (NSManagedObjectContext.m:1604)
8   TBAData                       	0x104d15790 NSManagedObjectContext.saveOrRollback(errorRecorder:) + 60 (NSManagedObjectContext+Extension.swift:30)
9   The Blue Alliance             	0x1041cf8f0 closure #1 in StatusService.status.getter + 200 (StatusService.swift:28)
10  The Blue Alliance             	0x1041cf300 StatusService.status.getter + 48 (StatusService.swift:21)
11  The Blue Alliance             	0x1041fd74c currentSeason.get + 8 (StatusService.swift:46)
12  The Blue Alliance             	0x1041fd74c specialized EventsContainerViewController.init(myTBA:pasteboard:photoLibrary:searchService:statusService:urlOpener:dependencies:) + 248 (EventsContainerViewController.swift:34)
13  The Blue Alliance             	0x1041610cc specialized RootController.eventsViewController.getter + 280
14  The Blue Alliance             	0x10416569c specialized PhoneRootViewController.init(fcmTokenProvider:myTBA:pasteboard:photoLibrary:pushService:searchService:statusService:urlOpener:dependencies:) + 424 (PhoneRootViewController.swift:34)
15  The Blue Alliance             	0x1041617ec AppDelegate.rootViewControllerPhone.getter + 248
16  The Blue Alliance             	0x1041642e0 closure #1 in AppDelegate.rootViewController.getter + 168 (AppDelegate.swift:28)
17  The Blue Alliance             	0x104161680 AppDelegate.rootViewController.getter + 56 (AppDelegate.swift:26)
18  The Blue Alliance             	0x1041649f8 closure #1 in AppDelegate.handoffService.getter + 76 (AppDelegate.swift:91)
19  The Blue Alliance             	0x104161b18 AppDelegate.myTBA.getter + 48
20  The Blue Alliance             	0x1041630f4 application + 8 (AppDelegate.swift:249)
21  The Blue Alliance             	0x1041630f4 @objc AppDelegate.application(_:continue:restorationHandler:) + 88 (<compiler-generated>:248)
22  GoogleUtilities               	0x1049cabec -[GULAppDelegateSwizzler application:continueUserActivity:restorationHandler:] + 320 (GULAppDelegateSwizzler.m:814)
23  UIKitCore                     	0x185beab38 -[UIApplication activityContinuationManager:continueUserActivity:] + 208 (UIApplication.m:3765)
24  UIKitCore                     	0x185e6471c -[UIActivityContinuationManager _continueUserActivity:] + 72 (UIActivityContinuationManager.m:102)
25  UIKitCore                     	0x185e654c0 __72-[UIActivityContinuationManager handleActivityContinuation:isSuspended:]_block_invoke_3 + 76 (UIActivityContinuationManager.m:261)
26  UIKitCore                     	0x18564a0f0 -[_UIApplicationModalProgressController _callAndClearDismissalHandlerWasDismissedByUser:] + 84 (_UIApplicationModalProgressController.m:157)
27  UIKitCore                     	0x18564a4ec -[_UIApplicationModalProgressController hideAfterMinimumUptimeWithDismissalHandler:] + 300 (_UIApplicationModalProgressController.m:248)
28  UIKitCore                     	0x185bea7b0 -[UIApplication activityContinuationManager:hideProgressUIWithCompletion:] + 212 (UIApplication.m:3727)
29  UIKitCore                     	0x185e646a8 -[UIActivityContinuationManager _endCurrentActivityContinuationWithCompletion:] + 92 (UIActivityContinuationManager.m:97)
30  UIKitCore                     	0x185e65210 __72-[UIActivityContinuationManager handleActivityContinuation:isSuspended:]_block_invoke_2 + 236 (UIActivityContinuationManager.m:259)
31  libdispatch.dylib             	0x182522e68 _dispatch_call_block_and_release + 32 (init.c:1517)
32  libdispatch.dylib             	0x182524a2c _dispatch_client_callout + 20 (object.m:560)
33  libdispatch.dylib             	0x182532f48 _dispatch_main_queue_drain + 928 (inline_internal.h:2622)
34  libdispatch.dylib             	0x182532b98 _dispatch_main_queue_callback_4CF + 44 (queue.c:7770)
35  CoreFoundation                	0x1828762f0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1795)
36  CoreFoundation                	0x1828301f4 __CFRunLoopRun + 2532 (CFRunLoop.c:3144)
37  CoreFoundation                	0x1828436b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
38  GraphicsServices              	0x19e8dd374 GSEventRunModal + 164 (GSEvent.c:2200)
39  UIKitCore                     	0x1851a8e88 -[UIApplication _run] + 1100 (UIApplication.m:3511)
40  UIKitCore                     	0x184f2a5ec UIApplicationMain + 364 (UIApplication.m:5064)
41  The Blue Alliance             	0x10414bd9c main + 196 (main.swift:9)
42  dyld                          	0x1047a1ce4 start + 520 (dyldMain.cpp:879)
@ZachOrr ZachOrr added the bug Issues relating to features that don't work as expected label Mar 28, 2022
@ZachOrr
Copy link
Member Author

ZachOrr commented Mar 28, 2022

Almost certainly related - if we need more logs

Last Exception Backtrace:
0   CoreFoundation                	0x199576dc0 __exceptionPreprocess + 220 (NSException.m:199)
1   libobjc.A.dylib               	0x1ae0d37a8 objc_exception_throw + 60 (objc-exception.mm:565)
2   CoreData                      	0x19f7cd704 -[NSPersistentStoreCoordinator _coordinator_you_never_successfully_opened_the_database_so_saving_back_to_it_is_kinda_hard:] + 56 (NSPersistentStoreCoordinator.m:2857)
3   CoreData                      	0x19f7cd8f4 -[NSPersistentStoreCoordinator _introspectLastErrorAndThrow] + 104 (NSPersistentStoreCoordinator.m:0)
4   CoreData                      	0x19f7cdf6c __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke.967 + 1256 (NSPersistentStoreCoordinator.m:0)
5   CoreData                      	0x19f65a324 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 260 (NSPersistentStoreCoordinator.m:598)
6   CoreData                      	0x19f65b1ec -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 1260 (NSPersistentStoreCoordinator.m:3068)
7   CoreData                      	0x19f65b218 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 1304 (NSPersistentStoreCoordinator.m:3672)
8   CoreData                      	0x19f65c258 -[NSManagedObjectContext save:] + 1244 (NSManagedObjectContext.m:1577)
9   TBAData                       	0x104e31790 NSManagedObjectContext.saveOrRollback(errorRecorder:) + 60 (NSManagedObjectContext+Extension.swift:30)
10  The Blue Alliance             	0x10452f8f0 closure #1 in StatusService.status.getter + 200 (StatusService.swift:28)
11  The Blue Alliance             	0x10452f300 StatusService.status.getter + 48 (StatusService.swift:21)
12  The Blue Alliance             	0x10455d74c currentSeason.get + 8 (StatusService.swift:46)
13  The Blue Alliance             	0x10455d74c specialized EventsContainerViewController.init(myTBA:pasteboard:photoLibrary:searchService:statusService:urlOpener:dependencies:) + 248 (EventsContainerViewController.swift:34)
14  The Blue Alliance             	0x1044c10cc specialized RootController.eventsViewController.getter + 280
15  The Blue Alliance             	0x1044c569c specialized PhoneRootViewController.init(fcmTokenProvider:myTBA:pasteboard:photoLibrary:pushService:searchService:statusService:urlOpener:dependencies:) + 424 (PhoneRootViewController.swift:34)
16  The Blue Alliance             	0x1044c17ec AppDelegate.rootViewControllerPhone.getter + 248
17  The Blue Alliance             	0x1044c42e0 closure #1 in AppDelegate.rootViewController.getter + 168 (AppDelegate.swift:28)
18  The Blue Alliance             	0x1044c1680 AppDelegate.rootViewController.getter + 56 (AppDelegate.swift:26)
19  The Blue Alliance             	0x1044c49f8 closure #1 in AppDelegate.handoffService.getter + 76 (AppDelegate.swift:91)
20  The Blue Alliance             	0x1044c1b18 AppDelegate.myTBA.getter + 48
21  The Blue Alliance             	0x1044c30f4 application + 8 (AppDelegate.swift:249)
22  The Blue Alliance             	0x1044c30f4 @objc AppDelegate.application(_:continue:restorationHandler:) + 88 (<compiler-generated>:248)
23  GoogleUtilities               	0x104c26bec -[GULAppDelegateSwizzler application:continueUserActivity:restorationHandler:] + 320 (GULAppDelegateSwizzler.m:814)
24  UIKitCore                     	0x19bf693ec -[UIApplication activityContinuationManager:continueUserActivity:] + 208 (UIApplication.m:3499)
25  UIKitCore                     	0x19c300228 -[UIActivityContinuationManager _continueUserActivity:] + 72 (UIActivityContinuationManager.m:99)
26  UIKitCore                     	0x19c300fc4 __72-[UIActivityContinuationManager handleActivityContinuation:isSuspended:]_block_invoke_3 + 76 (UIActivityContinuationManager.m:258)
27  UIKitCore                     	0x19b8753d4 -[_UIApplicationModalProgressController _callAndClearDismissalHandlerWasDismissedByUser:] + 84 (_UIApplicationModalProgressController.m:153)
28  UIKitCore                     	0x19b8757d0 -[_UIApplicationModalProgressController hideAfterMinimumUptimeWithDismissalHandler:] + 300 (_UIApplicationModalProgressController.m:244)
29  UIKitCore                     	0x19bf69064 -[UIApplication activityContinuationManager:hideProgressUIWithCompletion:] + 212 (UIApplication.m:3461)
30  UIKitCore                     	0x19c3001b4 -[UIActivityContinuationManager _endCurrentActivityContinuationWithCompletion:] + 92 (UIActivityContinuationManager.m:94)
31  UIKitCore                     	0x19c300d10 __72-[UIActivityContinuationManager handleActivityContinuation:isSuspended:]_block_invoke_2 + 236 (UIActivityContinuationManager.m:256)
32  libdispatch.dylib             	0x199161a84 _dispatch_call_block_and_release + 32 (init.c:1466)
33  libdispatch.dylib             	0x19916381c _dispatch_client_callout + 20 (object.m:559)
34  libdispatch.dylib             	0x199171c70 _dispatch_main_queue_callback_4CF + 884 (inline_internal.h:2557)
35  CoreFoundation                	0x1994f0a2c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1790)
36  CoreFoundation                	0x1994ea904 __CFRunLoopRun + 2524 (CFRunLoop.c:3118)
37  CoreFoundation                	0x1994e99f4 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242)
38  GraphicsServices              	0x1b0bbf734 GSEventRunModal + 164 (GSEvent.c:2259)
39  UIKitCore                     	0x19bf6875c -[UIApplication _run] + 1072 (UIApplication.m:3269)
40  UIKitCore                     	0x19bf6dfcc UIApplicationMain + 168 (UIApplication.m:4740)
41  The Blue Alliance             	0x1044abd9c main + 196 (main.swift:9)
42  libdyld.dylib                 	0x1991a5cf8 start + 4

@ZachOrr
Copy link
Member Author

ZachOrr commented Mar 28, 2022

0   CoreFoundation                	0x181049c9c __exceptionPreprocess + 216 (NSException.m:200)
1   libobjc.A.dylib               	0x1981fd758 objc_exception_throw + 56 (objc-exception.mm:565)
2   CoreData                      	0x1882245fc -[NSPersistentStoreCoordinator _introspectLastErrorAndThrow] + 124 (NSPersistentStoreCoordinator.m:0)
3   CoreData                      	0x188224b84 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke.657 + 836 (NSPersistentStoreCoordinator.m:0)
4   CoreData                      	0x188091d68 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 216 (NSPersistentStoreCoordinator.m:606)
5   CoreData                      	0x1880c27e4 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 1144 (NSPersistentStoreCoordinator.m:2737)
6   CoreData                      	0x1880c2810 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 1188 (NSPersistentStoreCoordinator.m:3383)
7   CoreData                      	0x1880951d4 -[NSManagedObjectContext save:] + 1436 (NSManagedObjectContext.m:1604)
8   TBAData                       	0x101101790 NSManagedObjectContext.saveOrRollback(errorRecorder:) + 60 (NSManagedObjectContext+Extension.swift:30)
9   The Blue Alliance             	0x10074b8f0 closure #1 in StatusService.status.getter + 200 (StatusService.swift:28)
10  The Blue Alliance             	0x10074b300 StatusService.status.getter + 48 (StatusService.swift:21)
11  The Blue Alliance             	0x10077974c currentSeason.get + 8 (StatusService.swift:46)
12  The Blue Alliance             	0x10077974c specialized EventsContainerViewController.init(myTBA:pasteboard:photoLibrary:searchService:statusService:urlOpener:dependencies:) + 248 (EventsContainerViewController.swift:34)
13  The Blue Alliance             	0x1006dd0cc specialized RootController.eventsViewController.getter + 280
14  The Blue Alliance             	0x1006e169c specialized PhoneRootViewController.init(fcmTokenProvider:myTBA:pasteboard:photoLibrary:pushService:searchService:statusService:urlOpener:dependencies:) + 424 (PhoneRootViewController.swift:34)
15  The Blue Alliance             	0x1006dd7ec AppDelegate.rootViewControllerPhone.getter + 248
16  The Blue Alliance             	0x1006e02e0 closure #1 in AppDelegate.rootViewController.getter + 168 (AppDelegate.swift:28)
17  The Blue Alliance             	0x1006dd680 AppDelegate.rootViewController.getter + 56 (AppDelegate.swift:26)
18  The Blue Alliance             	0x1006e09f8 closure #1 in AppDelegate.handoffService.getter + 76 (AppDelegate.swift:91)
19  The Blue Alliance             	0x1006ddb18 AppDelegate.myTBA.getter + 48
20  The Blue Alliance             	0x1006df0f4 application + 8 (AppDelegate.swift:249)
21  The Blue Alliance             	0x1006df0f4 @objc AppDelegate.application(_:continue:restorationHandler:) + 88 (<compiler-generated>:248)
22  GoogleUtilities               	0x100ef6bec -[GULAppDelegateSwizzler application:continueUserActivity:restorationHandler:] + 320 (GULAppDelegateSwizzler.m:814)
23  UIKitCore                     	0x1841abe7c -[UIApplication activityContinuationManager:continueUserActivity:] + 180 (UIApplication.m:3747)
24  UIKitCore                     	0x1843fc220 -[UIActivityContinuationManager _continueUserActivity:] + 68 (UIActivityContinuationManager.m:102)
25  UIKitCore                     	0x1843fcf0c __72-[UIActivityContinuationManager handleActivityContinuation:isSuspended:]_block_invoke_3 + 72 (UIActivityContinuationManager.m:261)
26  UIKitCore                     	0x183c6af28 -[_UIApplicationModalProgressController _callAndClearDismissalHandlerWasDismissedByUser:] + 76 (_UIApplicationModalProgressController.m:157)
27  UIKitCore                     	0x183c6b2bc -[_UIApplicationModalProgressController hideAfterMinimumUptimeWithDismissalHandler:] + 296 (_UIApplicationModalProgressController.m:248)
28  UIKitCore                     	0x1841abb34 -[UIApplication activityContinuationManager:hideProgressUIWithCompletion:] + 184 (UIApplication.m:3709)
29  UIKitCore                     	0x1843fc1c0 -[UIActivityContinuationManager _endCurrentActivityContinuationWithCompletion:] + 88 (UIActivityContinuationManager.m:97)
30  UIKitCore                     	0x1843fcc74 __72-[UIActivityContinuationManager handleActivityContinuation:isSuspended:]_block_invoke_2 + 208 (UIActivityContinuationManager.m:259)
31  libdispatch.dylib             	0x180d15194 _dispatch_call_block_and_release + 24 (init.c:1517)
32  libdispatch.dylib             	0x180d16198 _dispatch_client_callout + 16 (object.m:560)
33  libdispatch.dylib             	0x180cf74a8 _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 908 (inline_internal.h:2601)
34  CoreFoundation                	0x1810057e8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12 (CFRunLoop.c:1795)
35  CoreFoundation                	0x180fc30e8 __CFRunLoopRun + 2528 (CFRunLoop.c:3144)
36  CoreFoundation                	0x180fd5d7c CFRunLoopRunSpecific + 572 (CFRunLoop.c:3268)
37  GraphicsServices              	0x19b24a9a0 GSEventRunModal + 160 (GSEvent.c:2200)
38  UIKitCore                     	0x18380805c -[UIApplication _run] + 1080 (UIApplication.m:3493)
39  UIKitCore                     	0x18359dce0 UIApplicationMain + 2028 (UIApplication.m:5046)
40  The Blue Alliance             	0x1006c7d9c main + 196 (main.swift:9)
41  dyld                          	0x100b0c190 start + 444 (dyldMain.cpp:876)

@ZachOrr
Copy link
Member Author

ZachOrr commented Mar 28, 2022

Oh - dupe of #875. Going to link so we have all of the stack traces together.

@ZachOrr ZachOrr closed this as completed Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues relating to features that don't work as expected
Projects
None yet
Development

No branches or pull requests

1 participant