I鈥檝e hit this a few times. Flex doesn鈥檛 show the inbox request finishing. There鈥檚 nothing to cancel and reload either so I have to force quit the app.
Anyone else?

Bug Report Dump (Auto-generated)
Version 1.23.0 (1538537771) Device: iPhone X (iOS 12.0) TestFlight: true
Just happened to me
Sent with GitHawk
I'm seeing this too
Everyone on TestFlight right? Not prod?
Sent with GitHawk
I鈥檓 on TF
Sent with GitHawk
Me too, on TestFlight.
Haven't seen this, weird. Anything going on with GitHub maybe?
My guess is its this commit that just doesn't load when refreshing from app background. I'll admit this was a hack in the first place.
The issue I'm trying to avoid is double-fetching the inbox, which has been happening for a while for badging:
To the user, this doesn't do anything wrong. But we're wasting network requests as well as API rate limits.
I tried originally to just avoid .view being accessed in the controller (prevent viewDidLoad being called), but the UISplitViewController internals access the view no matter what. I don't want to inject some state when launching from a background event either in case the user actually opens the app before the process is killed.
This is a toughy. 馃
So the offending line of code is this:
primaryNav.viewControllers += secondaryNav.viewControllers.filter {
$0.hidesBottomBarWhenPushed = true
return ($0 is SplitPlaceholderViewController) == false
}
Here's the stack trace when viewDidLoad is called:
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
frame #0: 0x0000000103bb25c9 Freetime`NotificationModelController.fetchNotifications(repo=nil, all=false, page=1, width=375, completion=0x0000000103ba69a0 Freetime`partial apply forwarder for closure #2 (Freetime.Result<(Swift.Array<Freetime.NotificationViewModel>, Swift.Optional<Swift.Int>)>) -> () in Freetime.NotificationsViewController.fetch(page: Swift.Optional<Swift.Int>) -> () at <compiler-generated>, self=0x0000600000c43580) at NotificationModelController.swift:55
frame #1: 0x0000000103ba14b5 Freetime`NotificationsViewController.fetch(page=nil, self=0x00007f984b422380) at NotificationsViewController.swift:91
frame #2: 0x0000000103ba6ef3 Freetime`vtable thunk for BaseListViewController2.fetch(page:) dispatching to NotificationsViewController.fetch(page:) at NotificationsViewController.swift:0
frame #3: 0x0000000103dcb421 Freetime`BaseListViewController2.loadFromNetwork(feed=0x0000600003a16990, self=0x00007f984b422380) at BaseListViewController2.swift:105
frame #4: 0x0000000103dcbc39 Freetime`protocol witness for FeedDelegate.loadFromNetwork(feed:) in conformance BaseListViewController2<A> at <compiler-generated>:0
frame #5: 0x0000000103ba924b Freetime`Feed.refresh(self=0x0000600003a16990) at Feed.swift:120
frame #6: 0x0000000103ba7d0c Freetime`Feed.viewDidLoad(self=0x0000600003a16990) at Feed.swift:75
frame #7: 0x0000000103dcae72 Freetime`BaseListViewController2.viewDidLoad(self=0x00007f984b422380) at BaseListViewController2.swift:45
frame #8: 0x0000000103dcaf24 Freetime`@objc BaseListViewController2.viewDidLoad() at <compiler-generated>:0
frame #9: 0x0000000103ba0448 Freetime`NotificationsViewController.viewDidLoad(self=0x00007f984b422380) at NotificationsViewController.swift:54
frame #10: 0x0000000103ba0c94 Freetime`@objc NotificationsViewController.viewDidLoad() at <compiler-generated>:0
frame #11: 0x0000000110c80781 UIKitCore`-[UIViewController loadViewIfRequired] + 1186
frame #12: 0x0000000110c80be0 UIKitCore`-[UIViewController view] + 27
frame #13: 0x0000000110821b17 UIKitCore`__54-[UINavigationController setViewControllers:animated:]_block_invoke + 333
frame #14: 0x00000001108219a2 UIKitCore`-[UINavigationController setViewControllers:animated:] + 760
* frame #15: 0x0000000103dcc7cb Freetime`SplitViewControllerDelegate.splitViewController(splitViewController=0x00007f9848e05c90, secondaryViewController=0x00007f984d059200, primaryViewController=0x00007f984a023800, self=0x0000600001b202c0) at SplitViewControllerDelegate.swift:35
frame #16: 0x0000000103dcc9f9 Freetime`@objc SplitViewControllerDelegate.splitViewController(_:collapseSecondary:onto:) at <compiler-generated>:0
frame #17: 0x00000001109e92f5 UIKitCore`-[UISplitViewControllerClassicImpl _collapseSecondaryViewController:ontoPrimaryViewController:] + 392
frame #18: 0x00000001109ebe6e UIKitCore`__60-[UISplitViewControllerClassicImpl _prepareForCompactLayout]_block_invoke + 137
frame #19: 0x0000000110c8767d UIKitCore`+[UIViewController _withDisabledAppearanceTransitions:forDescendantsOf:visibleOnly:perform:] + 435
frame #20: 0x0000000110c874b7 UIKitCore`+[UIViewController _withDisabledAppearanceTransitionsForVisibleDescendantsOf:perform:] + 61
frame #21: 0x00000001109ebb89 UIKitCore`-[UISplitViewControllerClassicImpl _prepareForCompactLayout] + 350
frame #22: 0x00000001109f22b8 UIKitCore`-[UISplitViewControllerClassicImpl _layoutContainerViewDidMoveToWindow:] + 112
frame #23: 0x00000001107ca750 UIKitCore`-[UILayoutContainerView didMoveToWindow] + 102
frame #24: 0x0000000110c61e05 UIKitCore`-[UIView(Internal) _didMoveFromWindow:toWindow:] + 1820
frame #25: 0x0000000110c54091 UIKitCore`__45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 151
frame #26: 0x0000000110c53f70 UIKitCore`-[UIView(Hierarchy) _postMovedFromSuperview:] + 804
frame #27: 0x0000000110c649a5 UIKitCore`-[UIView(Internal) _addSubview:positioned:relativeTo:] + 1951
frame #28: 0x0000000110d6228c UIKitCore`-[UIWindow addRootViewControllerViewIfPossible] + 1059
frame #29: 0x0000000110d625fe UIKitCore`-[UIWindow _setHidden:forced:] + 294
frame #30: 0x0000000110d7582d UIKitCore`-[UIWindow makeKeyAndVisible] + 42
frame #31: 0x000000011054b12c UIKitCore`-[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4595
frame #32: 0x0000000110550527 UIKitCore`-[UIApplication _runWithMainScene:transitionContext:completion:] + 1623
frame #33: 0x0000000110df2e3e UIKitCore`__111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
frame #34: 0x0000000110def403 UIKitCore`+[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
frame #35: 0x0000000110df2a7b UIKitCore`-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 233
frame #36: 0x0000000110df3435 UIKitCore`-[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1085
frame #37: 0x0000000110db0b31 UIKitCore`__82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 795
frame #38: 0x0000000110db07db UIKitCore`-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 435
frame #39: 0x0000000110df592c UIKitCore`__125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 584
frame #40: 0x0000000110df6256 UIKitCore`_performActionsWithDelayForTransitionContext + 100
frame #41: 0x0000000110df568b UIKitCore`-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 221
frame #42: 0x0000000110deeaa1 UIKitCore`-[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
frame #43: 0x000000011054ed46 UIKitCore`-[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
frame #44: 0x0000000110580856 UIKitCore`-[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 357
frame #45: 0x000000011382ddda FrontBoardServices`-[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
frame #46: 0x0000000113838f43 FrontBoardServices`__56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 271
frame #47: 0x000000011383863a FrontBoardServices`__40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
frame #48: 0x000000010962163e libdispatch.dylib`_dispatch_client_callout + 8
frame #49: 0x0000000109624bb4 libdispatch.dylib`_dispatch_block_invoke_direct + 301
frame #50: 0x000000011386d3c8 FrontBoardServices`__FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
frame #51: 0x000000011386d080 FrontBoardServices`-[FBSSerialQueue _performNext] + 457
frame #52: 0x000000011386d660 FrontBoardServices`-[FBSSerialQueue _performNextFromRunLoopSource] + 45
frame #53: 0x0000000106d7cb31 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
frame #54: 0x0000000106d7c3a3 CoreFoundation`__CFRunLoopDoSources0 + 243
frame #55: 0x0000000106d76a4f CoreFoundation`__CFRunLoopRun + 1263
frame #56: 0x0000000106d76221 CoreFoundation`CFRunLoopRunSpecific + 625
frame #57: 0x000000010e24d1dd GraphicsServices`GSEventRunModal + 62
frame #58: 0x0000000110552115 UIKitCore`UIApplicationMain + 140
frame #59: 0x00000001038abb04 Freetime`main at AppDelegate.swift:17
frame #60: 0x0000000109697551 libdyld.dylib`start + 1
Notice -[UINavigationController setViewControllers:animated:] 馃槺
So simply _setting view controllers_ on the navigation controller results in a .view access and loads the view...
Oh wow, that's good to know. Ugh.
Most helpful comment
So the offending line of code is this:
Here's the stack trace when
viewDidLoadis called:Notice
-[UINavigationController setViewControllers:animated:]馃槺So simply _setting view controllers_ on the navigation controller results in a
.viewaccess and loads the view...