Exception when opening QuickLook on files from a connected media device
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 24.7k
- Forks
- 1.3k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 1
Description
I plugged my phone into my computer over MTP, and had QuickLook open already. It crashed when I selected any files in the MTP area. It would probably be desirable to just have QuickLook ignore these rather than crashing. This is reproducible with any Android device and probably any other devices that use MTP.
Two crash windows appear, but I can only copy one of them - I've added a screen recording for clarity.
Error Occured v4.0.3.0
2025-10-02 8:10:12 PM Windows 10.0.26100.2
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.ArgumentException: Illegal characters in path.
at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
at QuickLook.Plugin.InfoPanel.WindowsThumbnailProvider.GetThumbnail(String fileName, Int32 width, Int32 height, ThumbnailOptions options)
at QuickLook.Plugin.InfoPanel.InfoPanel.<>c__DisplayClass5_0.<DisplayInfo>b__0()
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.ArgumentException: Illegal characters in path.
at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
at QuickLook.Plugin.InfoPanel.WindowsThumbnailProvider.GetThumbnail(String fileName, Int32 width, Int32 height, ThumbnailOptions options)
at QuickLook.Plugin.InfoPanel.InfoPanel.<>c__DisplayClass5_0.<DisplayInfo>b__0()
at System.Threading.Tasks.Task.Execute()<---
https://drive.google.com/file/d/1s-rvwBhac87tucKUlmCEWiwaNvmGO4FR/view?usp=sharing
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with QuickLook.Plugin.InfoPanel.WindowsThumbnailProvider.GetThumbnail and the InfoPanel display callback shown in the stack trace. Reproduce the crash by selecting files on an MTP-connected Android device while QuickLook is open. Done means those selections no longer crash QuickLook and are safely ignored or handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100