Blender File Browser not generating previews for large (filezise) images #96023

Closed
opened 2022-02-25 06:32:04 +01:00 by Shady Hamza · 34 comments

System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.65

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-02-24 21:51, hash: 7d7dd66ba7
Worked: never

Short description of error
Blender File Browser in thumbnail view doesn't load thumbnails at all (or takes very long time and freezes blender when loading large png, hdri, alphas for sculpting..etc in thumbnail view ,files 4k and above)

Exact steps for others to reproduce the error
#96023.zip

  • folder contains two 8k images from HDRI haven (one is 73MB, the other 328MB)
  • open a File Browser
  • browse to that folder
  • show thumbnails
  • larger file will never show a thumbnail

{F12886546 size=full}

**System Information** Operating system: Windows-10-10.0.22000-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.65 **Blender Version** Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-02-24 21:51, hash: `7d7dd66ba7` Worked: never **Short description of error** Blender File Browser in thumbnail view doesn't load thumbnails at all (or takes very long time and freezes blender when loading large png, hdri, alphas for sculpting..etc in thumbnail view ,files 4k and above) **Exact steps for others to reproduce the error** [#96023.zip](https://archive.blender.org/developer/F12886425/T96023.zip) - folder contains two 8k images from HDRI haven (one is 73MB, the other 328MB) - open a File Browser - browse to that folder - show thumbnails - larger file will never show a thumbnail {[F12886546](https://archive.blender.org/developer/F12886546/image.png) size=full}
Author

Added subscriber: @Shady.Hamza

Added subscriber: @Shady.Hamza
Member

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Did this used to work better in any previous version? You mentioned 3.0+, so does it work better in 2.93?
By loading you mean the generation of thumbnails, not loading them into Blender, right?

Did this used to work better in any previous version? You mentioned 3.0+, so does it work better in 2.93? By loading you mean the generation of thumbnails, not loading them into Blender, right?
Author

It's used to be the same but i don't use blender 2.93 anymore so I cannot confirm if it's still exists, maybe it's fixed in the LTS bug fixes.
And yup generating thumbnails in the file viewer, i have to open windows browser to pick exactly what image im looking for, loading is fine, sometimes also it does generate low res thumbs unless i refresh the file viewer, but larger images is pain

It's used to be the same but i don't use blender 2.93 anymore so I cannot confirm if it's still exists, maybe it's fixed in the LTS bug fixes. And yup generating thumbnails in the file viewer, i have to open windows browser to pick exactly what image im looking for, loading is fine, sometimes also it does generate low res thumbs unless i refresh the file viewer, but larger images is pain
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

In #96023#1313721, @Shady.Hamza wrote:
It's used to be the same but i don't use blender 2.93 anymore so I cannot confirm if it's still exists, maybe it's fixed in the LTS bug fixes.

Please test this, you can get previous builds here https://download.blender.org/release/.
If this is just a request for improved performance, this will likely not be considered a bug.

Blender File Viewer takes very long time and freezes blender when loading large png, hdri, alphas for sculpting..etc in thumbnail view ,files 4k and above, sometimes doesn't load thumbnails at all, this is an old issue

Not loading thumbnails at all would be considered a bug though, but we'd need to have a reproducable scenario here, can you give reproduction steps to when this happens?

> In #96023#1313721, @Shady.Hamza wrote: > It's used to be the same but i don't use blender 2.93 anymore so I cannot confirm if it's still exists, maybe it's fixed in the LTS bug fixes. Please test this, you can get previous builds here https://download.blender.org/release/. If this is just a request for improved performance, this will likely not be considered a bug. > Blender File Viewer takes very long time and freezes blender when loading large png, hdri, alphas for sculpting..etc in thumbnail view ,files 4k and above, sometimes doesn't load thumbnails at all, this is an old issue Not loading thumbnails at all would be considered a bug though, but we'd need to have a reproducable scenario here, can you give reproduction steps to when this happens?
Member

This comment was removed by @OmarEmaraDev

*This comment was removed by @OmarEmaraDev*
Author

3.2: not loading 1k Thumbs unless I refresh multiple times each times loads part of it, But doesn't load 4k and above at all
2.93: slow Load but loads smaller images, on the other hand larger images 6k and above freezes blender and whole PC :D

3.2: not loading 1k Thumbs unless I refresh multiple times each times loads part of it, But doesn't load 4k and above at all 2.93: slow Load but loads smaller images, on the other hand larger images 6k and above freezes blender and whole PC :D
Author

I go to texture Properties and open an Alpha Image for Sculpt, from folders containing 100+ 2k, 4k and 16k alphas

I go to texture Properties and open an Alpha Image for Sculpt, from folders containing 100+ 2k, 4k and 16k alphas
Author

ok one more thing this happens less with jpgs they load much much faster than pngs and exrs, PNGs and EXRs tend to not load or load slowly even if both have same res

