VideoFeed Crash When Opened From Multiple Tabs With Slow Network - #2961
Merged
Conversation
scottkicks
marked this pull request as ready for review
August 12, 2026 15:04
scottkicks
requested review from
a team and
stevestreza-ksr
and removed request for
a team
August 12, 2026 15:04
stevestreza-ksr
approved these changes
Aug 13, 2026
stevestreza-ksr
left a comment
Contributor
There was a problem hiding this comment.
Makes sense to me. Maybe add an assertion failure there for debugging purposes if this happens, because if something makes this fail in development, it will fail silently.
| guard let self, let feedVC else { return } | ||
|
|
||
| /// Prevent double-tap and cross tab race condition from presenting the same VC more than once. | ||
| guard feedVC.presentingViewController == nil, !feedVC.isBeingPresented else { |
Contributor
There was a problem hiding this comment.
You're calling cell?.setLoading(false) twice in the happy path, you could just move that above the guard.
scottkicks
force-pushed
the
scott/video-feed-crash-fix
branch
from
August 18, 2026 13:58
bc783e6 to
35ef92c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📲 What
Guard against a crash in
VideoFeedBannerPresentingwhenVideoFeedViewControlleris presented twice in quick succession.Crash Logs: Affecting a very minor amount of users, but might as well get ahead of it.
🤔 Why
On slow connections, a user could tap "Try it Now" on the Discovery tab, switch to Search while it's still loading, and tap "Try it Now" there too.
Both
onReadyToPresentcallbacks eventually fire and both attempt to present aVideoFeedViewControllerthroughRootTabBarViewController, which can throw anNSInvalidArgumentExceptionand crashes.🛠 How
In
onReadyToPresent, added a guard that checksfeedVC.presentingViewController == niland!feedVC.isBeingPresentedbefore callingpresent.Also tightened the existing reuse path guard to use
presentingViewControllerinstead of onlyisBeingPresented, sinceisBeingPresentedreturnsfalseonce the presentation animation completes.👀 See
No crash now 🪄
✅ Acceptance criteria