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

draft: fix infinite loop in REASharedTransitionManager #6534

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

preynal
Copy link

@preynal preynal commented Sep 23, 2024

Summary

This fixes an infinite loop in REASharedTransitionManager, in getSharedElementForCurrentTransition, when siblingViewTag is nil and _findPrecedingViewTagForTransition returns nil, it will get stuck in an infinite loop and freeze the app.

Test plan

You can test this by setting sharedTransitionTags

@arekkubaczkowski
Copy link

arekkubaczkowski commented Sep 26, 2024

I've applied your changes as a patch and it seems like it fixes the crashing indeed but the shared element transition doesn't work when you try to repeat it within the same shareTag

@preynal
Copy link
Author

preynal commented Sep 26, 2024

I've applied you changes as a patch and it seems like it fixes the crashing indeed but the shared element transition doesn't work when you try to repeat it within the same shareTag

thanks, I've seen that too but I didn't know if it was related to my use case, or the crash, I will look into it

@preynal preynal changed the title fix infinite loop in REASharedTransitionManager draft: fix infinite loop in REASharedTransitionManager Sep 26, 2024
@arekkubaczkowski
Copy link

@preynal sorry for bothering, do you plan to take a look on it in the nearest future?

@preynal
Copy link
Author

preynal commented Oct 4, 2024

I've applied you changes as a patch and it seems like it fixes the crashing indeed but the shared element transition doesn't work when you try to repeat it within the same shareTag

I wasn't able to get it to work correctly, I might get back to it in the future when I have more time

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.

2 participants