-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
StackOverflowException in binding #855
Comments
easy repros can be found in branch https://github.com/donandren/Avalonia/tree/issues/855 Repro steps: Another repro added (covering also #824): |
…led properties
…led properties
…led properties
…sing weakobservable
… behind scenes is using weakobservable
I've finally figured out why this causes a stack overflow. Below is the order of events that cause it. Objects required: A, B are Two-way bind A.Prop <---> C.Prop. Then bind B.Prop <---> A.Prop. Order of events:
Now I have no idea how to fix this, but at least we have the execution path to work with. |
In this case it looks like we can just make B update A before C, since that will lead us to a steady-state. However, that does not work in all cases. Let's look at the situation below: Objects required: A, B are Two-way bind A.Prop <---> C.Prop. Then bind B.Prop <---> A.Prop. Order of events:
In this situation, we never hit a steady-state so there is no good way to resolve this stack overflow without making the bindings inconsistent. |
StackOverflowException in binding when property is changed in setter before raise property changed.
That's probably the root reason for problem in #824
Example if you bind a listbox selected Item to property selected item and property is like:
The text was updated successfully, but these errors were encountered: