microsoft / microsoft/microsoft-ui-xaml

`ConnectedAnimation` causes memory leak

Open
#11,239 4 comments 1 reaction 0 assignees View on GitHub
bug needs-triage
Dominant language
C++
Stars
8.4k
Forks
942
Avg merge
2d 7h
Merged PRs (30d)
105

Description

### Describe the bug

Trigger `ConnectedAnimation` repeatedly, memory usage will increase steadily.

### Why is this important?

Frequent operations can cause a crash.

### Steps to reproduce the bug

There are two ways to reproduce this:
The first one:
1. Debug attached solution: [ConnectedAnimationMemoryLeak.zip](https://github.com/user-attachments/files/30036901/ConnectedAnimationMemoryLeak.zip)
2. Click repeatedly rectangle with text leak.
3. Observe Process Memory in Diagnostic Tools

The second one:
1. Open WinUI 3 Gallery
2. Open Task Manager, search WinUI 3 Gallery
3. Go to Motion > Connected Animation
4. Locate to first sample, click Item 1 and Go Back repeatedly.
5. Check memory usage in Task Manager.

### Actual behavior

Process memory usage increase steadily.

### Expected behavior

No memory leak.

### Screenshots

Image

### NuGet package version

2.2.1

### Windows version

Windows 11 (26H1): Build 28000

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the attached ConnectedAnimationMemoryLeak.zip and reproduce the leak by repeatedly clicking the rectangle. Compare this with the WinUI 3 Gallery Motion > Connected Animation sample while monitoring memory in Diagnostic Tools or Task Manager. Done means repeated navigation no longer causes process memory to increase steadily.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.