-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Android] Avoid to disconnect a disposed PlatformView on Android #12881
Conversation
hi, was wondering when will this be released? I am encountering an issue that this release might fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have code anywhere that's disposing of MauiAppCompatEditText
? I wonder why it's getting disposed of in the first place.
Like, if we override dispose on MauiAppCompatEditText
can we trigger the conditions of when it gets hit?
I think the bug is with framerenderer and this code here
I think when ViewHandlerDelegate
we need to not call dispose here and just remove this code.
any update? |
@jean-marinduque do you have a stack trace of your exception? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the stack trace I think this is a bug inside FrameRenderer
When dispose is called we are calling Dispose
on all the children and then calling DisconnectHandler
on the Frame
I think we need to just remove the call to child?.dispose
The user here specifically calls out that switching to Border
fixed the issue.
We should probably also remove the call to dispose
inside ViewHandlerDelegator
when DisconnectHandler
is called as well.
If we want to make a change around checking if the platform view is alive then I wonder if we want to generalize that.
We already have a call called CanInvokeMappers
where we won't invoke any mappers when disposed, so maybe we need that for disconnect as well. Ideally we wouldn't :-/ but might not hurt
Description of Change
Avoid to disconnect a disposed PlatformView on Android.
Issues Fixed
Fixes #12644
Fixes #13762