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

[Run] Memory leak #8878

Closed
zhangzhilinx opened this issue Jan 1, 2021 · 15 comments
Closed

[Run] Memory leak #8878

zhangzhilinx opened this issue Jan 1, 2021 · 15 comments
Labels
Issue-Bug Something isn't working Product-PowerToys Run Improved app launch PT Run (Win+R) Window

Comments

@zhangzhilinx
Copy link

ℹ Computer information

  • PowerToys version: 0.29.0
  • PowerToy Utility: PowerLauncher
  • Running PowerToys as Admin: No
  • Windows build number: 1903 (Home Edition zh-CN)

📝 Provide detailed reproduction steps (if any)

  1. Alt + Space launch PowerLauncher
  2. Input "Visual Studio"
  3. Clear and input "whats"

✔️ Expected result

What is the expected result of the above steps?
As everyone knows.

❌ Actual result

What is the actual result of the above steps?
But when I did this today, PowerLauncher consumed a huge amount of memory in a short time, and then the program crashed.

📷 Screenshots

Are there any useful screenshots? WinKey+Shift+S and then just paste them directly into the form
image

@zhangzhilinx zhangzhilinx added the Issue-Bug Something isn't working label Jan 1, 2021
@ghost ghost added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Jan 1, 2021
@zhangzhilinx
Copy link
Author

In addition, what is distressing is that PowerLauncher usually has a large memory footprint, about 350MB, is there any good way?

@crutkas
Copy link
Member

crutkas commented Jan 5, 2021

any chance you can share the logs? Do you maybe have a networked drive?

%localappdata%\Microsoft\PowerToys\PowerToys Run\Logs

@crutkas crutkas added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-PowerToys Run Improved app launch PT Run (Win+R) Window and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jan 5, 2021
@mykhailopylyp
Copy link
Contributor

@zhangzhilinx
Open a command prompt and run "%PROGRAMFILES%\PowerToys\Tools\BugReportTool.exe" (the double quotes are important)
that will create a zip file on you desktop named like this PowerToysReport_2021-01-04-12-02-08.zip
You can drag and drop it in a GitHub comment. It will help us to investigate the issue.

@zhangzhilinx
Copy link
Author

any chance you can share the logs? Do you maybe have a networked drive?

%localappdata%\Microsoft\PowerToys\PowerToys Run\Logs

Sorry, I was dealing with work today and couldn't reply in time.
I'm sure I don't have a networked drive installed on my system.

@ghost ghost added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jan 5, 2021
@zhangzhilinx
Copy link
Author

any chance you can share the logs? Do you maybe have a networked drive?

%localappdata%\Microsoft\PowerToys\PowerToys Run\Logs

Please protect my privacy and delete the corresponding files in time
2021-01-01.txt
2021-01-02.txt

@enricogior enricogior added Planning-Consideration Consideration for 2021 stability release Severity-High Bugs that we consider a blocking issue for release (crashes stuff outside of PT) and removed Needs-Team-Response An issue author responded so the team needs to follow up Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jan 9, 2021
@enricogior enricogior changed the title PowerLauncher accidentally takes up huge memory [Run] PowerLauncher.exe accidentally takes up huge memory Jan 9, 2021
@enricogior enricogior changed the title [Run] PowerLauncher.exe accidentally takes up huge memory [Run] Memory leak Jan 19, 2021
@BeSureEyeBrick
Copy link

I'm also experiencing the same memory leak

image

Attached below is my bug report .zip file
PowerToysReport_2021-04-15-03-11-04.zip

@mykhailopylyp
Copy link
Contributor

Crash from the logs

System.IO.IOException: The process cannot access the file 'C:\Users\beshr\AppData\Local\Microsoft\PowerToys\PowerToys Run\Cache\Image.cache' because it is being used by another process.
   Source: System.Private.CoreLib
   TargetAssembly: System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
   TargetModule: System.Private.CoreLib.dll
   TargetSite: Microsoft.Win32.SafeHandles.SafeFileHandle ValidateFileHandle(Microsoft.Win32.SafeHandles.SafeFileHandle)
   at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
   at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.FileStream..ctor(String path, FileMode mode)
   at Wox.Infrastructure.Storage.BinaryStorage`1.Save(T data)
   at Wox.Infrastructure.Image.ImageLoader.Save()
   at Wox.PublicAPIInstance.SaveAppAllSettings()
   at PowerLauncher.App.<>c__DisplayClass20_0.<Dispose>b__0()
   at Wox.Infrastructure.Stopwatch.Normal(String message, Action action)
   at PowerLauncher.App.Dispose(Boolean disposing)
   at PowerLauncher.App.Dispose()
   at PowerLauncher.App.<RegisterExitEvents>b__15_2(Object s, SessionEndingCancelEventArgs e)
   at System.Windows.Application.OnSessionEnding(SessionEndingCancelEventArgs e)
   at System.Windows.Application.WmQueryEndSession(IntPtr lParam, IntPtr& refInt)
   at System.Windows.Application.AppFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

@CallumWatkins
Copy link

run-mem-leak

I experienced the same issue, v0.37.2. I had just been using the run box as a calculator.

Here are the last few entries in the log file. The last line is the most notable.

[2021-05-24 03:44:39.8333] [INFO] [S:\src\modules\launcher\PowerLauncher\Helper\NativeEventWaiter.cs::24]
Successfully waited for Local\PowerToysRunInvokeEvent-30f26ad7-d36d-4c0e-ab02-68bb5ff3c4ab

[2021-05-24 03:44:39.8333] [INFO] [S:\src\modules\launcher\PowerLauncher\ViewModel\MainViewModel.cs::778]
OnHotkey

[2021-05-24 03:44:54.8248] [WARN] [S:\src\modules\launcher\PowerLauncher\Plugin\PluginManager.cs::191]
PluginManager.QueryForPlugin Program. Query cost - 14082 milliseconds

@crutkas
Copy link
Member

crutkas commented May 24, 2021

Agree, 14 seconds seems insane for something that should be very small.

@mykhailopylyp
Copy link
Contributor

@zhangzhilinx
Please update to 0.41.4 and if it happens again upload a bug report.

@zhangzhilinx
Copy link
Author

@zhangzhilinx
Please update to 0.41.4 and if it happens again upload a bug report.

Thank you! I will update it.

@crutkas
Copy link
Member

crutkas commented Sep 24, 2021

@zhangzhilinx still an issue?

@crutkas crutkas removed the Severity-High Bugs that we consider a blocking issue for release (crashes stuff outside of PT) label Sep 24, 2021
@crutkas crutkas added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Planning-Consideration Consideration for 2021 stability release labels Sep 24, 2021
@zhangzhilinx
Copy link
Author

@zhangzhilinx still an issue?

This bug has not occurred recently. Thanks!

@ghost ghost added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Sep 26, 2021
@crutkas crutkas removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up labels Sep 26, 2021
@crutkas crutkas closed this as completed Sep 26, 2021
@housekorea
Copy link

Hello, I face same error , PowerLauncher has memory leak issues.

I use powertoys v0.47.1 , recent suddenly problems occurred after I set powertoys run plugin options. I disabled unit converter and registry plugins. I wonder this modification make problems.

image

@franky920920
Copy link
Contributor

@housekorea Please open a new issue for 0.47.1. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Product-PowerToys Run Improved app launch PT Run (Win+R) Window
Projects
None yet
Development

No branches or pull requests

8 participants