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

Memoryleak on DataGrid TableHeader #4737

Open
2 of 14 tasks
KenionX opened this issue Aug 25, 2022 · 4 comments
Open
2 of 14 tasks

Memoryleak on DataGrid TableHeader #4737

KenionX opened this issue Aug 25, 2022 · 4 comments
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior DataGrid 🔠 Issues on DataGrid control
Milestone

Comments

@KenionX
Copy link

KenionX commented Aug 25, 2022

Describe the bug

Moving the mouse over the table headers on a DataGrid will cause an event handler leak, resulting in a Memoryleak on the control

Regression

No response

Reproducible in sample app?

  • This bug can be reproduced in the sample app.

Steps to reproduce

https://github.com/KenionX/Winui3MemoryLeak/tree/master

Move the mouse over the table headers

Expected behavior

No memory leak

Screenshots

devenv_2USYr4idPF

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

17.2.6

Device form factor

Desktop

Nuget packages

CommunityToolkit.WinUI.UI.Controls.DataGrid 7.1.2
Microsoft.WindowsAppSDK 1.1.4
Microsoft.Windows.SDK.BuildTools 10.0.22621.1
MvvmGen 1.1.5

Additional context

No response

Help us help you

No.

@KenionX KenionX added the bug 🐛 An unexpected issue that highlights incorrect behavior label Aug 25, 2022
@ghost ghost added the needs triage 🔍 label Aug 25, 2022
@ghost
Copy link

ghost commented Aug 25, 2022

Hello KenionX, 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 🙌

@Arlodotexe Arlodotexe added DataGrid 🔠 Issues on DataGrid control and removed needs triage 🔍 labels Aug 25, 2022
@Arlodotexe Arlodotexe added this to the 7.1.3 milestone Aug 25, 2022
@michael-hawker
Copy link
Member

@RBrid I know you're busy, but I don't see where we'd be registering an event here in the Pointer Moved event or anything. If you had a couple of minutes to maybe point us in the right direction here, that'd be much appreciated. Thanks!

@Arlodotexe
Copy link
Member

This issue is reproduceable on UWP: App1.zip

@Arlodotexe
Copy link
Member

Arlodotexe commented Sep 29, 2022

I'm still looking for what exactly causes this, but after investigating I've found that this line is causing extra allocations:

image

Commenting out the line, the memory increase goes away.
Leaving the line there but removing all code in the handler, the memory increase comes back.

Attaching the event is causing this (not the event invocation or event handler), but for some reason it's only that one event. Still investigating.

@Arlodotexe Arlodotexe removed their assignment Oct 6, 2022
@michael-hawker michael-hawker modified the milestones: 7.1.3, 8.0 Oct 11, 2022
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 DataGrid 🔠 Issues on DataGrid control
Projects
Status: No status
Development

No branches or pull requests

3 participants