-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Conversation
Re: #15384 I'm not sure I've even got the words for this.
// ____ ____ _____ _______ __ | ||
// | _ \ / __ \| __ \ / ____\ \ / / | ||
// | |_) | | | | | | | | __ \ \_/ / | ||
// | _ <| | | | | | | | |_ | \ / | ||
// | |_) | |__| | |__| | |__| | | | | ||
// |____/ \____/|_____/ \_____| |_| |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HAHAHA
There was a problem hiding this 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
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
Re: #15384
Basically, when we close a
DesktopWindowXamlSource
, it calls toWindows_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.