-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
Issue-BugSomething isn't workingSomething isn't workingProduct-Command PaletteRefers to the Command Palette utilityRefers to the Command Palette utilityStatus-In progressThis issue or work-item is under developmentThis issue or work-item is under development
Description
Microsoft PowerToys version
main
Installation method
Dev build in Visual Studio
Area(s) with issue?
Command Palette
Steps to reproduce
- Open All apps.
- Use the mouse to select a Steam game for the first time after startup. (Using keyboard _won't trigger that issue).
- Observe the UI deadlock.
What happened
The change that fixed Steam icons (#44938) uncovered a deadlock while building AppListItem details:
A) Pre-existing “time bomb”
There’s a pre-existing risk here:
| _details = new Lazy<Details>(() => | |
| { | |
| var t = BuildDetails(); | |
| t.Wait(); | |
| return t.Result; | |
| }); |
B) Steam icon fix changes the thumbnail code path
The Steam icon fix allows .ico files to be used as both the list icon and the hero icon. That routes execution through a different code path in ThumbnailHelper.GetThumbnail:
Lines 29 to 59 in ea43974
| public static async Task<IRandomAccessStream?> GetThumbnail(string path, bool jumbo = false) | |
| { | |
| var extension = Path.GetExtension(path).ToLower(CultureInfo.InvariantCulture); | |
| var isImage = ImageExtensions.Contains(extension); | |
| if (isImage) | |
| { | |
| try | |
| { | |
| var result = await GetImageThumbnailAsync(path, jumbo); | |
| if (result is not null) | |
| { | |
| return result; | |
| } | |
| } | |
| catch (Exception) | |
| { | |
| // ignore and fall back to icon | |
| } | |
| } | |
| try | |
| { | |
| return await GetFileIconStream(path, jumbo); | |
| } | |
| catch (Exception) | |
| { | |
| // ignore and return null | |
| } | |
| return null; | |
| } |
C) Triggered from the UI thread via mouse interaction → deadlock
Because the detail load is triggered from the UI thread (via mouse selection), we end up in a deadlock.
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
Additional Information
No response
Other Software
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-BugSomething isn't workingSomething isn't workingProduct-Command PaletteRefers to the Command Palette utilityRefers to the Command Palette utilityStatus-In progressThis issue or work-item is under developmentThis issue or work-item is under development