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
Stack Overflow Exception #3189
Comments
I think it was suggested that ReactiveUI could cause this. Could you isolate the areas that are using ReactiveUI? Also a small repro would be ideal. |
@Gillibald The file where this trouble is administered is https://github.com/waliarubal/Jaya/blob/master/Jaya.Ui/Views/NavigationView.xaml. It shall get you started real quick without having to dig deep. |
This line is causing the stack overflow: https://github.com/waliarubal/Jaya/blob/master/Jaya.Ui/Views/ExplorerView.xaml#L98 The binding returns null for the target command and it looks like this is retried over and over again. |
Even without a binding the CommandInvokeAction is causing a stack overflow. |
@Gillibald This is strange though, I reported the issue to @wieslawsoltes regarding his Behaviors assembly which I am using and he mentioned that it's happening even after removing it. Maybe he can shed some more light on this matter as per his investigations. |
@Gillibald Today I was revisiting the issue (waliarubal/Jaya#13), it seems like your observation is partially correct. https://github.com/waliarubal/Jaya/blob/ba7994037dfa8d064e87d88b1631f899d1b2c886/Jaya.Ui/ViewModels/NavigationViewModel.cs#L48 is getting stack overflow exception. Even after commenting out ExplorerView from main window, still exception is being thrown. Designer is trying to set its value 'null' again and again which should not happen at the very first place. Please take latest from my repository and check this out. When I have a node selected in the tree view, as soon as I click on another node the exception starts appearing. Theoretically this should not happen as I am not setting 'null', instead another node is being set through SelectedItem property of TreeView. |
@Gillibald Another thing which I noticed today is stack overflow doesn't happen when we click expand node icon on the left of the node. It happens when node selection is done. Please be kind enough to have a look. |
@waliarubal This is an issue with TreeView and how it is handling selection changes. In short somehow SelectedItem is set to null and that causes a reset of the SelectedItems and that sets SelectedItem to null. => StackOverflow |
We need a small repro to tackle this. Hopefully I am able to write a failing unit test on Friday. |
@Gillibald this was not at all a problem with v0.8.3, but as soon as stuff upgraded to v0.9.x; things started falling apart and I started struggling with this stack overflow exception. A patch may be needed in a near-planned Avalonia release with the fix. I feel all the people using the TreeView will encounter this issue in some way or the other. |
Closing out after cause was diagnosed by @grokys.
|
I just upgraded my project to latest preview of 0.9 and now its completely broken.
Expanding or clicking on bound tree nodes have started giving stack overflow exceptions. It was working very well with Avalonia 0.8.3 stable.
To reproduce follow below mentioned steps.
Earlier I thought that this might be because of another package I am using but it seems like it's not because of it. You can refer this for that issue. AvaloniaUI/Avalonia.Xaml.Behaviors#28
The text was updated successfully, but these errors were encountered: