-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Scrolling in ListBox causes stack overflow exception #2936
Comments
Version of Avalonia? |
Tested on both 0.8.2 and the nightly build. |
reproduce this bug with just xaml <ListBox ScrollViewer.VerticalScrollBarVisibility="Visible">
<ListBoxItem>
<StackPanel>
<TextBlock Text="A single character of: a, b or c" />
<TextBlock Classes="green" Text="[abc]" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="A character except: a, b or c" />
<TextBlock Classes="green" Text="[^abc]" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="A character in the range: a-z" />
<TextBlock Classes="green" Text="[a-z]" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="A character not in the range: a-z" />
<TextBlock Classes="green" Text="[^a-z]" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="A character in the range: a-z or A-Z" />
<TextBlock Classes="green" Text="[a-zA-Z]" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Any single character" />
<TextBlock Classes="green" Text="." />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Any whitespace character" />
<TextBlock Classes="green" Text="\s" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Any non-whitespace character" />
<TextBlock Classes="green" Text="\S" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Any digit" />
<TextBlock Classes="green" Text="\d" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Any non-digit" />
<TextBlock Classes="green" Text="\D" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Any word character" />
<TextBlock Classes="green" Text="\w" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Any non-word character" />
<TextBlock Classes="green" Text="\W" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Capture everything enclosed" />
<TextBlock Classes="green" Text="(...)" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Match either a or b" />
<TextBlock Classes="green" Text="(a|b)" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Zero or one of a" />
<TextBlock Classes="green" Text="a?" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Zero or more of a" />
<TextBlock Classes="green" Text="a*" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="One or more of a" />
<TextBlock Classes="green" Text="a+" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Exactly 3 of a" />
<TextBlock Classes="green" Text="a{3}" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="3 or more of a" />
<TextBlock Classes="green" Text="a{3,}" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Between 3 and 6 of a" />
<TextBlock Classes="green" Text="a{3,6}" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Start of string" />
<TextBlock Classes="green" Text="^" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="End of string" />
<TextBlock Classes="green" Text="$" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="A word boundary" />
<TextBlock Classes="green" Text="\b" />
</StackPanel>
</ListBoxItem>
<ListBoxItem>
<StackPanel>
<TextBlock Text="Non-word boundary" />
<TextBlock Classes="green" Text="\B" />
</StackPanel>
</ListBoxItem>
</ListBox> |
Hi @stephenfournier @CreateLab yeah, I intend to rewrite our listbox virtualization code in 0.10 (see #2594) but for the meantime, the best fox for this is to set |
As a workaround I have added pagination to my listbox (i.e. forward and back buttons), which eliminates the scrollbar and thus the issue never occurs. |
Repro steps:
The text was updated successfully, but these errors were encountered: