Skip to content

fix(core): Fix Android navigation crash #9996

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

Merged

Conversation

dgmachado
Copy link
Contributor

@dgmachado dgmachado commented Aug 17, 2022

PR Checklist

What is the current behavior?

Android navigation crash when receiving unexpected value on the Entry struct. The entry.resolvedPage is coming null in a Test App and I suppose the root case is that there's memory leak happening on the navigation.

What is the new behavior?

Fix the Android navigation crash just ignoring the expected value received. It's a defensive programming and that fixes the this crash issue.

@cla-bot cla-bot bot added the cla: yes label Aug 17, 2022
@CatchABus
Copy link
Contributor

CatchABus commented Aug 17, 2022

@dgmachado Perhaps, this fix needs more thought. Also, return statement may leave unexpected leftovers.
For instance, entry may still reside in waiting queue, would this be alright? See

@dgmachado
Copy link
Contributor Author

@dgmachado Perhaps, this fix needs more thought. Also, return statement may leave unexpected leftovers. For instance, entry may still reside in waiting queue, would this be alright? See

@dgmachado dgmachado closed this Aug 17, 2022
@dgmachado dgmachado reopened this Aug 17, 2022
@dgmachado
Copy link
Contributor Author

@dgmachado Perhaps, this fix needs more thought. Also, return statement may leave unexpected leftovers. For instance, entry may still reside in waiting queue, would this be alright? See

@CatchABus good catch. Now I'm updating the arrays completedEntries and waitingQueue properly.

Copy link
Contributor

@edusperoni edusperoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me. I feel like this issue requires some more thought (how did resolvedPage ever become null? And we care about the frame, not necessarily the page), but this solution is good enough for now.

@NathanWalker NathanWalker merged commit ca3d9bd into NativeScript:main Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants