Skip to content
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

Datagrid - Out of range exception upon expanding group after PC wakes up from sleep #16233

Open
0x90d opened this issue Jul 4, 2024 · 0 comments

Comments

@0x90d
Copy link
Contributor

0x90d commented Jul 4, 2024

Describe the bug

Crash upon collapsing/expanding a group if the computer has been previously put in a sleep state then woken up

To Reproduce

  1. Collapse a group, then minimize into the taskbar;
  2. put PC into sleep (start button in taskbar -> power ->sleep);
  3. turn PC on then bring application back and click the button to EXPAND any of the collapsed groups

Expected behavior

No response

Avalonia version

11.0.5

OS

Windows

Additional context

0x90d/videoduplicatefinder#520

Exception Info: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.RemoveAt(Int32 index)
   at Avalonia.Controls.DataGridDisplayData.UnloadScrollingElement(Int32 slot, Boolean updateSlotInformation, Boolean wasDeleted)
   at Avalonia.Controls.DataGrid.RemoveNonDisplayedRows(Int32 newFirstDisplayedSlot, Int32 newLastDisplayedSlot)
   at Avalonia.Controls.DataGrid.UpdateRowGroupVisibility(DataGridRowGroupInfo targetRowGroupInfo, Boolean newIsVisible, Boolean isDisplayed)
   at Avalonia.Controls.DataGrid.OnRowGroupHeaderToggled(DataGridRowGroupHeader groupHeader, Boolean newIsVisible, Boolean setCurrent)
   at Avalonia.Controls.DataGridRowGroupHeader.ToggleExpandCollapse(Boolean isVisible, Boolean setCurrent)
   at Avalonia.Controls.DataGridRowGroupHeader.<OnApplyTemplate>b__59_0(Nullable`1 v)
   at Avalonia.Reactive.LightweightObservableBase`1.PublishNext(T value)
   at Avalonia.Reactive.AvaloniaPropertyObservable`2.PropertyChanged(Object sender, AvaloniaPropertyChangedEventArgs e)
   at Avalonia.PropertyStore.EffectiveValue`1.SetAndRaiseCore(ValueStore owner, StyledProperty`1 property, T value, BindingPriority priority, Boolean isOverriddenCurrentValue, Boolean isCoercedDefaultValue)
   at Avalonia.PropertyStore.ValueStore.SetCurrentValue[T](StyledProperty`1 property, T value)
   at Avalonia.AvaloniaObject.SetCurrentValue[T](StyledProperty`1 property, T value)
   at Avalonia.Controls.Primitives.ToggleButton.Toggle()
   at Avalonia.Controls.Primitives.ToggleButton.OnClick()
   at Avalonia.Controls.Button.OnPointerPressed(PointerPressedEventArgs e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants