-
Notifications
You must be signed in to change notification settings - Fork 10.3k
DataAnnotationsValidator attempts to force render during renderer disposal resulting in circuit exception #32411
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
Comments
Thanks for contacting us. We're moving this issue to the |
This issue made me a bit suspicious because I couldn't think of a reason why we'd be getting this error, but after a minute's investigation, it raises a wider question. When we call a component's This seems like a risky inconsistency to me, and could manifest in other ways than we see in this report. For example in cases like WebView, if your disposal logic involves interacting with the underlying native control in some way, you could get an error because you might not be on the UI thread. I would think, then, that the renderer's cc @javiercn @Eilon since you've also been thinking about dispose logic in some detail recently. What do you think? |
Yes, dispose needs to happen within the sync context. If we are not doing it, then I think we have a bug. |
Yeah I might be naive, but I think that any time we call into some component-level API, it should be in the right context, right? I assume the same holds true for other component "events" such as Initialize, ParametersSet, etc.? |
Yes, sounds like we all agree. I'm pretty confident that other lifecycle methods already only ever get called on the sync context, as lots of things would be broken otherwise. |
Found in version 6.0.100-preview.5.21254.10
Repro
The text was updated successfully, but these errors were encountered: