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

RemoveAsync hangs indefinitely #762

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Rg.Plugins.Popup/Services/PopupNavigationImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,13 @@ public Task RemovePageAsync(PopupPage page, bool animate = true)
if (animate)
await page.DisappearingAnimation();

await RemoveAsync(page);
//await causes a deadlock when the function you are awaiting is not async
//and this was caused by the android page being swiped away from recents
//with the popup page open, and you attempt to remove the page.
//This causes the remove task to never finish, and the _popupStack never removes its
//reference to the page thus leaking the memory
//await RemoveAsync(page);
Task? removeTask = RemoveAsync(page);

if (animate)
page.DisposingAnimation();
Expand Down