QL-Win / QuickLook

Bring macOS “Quick Look” feature to Windows
http://pooi.moe/QuickLook/
GNU General Public License v3.0
17.39k stars 1.09k forks source link

Crash when previewing large images #1054

Open mbassalbioinformatics opened 2 years ago

mbassalbioinformatics commented 2 years ago

Describe the bug When attempting to preview a large image file (png/jpg), quicklook crashes. It seems to be images larger than 10mb or so cause the crash.

Expected behavior Ideally quicklook would handle images of all sizes to preview, or show and error that the image is too large to preview rather than crashing and closing.

Desktop (please complete the following information):

rabelux commented 2 years ago

Did you mean version 3.7.1? Or 3.7.0?

mbassalbioinformatics commented 2 years ago

3.7.0 - only after posting did i realize there was a 3.7.1

rabelux commented 2 years ago

3.7.0 had a bug that caused crashes. Pls try 3.7.1 and reopen this ticket if issue persists.

mbassalbioinformatics commented 2 years ago

Hi again Quicklook 3.7.1 still crashes when trying to open large png files >~3-4Mb in size

rabelux commented 2 years ago

If you'd provide an example file and logs that would be great.

mbassalbioinformatics commented 2 years ago

where can i find the log files after the crash?

1-2nucleosomes_wide

rabelux commented 2 years ago

Logfile can be found here: https://github.com/QL-Win/QuickLook/wiki/Differences-Between-Distributions#user-data-location

And your uploaded file is broken.

EDIT: The browser fails to load the image so I downloaded it and opened it with paint.net. It took around 30 sec to load the image and my pc froze during loading. I'm sorry but I don't think it's the scope of QuickLook to support such unusual scenarios.

mbassalbioinformatics commented 2 years ago

The browser doesnt open the file but if you try to open it in even default windows viewer it opens fine. However, if the dev's dont want to look into the issue thats their choice. It does happen with large pngs only though.

For reference the error in the log file shows

========19/09/2019 7:57:51 AM========
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at QuickLook.Plugin.OfficeViewer.IPreviewHandler.DoPreview()
   at QuickLook.Plugin.OfficeViewer.PreviewHandlerHost.Open(String path)
   at QuickLook.Plugin.OfficeViewer.Plugin.View(String path, ContextObject context)
   at QuickLook.ViewerWindow.<>c__DisplayClass5_0.<BeginShow>b__0()
charles51679 commented 2 years ago

This large png file crashes on windows photo viewer and iPhone. Any tools to open with?

mbassalbioinformatics commented 2 years ago

It opens fine for me on windows photo viewer. It can also be opened in Gimp or Photoshop.

mooflu commented 2 years ago

The image dimensions are 45725 × 13901. When I open it in the debugger I get a "An unhandled exception of type 'System.OverflowException' occurred in PresentationCore.dll". A RGBA bitmap of that image with 4 bytes per pixel is going to be > 2.5G so I suspect some int32 overflow.