ok one more thing this happens less with jpgs they load much much faster than pngs and exrs, PNGs and EXRs tend to not load or load slowly even if both have same res
Philipp Oeser changed title from Blender File Viewer 3.0+ to Blender Browser not generating previews for large (filezise) images 2022-02-25 10:19:18 +01:00
Philipp Oeser changed title from Blender Browser not generating previews for large (filezise) images to Blender File Browser not generating previews for large (filezise) images 2022-02-25 10:42:28 +01:00
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Julian Eisel was assigned by Bastien Montagne 2022-02-28 11:54:45 +01:00
Member

I'm not aware of any code that intentionally prevents reading of such files.

Without having investigated this, my suspicion of what's going on is:

  • The queue of previews to be loaded (in a background job) is constantly getting cleared and refilled as the File Browser is awaiting currently visible previews.
  • This makes sense on the face of it, e.g. this is used to only load previews that are actually (close to being) in view. But I have found a number of corner cases where it's causing significant issues. Just not clearing the queue is problematic too.
  • Now for big images, I fear that the time to load a single image is longer than the time it takes from triggering the loading to cancelling the queue of previews to be loaded. So the preview loading is given no chance to actually get done, it's always cancelled before.
    This would be quite nasty and difficult to fix - same for some other issues I've found with the preview loading. However for the Asset Browser UI rewrite (in asset-browser-grid-view), I'm now using the more recently added UI code to (lazy-)load custom previews, which should handle this much better (with some improvements I've worked on). The File Browser can be changed to do the same, seems like an easy thing to do. Plus we can remove all the custom preview loading code for the File Browser.
I'm not aware of any code that intentionally prevents reading of such files. Without having investigated this, my suspicion of what's going on is: - The queue of previews to be loaded (in a background job) is constantly getting cleared and refilled as the File Browser is awaiting currently visible previews. - This makes sense on the face of it, e.g. this is used to only load previews that are actually (close to being) in view. But I have found a number of corner cases where it's causing significant issues. Just not clearing the queue is problematic too. - Now for big images, I fear that the time to load a single image is longer than the time it takes from triggering the loading to cancelling the queue of previews to be loaded. So the preview loading is given no chance to actually get done, it's always cancelled before. This would be quite nasty and difficult to fix - same for some other issues I've found with the preview loading. However for the Asset Browser UI rewrite (in `asset-browser-grid-view`), I'm now using the more recently added UI code to (lazy-)load custom previews, which should handle this much better (with some improvements I've worked on). The File Browser can be changed to do the same, seems like an easy thing to do. Plus we can remove all the custom preview loading code for the File Browser.
Member

Added subscriber: @Harley

Added subscriber: @Harley
Member

@JulianEisel - I'm not aware of any code that intentionally prevents reading of such files.

IMB_thumbs.h defines THUMB_SIZE_MAX as 100 Megabytes, which thumb_create_ex uses as the largest file size that will allow image thumbnails.

I'd just remove this entirely, as this just seems to be trying to save users from themselves. Not sure we'd actually get error reports like "I have a folder containing multi-gigabyte images and it takes a long time to show the contents the first time when I'm in thumbnail view".

> @JulianEisel - I'm not aware of any code that intentionally prevents reading of such files. `IMB_thumbs.h` defines `THUMB_SIZE_MAX` as 100 Megabytes, which `thumb_create_ex` uses as the largest file size that will allow image thumbnails. I'd just remove this entirely, as this just seems to be trying to save users from themselves. Not sure we'd actually get error reports like "I have a folder containing multi-gigabyte images and it takes a long time to show the contents the first time when I'm in thumbnail view".
Member

Added subscriber: @cmbasnett

Added subscriber: @cmbasnett
Member

Many file formats (EXR included) support mip-maps, so this might be a good solution to think about for actually displaying content for very large files in the future.

Many file formats (EXR included) support mip-maps, so this might be a good solution to think about for actually displaying content for very large files in the future.

Added subscriber: @mont29

Added subscriber: @mont29

For the record, the THUMB_SIZE_MAX limitation is almost 11 years old (02fbaede8f, fixing #27203 (Crashes with some high-res image thumbnail generation))...

For the record, the `THUMB_SIZE_MAX` limitation is almost 11 years old (02fbaede8f, fixing #27203 (Crashes with some high-res image thumbnail generation))...
Author

Now when loading 4k Thumbs in browser crashes Blender

Now when loading 4k Thumbs in browser crashes Blender
Author

crash in latest 3.2 master

crash in latest 3.2 master
Member

Your original description includes two images, one 73 MB and the other 328, with a complaint that the smaller shows thumbnail while the larger does not. You’ll see comments later in this thread that this is by current design, that thumbnails are not created for images larger than 100 MB.

So how do your new comments relate to this complaint? Do your included images now crash in 3.2 where they didnt in 3.1? Or are you talking about other specific images, or all images? I assume these are smaller than 100 MB? If not related to your original samples then include some new “crashing” samples here. We’d need to be able to recreate the crash to investigate the cause.

Your original description includes two images, one 73 MB and the other 328, with a complaint that the smaller shows thumbnail while the larger does not. You’ll see comments later in this thread that this is by current design, that thumbnails are not created for images larger than 100 MB. So how do your new comments relate to this complaint? Do your included images now crash in 3.2 where they didnt in 3.1? Or are you talking about other specific images, or all images? I assume these are smaller than 100 MB? If not related to your original samples then include some new “crashing” samples here. We’d need to be able to recreate the crash to investigate the cause.
Author

So the original description was about not generating thumbs for large images yes, and would some time freezes blender for a while, the problem now is the same thumb issue, plus when opening a folder in browser that contains for example many 4k HDRIs maybe 30+ images in thumbnail view, it doesn't load thumbs(old issue) then it freezes blender then crash, so try opening a folder which contains 40 4k HDRIs in EXR format in thumb view, you might be able to reproduce it

So the original description was about not generating thumbs for large images yes, and would some time freezes blender for a while, the problem now is the same thumb issue, plus when opening a folder in browser that contains for example many 4k HDRIs maybe 30+ images in thumbnail view, it doesn't load thumbs(old issue) then it freezes blender then crash, so try opening a folder which contains 40 4k HDRIs in EXR format in thumb view, you might be able to reproduce it
Author

I don't know but i noticed other softwares like 3dcoat for example when I try to import images it opens the windows browser instead of built in browser, I don't know if that could be possible in blender or not but what if blender builtin browser is used only when importing assets that require additional setup like , and for images and stuff that imports directly we may use the windows browser, I'm no expert

I don't know but i noticed other softwares like 3dcoat for example when I try to import images it opens the windows browser instead of built in browser, I don't know if that could be possible in blender or not but what if blender builtin browser is used only when importing assets that require additional setup like , and for images and stuff that imports directly we may use the windows browser, I'm no expert
Member

We don't need more complaint of the old issue, where files that are larger than 100 Megabytes are not thumbnailed.

So all these files that freeze and crash blender are under 100 MB? Do any freeze or crash when alone in a folder or does this only happen with a bunch of them? I think that blender is thumbnailing multiple files in parallel so it might be that you are just running out of RAM. Can you confirm this is happening by looking at Task Manager memory usage while it is happening?

We don't need more complaint of the old issue, where files that are larger than 100 Megabytes are not thumbnailed. So all these files that freeze and crash blender are under 100 MB? Do any freeze or crash when alone in a folder or does this only happen with a bunch of them? I _think_ that blender is thumbnailing multiple files in parallel so it might be that you are just running out of RAM. Can you confirm this is happening by looking at Task Manager memory usage while it is happening?
Author

Yes under 100mb, and yes with a bunch of them, I have folder that have 2 4ks with other folders didn't crash, will check the ram and get back to you

Yes under 100mb, and yes with a bunch of them, I have folder that have 2 4ks with other folders didn't crash, will check the ram and get back to you
Author

My old complaint wasn't about 100mb+ not showing thumbs my complaint was 4k+ images don't load thumbs I have 4ks that are 15mb and 30mb not loading, the 100+mb example was an extreme example to reproduce the issue and I didn't add this example some of the developers did for clarification

My old complaint wasn't about 100mb+ not showing thumbs my complaint was 4k+ images don't load thumbs I have 4ks that are 15mb and 30mb not loading, the 100+mb example was an extreme example to reproduce the issue and I didn't add this example some of the developers did for clarification
Member

Yes, but your only two example files had one less than 100 MB and one over. This is a specific bug report about that design decision.

For reporting that a folder-full of large images will cause you to run out of RAM, then that is a separate known issue here: https://developer.blender.org/T70584

I'm just making sure that you aren't reporting something we don't already know about.

Yes, but your only two example files had one less than 100 MB and one over. This is a specific bug report about that design decision. For reporting that a folder-full of large images will cause you to run out of RAM, then that is a separate known issue here: https://developer.blender.org/T70584 I'm just making sure that you aren't reporting something we don't already know about.
Author

Update* latest 3.2 release March 31, doesn't crash, ram ok

Update* latest 3.2 release March 31, doesn't crash, ram ok
Author

I'll stick with the issue you mentioned about the heavy EXR, at the moment the crash issue seems to be fixed, thank you for your help :)

I'll stick with the issue you mentioned about the heavy EXR, at the moment the crash issue seems to be fixed, thank you for your help :)
Member

Interesting. If folders of them are no longer crashing then maybe we can consider increasing that 100MB limit. Will investigate. Thanks!

Interesting. If folders of them are no longer crashing then maybe we can consider increasing that 100MB limit. Will investigate. Thanks!
Julian Eisel was unassigned by Harley Acheson 2022-05-20 03:19:00 +02:00
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Member

Resolved with commit f600a2aa6d as that will thumbnail all EXRs no matter what type or size.

Resolved with commit f600a2aa6d as that will thumbnail all EXRs no matter what type or size.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#96023
No description provided.