This repository has been archived by the owner on May 1, 2024. It is now read-only.
Crash when calling ChangeCanExecute() from non-UI thread #5679
Labels
e/5 🕔
5
help wanted
We welcome community contributions to any issue, but these might be a good place to start!
i/high
Completely doesn't work, crashes, or is unusably slow, has no obvious workaround; occurs less often
inactive
Issue is older than 6 months and needs to be retested
t/bug 🐛
up-for-grabs
We welcome community contributions to any issue, but these might be a good place to start!
Description
App crashes when running async method which triggers ChangeCanExecute(). I think this should the responsibility of the renderers to trigger any visual updates on the UI thread. The workaround for this problem is to wrap all ChangeCanExecute() in Device.BeginInvokeOnMainThread()
Steps to Reproduce
Run async methods which triggers ChangeCanExecute(). You can i.e. create a button with async Command which changes one of the binding property and this binding property raise ChangeCanExecute() in the setter.
Expected Behavior
App should not crash.
Actual Behavior
App crashes when running async method which triggers ChangeCanExecute(). The problem exists both on Android and iOS.
Basic Information
Reproduction Project
Here is a project with a repro:
App1.zip
The text was updated successfully, but these errors were encountered: