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

Leak the window when it closes on Windows 10 #15397

Merged
merged 1 commit into from
May 22, 2023

Conversation

zadjii-msft
Copy link
Member

Re: #15384

Basically, when we close a DesktopWindowXamlSource, it calls to Windows_UI_Xaml!DirectUI::MetadataAPI::Reset, which resets the XAML metadata provider for the process. So, closing one DWXS on one thread will force an A/V next time another thread tries to do something like... display a tooltip. Not immediately, but surely soon enough.

This was fixed in Windows 11 by os.2020!5837001. That wasn't backported to Windows 10.

This will cause a ~15MB memory leak PER WINDOW. OBVIOUSLY, this is bad, but it's less bad than crashing.

We're gonna keep using #15384 for other ideas here too.

Re: #15384

I'm not sure I've even got the words for this.
Comment on lines +63 to +68
// ____ ____ _____ _______ __
// | _ \ / __ \| __ \ / ____\ \ / /
// | |_) | | | | | | | | __ \ \_/ /
// | _ <| | | | | | | | |_ | \ /
// | |_) | |__| | |__| | |__| | | |
// |____/ \____/|_____/ \_____| |_|
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm totally gonna steal this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HAHAHA

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glorious and horrible. Mark it for servicing to 1.18 and the script will pull it

@zadjii-msft zadjii-msft added this to To Cherry Pick in 1.18 Servicing Pipeline via automation May 22, 2023
@zadjii-msft zadjii-msft merged commit c589784 into main May 22, 2023
15 checks passed
@zadjii-msft zadjii-msft deleted the dev/migrie/15384-leakspin.wav branch May 22, 2023 16:00
@DHowett DHowett moved this from To Cherry Pick to Cherry Picked in 1.18 Servicing Pipeline May 23, 2023
DHowett pushed a commit that referenced this pull request May 23, 2023
Re: #15384

Basically, when we close a `DesktopWindowXamlSource`, it calls to `Windows_UI_Xaml!DirectUI::MetadataAPI::Reset`, which resets the XAML metadata provider _for the process_. So, closing one DWXS on one thread will force an A/V next time another thread tries to do something like... display a tooltip. Not immediately, but surely soon enough.

This was fixed in Windows 11 by os.2020!5837001. That wasn't backported to Windows 10.

This will cause a ~15MB memory leak PER WINDOW. OBVIOUSLY, this is bad, but it's less bad than crashing.

We're gonna keep using #15384 for other ideas here too.

(cherry picked from commit c589784)
Service-Card-Id: 89283538
Service-Version: 1.18
@DHowett DHowett moved this from Cherry Picked to Shipped in 1.18 Servicing Pipeline Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants