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

100 threads are created when reordering ListView with 2 items in WinUI3 #9195

Closed
HO-COOH opened this issue Jan 1, 2024 · 4 comments
Closed
Labels
area-Lists ListView, GridView, ListBox, etc bug Something isn't working team-Controls Issue for the Controls team

Comments

@HO-COOH
Copy link

HO-COOH commented Jan 1, 2024

Describe the bug

Why would you need to create and destory 100 threads when reordering a ListView with 2 items (in Release build) ?

Steps to reproduce the bug

  1. Create a ListView with this
    <ListView CanReorderItems="True" AllowDrop="True">
        <x:String>Item1</x:String>
        <x:String>Item1</x:String>
    </ListView>
  1. Build in Release mode, launch with visual studio debugger
  2. Try reorder the item, observe the output window

Expected behavior

I don't know what to expect

Screenshots

2024-01-01.22-07-20.mp4

NuGet package version

WinUI 3 - Windows App SDK 1.4.3: 1.4.231115000

Windows version

Windows 10 (1809): Build 17763

Additional context

No response

@HO-COOH HO-COOH added the bug Something isn't working label Jan 1, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jan 1, 2024
@HO-COOH HO-COOH changed the title 48 threads are created when reordering ListView with 2 items in WinUI3 100 threads are created when reordering ListView with 2 items in WinUI3 Jan 1, 2024
@kmgallahan
Copy link
Contributor

I think this is a problem with how drag & drop is implemented. Unsure if inherent to built-in ListView / GridView drag & drop code, or more general. Could be tested by implementing some custom drag & drop code.

I'm guessing threads will keep getting created for as long as the mouse is moving in a drag state.

Semi-related: #8851

@bpulliam bpulliam added area-Lists ListView, GridView, ListBox, etc team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Jan 18, 2024
@RBrid
Copy link
Contributor

RBrid commented Jun 19, 2024

The number is now reduced to 14 threads according to my observations, with the latest WinUI3 and OS version 10.0.22621.3527.

@RBrid RBrid closed this as completed Jun 19, 2024
@HO-COOH
Copy link
Author

HO-COOH commented Jun 19, 2024

@RBrid Just tried with this release
image

28 threads on my side. Still not very reasonable, reopen please.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jun 19, 2024
@RBrid
Copy link
Contributor

RBrid commented Jul 3, 2024

Hello - I verified again that 14 threads are created per drag&drop operation using the latest 1.6 build. So not reopening this at the moment. Maybe you did two successive operations and saw 28 threads?

@RBrid RBrid removed the needs-triage Issue needs to be triaged by the area owners label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Lists ListView, GridView, ListBox, etc bug Something isn't working team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

4 participants