microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.63k stars 6.52k forks source link

SvgThumbnailProvider stuck at 0.01% CPU usage. #30338

Open ChromiaCat opened 10 months ago

ChromiaCat commented 10 months ago

Microsoft PowerToys version

0.76.1

Installation method

PowerToys auto-update

Running as admin

No

Area(s) with issue?

File Explorer: Thumbnail preview

Steps to reproduce

Enable SVG thumbnail preview.

✔️ Expected Behavior

SVGThumbnailProvider goes through the svg's in the folder the user's in and generates thumbnails.

❌ Actual Behavior

It spawns 1 process stuck on 1 svg file and only using 0.01% of the CPU. It seems to have created a file in it's temp folder that's the same size as the SVG it's stuck on but doesn't do anything else than that. Killing the process makes it pick new SVG files but again it just copies them to it's temp folder and gets stuck on them as well.

Other Software

No response

TheJoeFin commented 7 months ago

is this still an issue in 0.79? /needinfo

ChromiaCat commented 7 months ago

is this still an issue in 0.79? /needinfo

Just updated & yes it is but it's different now. I'm in a folder with a few svg files, the process shuffles through a bunch of uuids with an svg extension but at the end after it stops no thumbnails show up.

Also refreshing the explorer window repeats the above.

TheJoeFin commented 7 months ago

/bugreport

ChromiaCat commented 7 months ago

Hi there!We need a bit more information to really debug this issue. Can you add a "Report Bug" zip file here? You right click on our system tray icon and just go to report bug. Then drag the zipfile from your desktop onto the GitHub comment box in this issue. Thanks! Report Bug

https://github.com/microsoft/PowerToys/files/14525296/PowerToysReport_2024-03-07-16-27-19.zip

TheJoeFin commented 7 months ago

@ChromiaCat do you have different kinds of files in the folder you are having the SVG thumbnail issues in? If so, what are the different file types in there?

It looks like thumbnail generation is logging this error message here: https://github.com/microsoft/PowerToys/blob/afcd551ccc3c8a63fc09e391c14448c4820506be/src/modules/previewpane/SvgThumbnailProviderCpp/SvgThumbnailProvider.cpp#L173

ChromiaCat commented 7 months ago

@ChromiaCat do you have different kinds of files in the folder you are having the SVG thumbnail issues in? If so, what are the different file types in there?

It looks like thumbnail generation is logging this error message here:

https://github.com/microsoft/PowerToys/blob/afcd551ccc3c8a63fc09e391c14448c4820506be/src/modules/previewpane/SvgThumbnailProviderCpp/SvgThumbnailProvider.cpp#L173

I do, it seems that's the first "folder" it looked through, since it's my desktop it has images, videos & documents but it doesn't matter, I tried on a folder with only SVGs and it's the same. For what it's worth, the default app to open SVG files is Chrome, would that cause an issue where previews for SVGs are generated but Windows can't set the thumbnail because Chrome is the default app?

TheJoeFin commented 7 months ago

@ChromiaCat not sure if the default SVG app being Chrome would be a problem. You could try changing it and see what happens. It is not clear to me what the issue could be.

2 things to look into:

  1. Ensure your folder settings allow showing Thumbnails, make sure this under Folder Options is Unchecked

    image
  2. Try clearing the thumbnail cache on the drive you are testing with. This should trigger Windows to rebuild the thumbnails and may fix conflicts if they are related to previously generated thumbnails.

ChromiaCat commented 7 months ago

@ChromiaCat not sure if the default SVG app being Chrome would be a problem. You could try changing it and see what happens. It is not clear to me what the issue could be.

2 things to look into:

  1. Ensure your folder settings allow showing Thumbnails, make sure this under Folder Options is Unchecked
image
  1. Try clearing the thumbnail cache on the drive you are testing with. This should trigger Windows to rebuild the thumbnails and may fix conflicts if they are related to previously generated thumbnails.

Did both, still nothing.

TheJoeFin commented 6 months ago

@ChromiaCat is this still an issue in v0.80.1? /needinfo

ChromiaCat commented 6 months ago

@ChromiaCat is this still an issue in v0.80.1? /needinfo

Kinda, it works in a win10 vm but not on the host. Is there some kinda log I can post that'd be of help?

TheJoeFin commented 6 months ago

the /bugreport is the most helpful thing you could share

ChromiaCat commented 6 months ago

I figured it out, the log complained about webview2 missing and installing it made SvgTP work. Maybe bundling a slim version of webview2, installing it alongside PowerToys or a message that some features in PowerToys may depend on it would be great.

A small bug I've also noticed about SvgTP is that if it's in the process of generating thumbnails & I click on various svgs at the same time to be viewed in the preview panel, SvgTP will skip over some svgs and a refresh is needed to go over the ones it missed. Log will be attached for extra info.

Log_2024-04-13.txt