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

AdvancedCollectionView throws ArgumentOutOfRangeException when live shaping set to true. #4339

Open
4 of 19 tasks
w-ahmad opened this issue Oct 22, 2021 · 7 comments · May be fixed by #4349
Open
4 of 19 tasks

AdvancedCollectionView throws ArgumentOutOfRangeException when live shaping set to true. #4339

w-ahmad opened this issue Oct 22, 2021 · 7 comments · May be fixed by #4349
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior In-PR 🚀
Milestone

Comments

@w-ahmad
Copy link

w-ahmad commented Oct 22, 2021

Describe the bug

AdvancedCollectionView throws ArgumentOutOfRangeException when live shaping set to true and try to change values of filter properties.

Steps to Reproduce

I've created a test app to reproduce this issue. The app contains two lists each of lists items source is bound to filtered advanced collection view source. To reproduce this issue drag & drop first item from list1 to list2 and then drag & drop fifth item from list 1 to list 2, you will notice the exception.

Test Project: https://github.com/w-libs/TestApp1

Expected behavior

Screenshots

image

Environment

NuGet Package(s):

Package Version(s):

Windows 10 Build Number:

  • Fall Creators Update (16299)
  • April 2018 Update (17134)
  • October 2018 Update (17763)
  • May 2019 Update (18362)
  • May 2020 Update (19041)
  • Insider Build ({build_number})

App min and target version:

  • Fall Creators Update (16299)
  • April 2018 Update (17134)
  • October 2018 Update (17763)
  • May 2019 Update (18362)
  • May 2020 Update (19041)
  • Insider Build ({build_number})

Device form factor:

  • Desktop
  • Xbox
  • Surface Hub
  • IoT

Visual Studio version:

  • 2017 (15.{minor_version})
  • 2019 (16.{minor_version})
  • 2022 (17.0) Preview 6
@w-ahmad w-ahmad added the bug 🐛 An unexpected issue that highlights incorrect behavior label Oct 22, 2021
@ghost ghost added the needs triage 🔍 label Oct 22, 2021
@ghost
Copy link

ghost commented Oct 22, 2021

Hello w-libs, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@XAML-Knight
Copy link
Contributor

The AdvancedCollectionView operates just fine, when I run a scenario test like this in our UnitTests.UWP project, with everything the same except for emulating drag and drop (i.e., to simulate drag & drop, I just simply removed a Model item from one AdvancedCollectionView and added it to another AdvancedCollectionView).

For this particular issue, there may be more Drag & Drop settings that need to be explored.

@w-ahmad
Copy link
Author

w-ahmad commented Oct 26, 2021

This issue is actually not related to drag & drop. In test case I just used drag & drop to update a property of model.
image

and the property "Year" is responsible for the filter.
image

So the real problem in this case is with collection filtered items handling and it occurred in AddvancedCollectionView.cs at line 702 where it tries to compare items from source and view to get index for new item.

@michael-hawker
Copy link
Member

May be related to #4263 and #2913 as well?

@w-ahmad
Copy link
Author

w-ahmad commented Oct 26, 2021

May be related to #4263 and #2913 as well?

I don't think so... cause these are related to handle removed item but here's the problem is in handle new items.

@XAML-Knight
Copy link
Contributor

May be related to #4263 and #2913 as well?

For those interested, I also implemented a unit test (in a similar manner) for removing the last item in an ACV, and the test ran fine

@michael-hawker
Copy link
Member

Thanks @XAML-Knight, did you want to open a PR so we can have that added to the existing test suite?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior In-PR 🚀
Projects
None yet
3 participants