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

Fix setStackRoot crash when called with the same id #5154

Merged
merged 1 commit into from
May 26, 2019

Conversation

guyca
Copy link
Collaborator

@guyca guyca commented May 26, 2019

When a Stack’s root was set with an id of one of the Stack’s current children, there was a crash
since the wrong elements were removed from the stack.

This commit fixes this by creating a new (underlying) stack when setStackRoot is called, and destroying all ViewControllers from the previous Stack.

Fixes #5117

When a Stack’s root was set with an id of one of the Stack’s current children, there was a crash
since the wrong elements were removed from the stack.

This commit fixes this by creating a new stack when setStackRoot is called, and destroying all ViewControllers from the previous Stack.

Fixes #5117
@guyca guyca merged commit 3c08b1c into master May 26, 2019
@guyca guyca deleted the fixSetStackRootCrash branch May 26, 2019 13:11
vshkl pushed a commit to vshkl/react-native-navigation that referenced this pull request Feb 5, 2020
When a Stack’s root was set with an id of one of the Stack’s current children, there was a crash
since the wrong elements were removed from the stack.

This commit fixes this by creating a new stack when setStackRoot is called, and destroying all ViewControllers from the previous Stack.

Fixes wix#5117
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[V2] Android Exception java.util.NoSuchElementException StackController.java:228
1 participant