WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

High CPU Usage even after closing the app built with Windows App SDK 1.1.

Open shyamshr93 opened this issue 3 years ago • 4 comments

Describe the bug

Very high CPU usage even when the app is closed. It is still running in the background. It only happens after you open WebView2 within app and then close the app. It seems to only affecting apps built with Window App SDK 1.1

Steps to reproduce the bug

  1. Open App built with Windows App SDK 1.1 (example WinUI 3 Gallery app).
  2. Open or use WebView2.
  3. Close the app.

App still running in the background with very high cpu usage.

Expected behavior

CPU usage should not be very high and It should stop the app running in the background.

Screenshots

Screenshot after closing the app. But it is still in the background

image

NuGet package version

No response

Packaging type

Packaged (MSIX)

Windows version

Windows 10 version 21H2 (19044, November 2021 Update)

IDE

Visual Studio 2022

Additional context

No response

shyamshr93 avatar Jun 09 '22 08:06 shyamshr93

@shyamshr93 Interesting issue, I'm having trouble reproducing it. Did you build the WinUI 3 Gallery yourself, or is this the version from the store? Do you see the same problem with other apps?

krschau avatar Jun 10 '22 15:06 krschau

@krschau It is the version from the store. I have encountered it multiple times from the WinUI 3 app. I have build app of my own with webview2 and the issue is present but only after the Windows App SDK 1.1 .

shyamshr93 avatar Jun 10 '22 17:06 shyamshr93

If the issue only persists for a short time (under 30 seconds) it could indicate a crash occurred, and the high CPU is part of crash data collection. If you watch task manager, do you see "Windows Error Reporting" also busy at that time? I tried the scenario and did see error reporting kick in.

BenJKuhn avatar Jun 15 '22 19:06 BenJKuhn

I don't see the "Windows Error Reporting" kick in anytime. It is still happening. The issue is not present in any version of WindowsAppSDK before 1.1

shyamshr93 avatar Jun 17 '22 16:06 shyamshr93

Just wanted to add this is probably due to this issue https://github.com/microsoft/WindowsAppSDK/issues/2712#issue-1295189146 . i no longer has this high CPU usage after the workaround used from the issue linked above

shyamshr93 avatar Sep 02 '22 06:09 shyamshr93